Skip to content

Commit

Permalink
docs updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Jan 8, 2022
1 parent 7c66aed commit e6ff8cf
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 79 deletions.
112 changes: 61 additions & 51 deletions docs/changelog.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/helpers/ApiDataFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,6 @@ I.haveMultiple('post', 3, { author: 'davert' });

[2]: https://www.npmjs.com/package/faker

[3]: https://codecept.io/helpers/REST/
[3]: http://codecept.io/helpers/REST/

[4]: https://github.com/axios/axios#request-config
14 changes: 7 additions & 7 deletions docs/helpers/Appium.md
Original file line number Diff line number Diff line change
Expand Up @@ -1884,31 +1884,31 @@ const width = await I.grabElementBoundingRect('h3', 'width');

Returns **([Promise][14]<DOMRect> | [Promise][14]<[number][8]>)** Element bounding rectangle

[1]: https://codecept.io/helpers/WebDriver/
[1]: http://codecept.io/helpers/WebDriver/

[2]: https://appium.io/
[2]: http://appium.io/

[3]: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[5]: https://webdriver.io/api/mobile/setNetworkConnection.html
[5]: http://webdriver.io/api/mobile/setNetworkConnection.html

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.android.com/reference/android/view/KeyEvent.html

[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[9]: https://webdriver.io/api/mobile/touchAction.html
[9]: http://webdriver.io/api/mobile/touchAction.html

[10]: https://webdriver.io/api/mobile/swipe.html
[10]: http://webdriver.io/api/mobile/swipe.html

[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[12]: https://webdriver.io/api/mobile/rotate.html
[12]: http://webdriver.io/api/mobile/rotate.html

[13]: https://webdriver.io/api/mobile/setImmediateValue.html
[13]: http://webdriver.io/api/mobile/setImmediateValue.html

[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise

Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/GraphQLDataFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ I.mutateMultiple('createUser', 3, { age: 25 });

[2]: https://www.npmjs.com/package/faker

[3]: https://codecept.io/helpers/GraphQL/
[3]: http://codecept.io/helpers/GraphQL/

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

Expand Down
4 changes: 2 additions & 2 deletions docs/helpers/Nightmare.md
Original file line number Diff line number Diff line change
Expand Up @@ -1194,10 +1194,10 @@ I.waitToHide('#popup');
[11]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[12]: https://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent
[12]: http://electron.atom.io/docs/api/web-contents/#webcontentssendinputeventevent
[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
[14]: https://github.com/segmentio/nightmare/blob/master/Readme.md#cookiessetcookie
[15]: https://electron.atom.io/docs/api/web-contents/#contentssendinputeventevent
[15]: http://electron.atom.io/docs/api/web-contents/#contentssendinputeventevent
2 changes: 1 addition & 1 deletion docs/helpers/Playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[8]: https://jster.net/category/windows-modals-popups
[8]: http://jster.net/category/windows-modals-popups

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

Expand Down
2 changes: 1 addition & 1 deletion docs/helpers/Puppeteer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[7]: https://jster.net/category/windows-modals-popups
[7]: http://jster.net/category/windows-modals-popups
[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
Expand Down
16 changes: 8 additions & 8 deletions docs/helpers/WebDriver.md
Original file line number Diff line number Diff line change
Expand Up @@ -2169,23 +2169,23 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
- `urlPart` **[string][19]** value to check.
- `sec` **[number][22]** (optional, `1` by default) time in seconds to wait
[1]: https://webdriver.io/
[1]: http://webdriver.io/
[2]: https://codecept.io/webdriver/#testing-with-webdriver
[3]: https://codecept.io/acceptance/#smartwait
[3]: http://codecept.io/acceptance/#smartwait
[4]: https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
[5]: https://webdriver.io/docs/timeouts.html
[5]: http://webdriver.io/docs/timeouts.html
[6]: https://webdriver.io/guide/getstarted/configuration.html
[6]: http://webdriver.io/guide/getstarted/configuration.html
[7]: https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/IE/Options.html
[8]: https://aerokube.com/selenoid/latest/
[9]: https://webdriver.io/guide/usage/cloudservices.html
[9]: http://webdriver.io/guide/usage/cloudservices.html
[10]: https://webdriver.io/docs/sauce-service.html
Expand All @@ -2201,13 +2201,13 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
[16]: https://github.com/PeterNgTr/codeceptjs-applitoolshelper
[17]: https://webdriver.io/guide/usage/multiremote.html
[17]: http://webdriver.io/guide/usage/multiremote.html
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[20]: https://jster.net/category/windows-modals-popups
[20]: http://jster.net/category/windows-modals-popups
[21]: https://webdriver.io/docs/timeouts.html
Expand All @@ -2219,7 +2219,7 @@ I.waitUrlEquals('http://127.0.0.1:8000/info');
[25]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise
[26]: https://webdriver.io/api/protocol/execute.html
[26]: http://webdriver.io/api/protocol/execute.html
[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
Expand Down
12 changes: 11 additions & 1 deletion lib/helper/FileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@ const { fileEquals } = require('../assert/equal');
* I.amInPath('test');
* I.seeFile('codecept.json');
* I.seeInThisFile('FileSystem');
* I.dontSeeInThisFile("WebDriverIO");
* I.dontSeeInThisFile("WebDriver");
* ```
*
* ## Configuration
*
* Enable helper in config file:
*
* ```js
* helpers: {
* FileSystem: {},
* }
* ```
*
* ## Methods
Expand Down
10 changes: 5 additions & 5 deletions lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const { createValueEngine, createDisabledEngine } = require('./extras/Playwright
* * `keepBrowserState`: (optional, default: false) - keep browser state between tests when `restart` is set to false.
* * `keepCookies`: (optional, default: false) - keep cookies between tests when `restart` is set to false.
* * `waitForAction`: (optional) how long to wait after click, doubleClick or PressKey actions in ms. Default: 100.
* * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://github.com/microsoft/playwright/blob/master/docs/api.md#pagewaitfornavigationoptions).
* * `waitForNavigation`: (optional, default: 'load'). When to consider navigation succeeded. Possible options: `load`, `domcontentloaded`, `networkidle`. Choose one of those options is possible. See [Playwright API](https://github.com/microsoft/playwright/blob/main/docs/api.md#pagewaitfornavigationoptions).
* * `pressKeyDelay`: (optional, default: '10'). Delay between key presses in ms. Used when calling Playwrights page.type(...) in fillField/appendField
* * `getPageTimeout` (optional, default: '0') config option to set maximum navigation time in milliseconds.
* * `waitForTimeout`: (optional) default wait* timeout in ms. Default: 1000.
Expand Down Expand Up @@ -501,10 +501,10 @@ class Playwright extends Helper {
* First argument is a description of an action.
* Second argument is async function that gets this helper as parameter.
*
* { [`page`](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-page), [`context`](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-context) [`browser`](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browser) } objects from Playwright API are available.
* { [`page`](https://github.com/microsoft/playwright/blob/main/docs/src/api/class-page.md), [`context`](https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browsercontext.md) [`browser`](https://github.com/microsoft/playwright/blob/main/docs/src/api/class-browser.md) } objects from Playwright API are available.
*
* ```js
* I.usePlaywrightTo('emulate offline mode', async ({ context }) {
* I.usePlaywrightTo('emulate offline mode', async ({ context }) => {
* await context.setOffline(true);
* });
* ```
Expand Down Expand Up @@ -1071,7 +1071,7 @@ class Playwright extends Helper {
* I.openNewTab();
* ```
*
* You can pass in [page options](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsernewpageoptions) to emulate device on this page
* You can pass in [page options](https://github.com/microsoft/playwright/blob/main/docs/api.md#browsernewpageoptions) to emulate device on this page
*
* ```js
* // enable mobile
Expand Down Expand Up @@ -1580,7 +1580,7 @@ class Playwright extends Helper {
*/
async clearCookie() {
// Playwright currently doesn't support to delete a certain cookie
// https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browsercontext
// https://github.com/microsoft/playwright/blob/main/docs/api.md#class-browsercontext
if (!this.browserContext) return;
return this.browserContext.clearCookies();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/plugin/autoLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const defaultConfig = {
* ```js
* // inside a test file
* // use login to inject auto-login function
* Before(login => {
* Before(({ login }) => {
* login('user'); // login using user session
* });
*
Expand Down
6 changes: 6 additions & 0 deletions lib/plugin/tryTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ const defaultConfig = {
* #### Multiple Conditional Assertions
*
* ```js
*
* Add assert requires first:
* ```js
* const assert = require('assert');
* ```
* Then use the assert:
* const result1 = await tryTo(() => I.see('Hello, user'));
* const result2 = await tryTo(() => I.seeElement('.welcome'));
* assert.ok(result1 && result2, 'Assertions were not succesful');
Expand Down

0 comments on commit e6ff8cf

Please sign in to comment.