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

Commit c86acd4

Browse files
cnishinaheathkit
authored andcommitted
chore(website): fix website for items to appear properly (#3314)
- Fix order for website (see #3163. Does not include $ / $$) - Replace @return with @returns so descriptions will appear
1 parent 128f8e1 commit c86acd4

File tree

7 files changed

+113
-111
lines changed

7 files changed

+113
-111
lines changed

lib/browser.ts

+17-15
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export interface ElementHelper extends Function {
7575
*
7676
* @private
7777
* @param {Protractor} ptor
78-
* @return {function(webdriver.Locator): ElementFinder}
78+
* @returns {function(webdriver.Locator): ElementFinder}
7979
*/
8080
function buildElementHelper(browser: Browser): ElementHelper {
8181
let element: ElementHelper = (locator: Locator) => {
@@ -298,7 +298,7 @@ export class Browser extends Webdriver {
298298
*
299299
* Set by the runner.
300300
*
301-
* @return {webdriver.promise.Promise} A promise which resolves to the capabilities object.
301+
* @returns {webdriver.promise.Promise} A promise which resolves to the capabilities object.
302302
*/
303303
getProcessedConfig: () => webdriver.promise.Promise;
304304

@@ -309,7 +309,7 @@ export class Browser extends Webdriver {
309309
*
310310
* @param {boolean} opt_useSameUrl Whether to navigate to current url on creation
311311
* @param {boolean} opt_copyMockModules Whether to apply same mock modules on creation
312-
* @return {Protractor} a protractor instance.
312+
* @returns {Protractor} a protractor instance.
313313
*/
314314
forkNewDriverInstance:
315315
(opt_useSameUrl?: boolean, opt_copyMockModules?: boolean) => Browser;
@@ -340,7 +340,7 @@ export class Browser extends Webdriver {
340340
* @param {!(string|Function)} script The script to execute.
341341
* @param {string} description A description of the command for debugging.
342342
* @param {...*} var_args The arguments to pass to the script.
343-
* @return {!webdriver.promise.Promise.<T>} A promise that will resolve to the
343+
* @returns {!webdriver.promise.Promise.<T>} A promise that will resolve to the
344344
* scripts return value.
345345
* @template T
346346
*/
@@ -366,7 +366,7 @@ export class Browser extends Webdriver {
366366
* @param {!(string|Function)} script The script to execute.
367367
* @param {string} description A description for debugging purposes.
368368
* @param {...*} var_args The arguments to pass to the script.
369-
* @return {!webdriver.promise.Promise.<T>} A promise that will resolve to the
369+
* @returns {!webdriver.promise.Promise.<T>} A promise that will resolve to the
370370
* scripts return value.
371371
* @template T
372372
*/
@@ -391,7 +391,7 @@ export class Browser extends Webdriver {
391391
*
392392
* @param {string=} opt_description An optional description to be added
393393
* to webdriver logs.
394-
* @return {!webdriver.promise.Promise} A promise that will resolve to the
394+
* @returns {!webdriver.promise.Promise} A promise that will resolve to the
395395
* scripts return value.
396396
*/
397397
waitForAngular(opt_description?: string): webdriver.promise.Promise {
@@ -515,7 +515,8 @@ export class Browser extends Webdriver {
515515
/**
516516
* Waits for Angular to finish rendering before searching for elements.
517517
* @see webdriver.WebDriver.findElement
518-
* @return {!webdriver.WebElement}
518+
* @returns {!webdriver.promise.Promise} A promise that will be resolved to
519+
* the located {@link webdriver.WebElement}.
519520
*/
520521
findElement(locator: Locator): webdriver.WebElement {
521522
return this.element(locator).getWebElement();
@@ -524,7 +525,7 @@ export class Browser extends Webdriver {
524525
/**
525526
* Waits for Angular to finish rendering before searching for elements.
526527
* @see webdriver.WebDriver.findElements
527-
* @return {!webdriver.promise.Promise} A promise that will be resolved to an
528+
* @returns {!webdriver.promise.Promise} A promise that will be resolved to an
528529
* array of the located {@link webdriver.WebElement}s.
529530
*/
530531
findElements(locator: Locator): webdriver.promise.Promise {
@@ -534,7 +535,7 @@ export class Browser extends Webdriver {
534535
/**
535536
* Tests if an element is present on the page.
536537
* @see webdriver.WebDriver.isElementPresent
537-
* @return {!webdriver.promise.Promise} A promise that will resolve to whether
538+
* @returns {!webdriver.promise.Promise} A promise that will resolve to whether
538539
* the element is present on the page.
539540
*/
540541
isElementPresent(locatorOrElement: webdriver.Locator|
@@ -594,7 +595,7 @@ export class Browser extends Webdriver {
594595
/**
595596
* Get a list of the current mock modules.
596597
*
597-
* @return {Array.<!string|Function>}
598+
* @returns {Array.<!string|Function>} The list of mock modules.
598599
*/
599600
getRegisteredMockModules(): Array<string|Function> {
600601
return this.mockModules_.map((module) => { return module.script; });
@@ -853,7 +854,7 @@ export class Browser extends Webdriver {
853854
* .toBe('http://angular.github.io/protractor/#/api');
854855
*
855856
* @param {string} url In page URL using the same syntax as $location.url()
856-
* @return {!webdriver.promise.Promise} A promise that will resolve once
857+
* @returns {!webdriver.promise.Promise} A promise that will resolve once
857858
* page has been changed.
858859
*/
859860
setLocation(url: string): webdriver.promise.Promise {
@@ -877,6 +878,7 @@ export class Browser extends Webdriver {
877878
* browser.get('http://angular.github.io/protractor/#/api');
878879
* expect(browser.getLocationAbsUrl())
879880
* .toBe('http://angular.github.io/protractor/#/api');
881+
* @returns {string} The current absolute url from AngularJS.
880882
*/
881883
getLocationAbsUrl(): webdriver.promise.Promise {
882884
this.waitForAngular();
@@ -918,7 +920,7 @@ export class Browser extends Webdriver {
918920
* already be bound to the debugger, so it will not be available, but that is
919921
* okay.
920922
*
921-
* @return {Promise<boolean>} A promise that becomes ready when the validation
923+
* @returns {Promise<boolean>} A promise that becomes ready when the validation
922924
* is done. The promise will resolve to a boolean which represents whether
923925
* this is the first time that the debugger is called.
924926
*/
@@ -1206,13 +1208,13 @@ export class Browser extends Webdriver {
12061208
}
12071209

12081210
/**
1209-
* Create a new instance of Protractor by wrapping a webdriver instance.
1211+
* Create a new instance of Browser by wrapping a webdriver instance.
12101212
*
12111213
* @param {webdriver.WebDriver} webdriver The configured webdriver instance.
12121214
* @param {string=} opt_baseUrl A URL to prepend to relative gets.
1213-
* @param {boolean=} opt_untrackOutstandingTimeouts Whether Protractor should
1215+
* @param {boolean=} opt_untrackOutstandingTimeouts Whether Browser should
12141216
* stop tracking outstanding $timeouts.
1215-
* @return {Protractor}
1217+
* @returns {Browser} a new Browser instance
12161218
*/
12171219
static wrapDriver(
12181220
webdriver: webdriver.WebDriver, baseUrl?: string, rootElement?: string,

0 commit comments

Comments
 (0)