Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 88416ec

Browse files
committed
docs(*): add browserTrigger docs; remove references to scenario runner
1 parent ee0c1e6 commit 88416ec

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

docs/content/guide/e2e-testing.ngdoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55

66
# E2E Testing
77

8-
<div class="alert alert-danger">
9-
**Note:** In the past, end-to-end testing could be done with a deprecated tool called
10-
[AngularJS Scenario Runner](http://code.angularjs.org/1.2.16/docs/guide/e2e-testing). That tool
11-
is now in maintenance mode.
12-
</div>
13-
148
As applications grow in size and complexity, it becomes unrealistic to rely on manual testing to
159
verify the correctness of new features, catch bugs and notice regressions. Unit tests
1610
are the first line of defense for catching bugs, but sometimes issues come up with integration

src/ng/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function Browser(window, document, $log, $sniffer) {
6767

6868
/**
6969
* @private
70-
* Note: this method is used only by scenario runner
70+
* Note: this method is used only by protractor / scenario runner
7171
* TODO(vojta): prefix this method with $$ ?
7272
* @param {function()} callback Function that will be called when no outstanding request
7373
*/

src/ngMock/browserTrigger.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22

33
(function() {
44
/**
5-
* Triggers a browser event. Attempts to choose the right event if one is
6-
* not specified.
5+
* @ngdoc function
6+
* @name browserTrigger
7+
* @description
8+
*
9+
* This is a global (window) function that is only available when the {@link ngMock} module is
10+
* included.
11+
*
12+
* It can be used to trigger a native browser event on an element, which is useful for testing.
13+
*
714
*
815
* @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement
9-
* @param {string} eventType Optional event type
16+
* @param {string=} eventType Optional event type. If none is specified, the function tries
17+
* to determine the right event type for the element, e.g. `change` for
18+
* `input[text]`.
1019
* @param {Object=} eventData An optional object which contains additional event data (such as x,y
11-
* coordinates, keys, etc...) that are passed into the event when triggered
20+
* coordinates, keys, etc...) that are passed into the event when
21+
* triggered.
1222
*/
1323
window.browserTrigger = function browserTrigger(element, eventType, eventData) {
1424
if (element && !element.nodeName) element = element[0];

0 commit comments

Comments
 (0)