codeceptjs 3.5.4-beta.1 → 3.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/docs/build/Appium.js +8 -6
- package/docs/build/GraphQL.js +25 -0
- package/docs/build/Nightmare.js +11 -6
- package/docs/build/Playwright.js +425 -193
- package/docs/build/Protractor.js +13 -8
- package/docs/build/Puppeteer.js +20 -14
- package/docs/build/TestCafe.js +17 -10
- package/docs/build/WebDriver.js +41 -37
- package/docs/changelog.md +220 -0
- package/docs/community-helpers.md +8 -4
- package/docs/examples.md +8 -2
- package/docs/helpers/Appium.md +2 -2
- package/docs/helpers/GraphQL.md +21 -0
- package/docs/helpers/Nightmare.md +1258 -0
- package/docs/helpers/Playwright.md +223 -119
- package/docs/helpers/Protractor.md +1709 -0
- package/docs/helpers/Puppeteer.md +3 -3
- package/docs/helpers/TestCafe.md +2 -2
- package/docs/helpers/WebDriver.md +3 -3
- package/docs/playwright.md +24 -1
- package/docs/webapi/dontSeeInField.mustache +1 -1
- package/docs/webapi/seeInField.mustache +1 -1
- package/docs/wiki/Books-&-Posts.md +0 -0
- package/docs/wiki/Community-Helpers-&-Plugins.md +8 -4
- package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +46 -14
- package/docs/wiki/Examples.md +8 -2
- package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -0
- package/docs/wiki/Home.md +0 -0
- package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
- package/docs/wiki/Release-Process.md +0 -0
- package/docs/wiki/Roadmap.md +0 -0
- package/docs/wiki/Tests.md +0 -0
- package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -0
- package/docs/wiki/Videos.md +0 -0
- package/lib/command/definitions.js +2 -7
- package/lib/command/run-multiple/collection.js +17 -5
- package/lib/helper/Appium.js +6 -4
- package/lib/helper/GraphQL.js +25 -0
- package/lib/helper/Nightmare.js +1415 -0
- package/lib/helper/Playwright.js +321 -54
- package/lib/helper/Protractor.js +1837 -0
- package/lib/helper/Puppeteer.js +18 -12
- package/lib/helper/TestCafe.js +15 -8
- package/lib/helper/WebDriver.js +39 -35
- package/lib/helper/clientscripts/nightmare.js +213 -0
- package/lib/helper/errors/ElementNotFound.js +2 -1
- package/lib/helper/scripts/highlightElement.js +1 -1
- package/lib/interfaces/bdd.js +1 -1
- package/lib/mochaFactory.js +2 -1
- package/lib/pause.js +5 -4
- package/lib/plugin/heal.js +2 -3
- package/lib/plugin/selenoid.js +6 -1
- package/lib/step.js +27 -10
- package/lib/utils.js +4 -0
- package/lib/workers.js +3 -1
- package/package.json +13 -13
- package/typings/promiseBasedTypes.d.ts +145 -126
- package/typings/types.d.ts +152 -133
- package/CHANGELOG.md +0 -2519
- package/docs/build/Polly.js +0 -42
- package/docs/build/SeleniumWebdriver.js +0 -76
package/docs/build/Polly.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const MockRequest = require('./MockRequest');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This helper works the same as MockRequest helper. It has been included for backwards compatibility
|
|
5
|
-
* reasons. So use MockRequest helper instead of this.
|
|
6
|
-
*
|
|
7
|
-
* Please refer to MockRequest helper documentation for details.
|
|
8
|
-
*
|
|
9
|
-
* ### Installations
|
|
10
|
-
*
|
|
11
|
-
* Requires [Polly.js](https://netflix.github.io/pollyjs/#/) library by Netflix installed
|
|
12
|
-
*
|
|
13
|
-
* ```
|
|
14
|
-
* npm i @pollyjs/core @pollyjs/adapter-puppeteer --save-dev
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* Requires Puppeteer helper or WebDriver helper enabled
|
|
18
|
-
*
|
|
19
|
-
* ### Configuration
|
|
20
|
-
*
|
|
21
|
-
* Just enable helper in config file:
|
|
22
|
-
*
|
|
23
|
-
* ```js
|
|
24
|
-
* helpers: {
|
|
25
|
-
* Puppeteer: {
|
|
26
|
-
* // regular Puppeteer config here
|
|
27
|
-
* },
|
|
28
|
-
* Polly: {}
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
* The same can be done when using WebDriver helper..
|
|
32
|
-
*
|
|
33
|
-
* ### Usage
|
|
34
|
-
*
|
|
35
|
-
* Use `I.mockRequest` to intercept and mock requests.
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
class Polly extends MockRequest {}
|
|
39
|
-
|
|
40
|
-
console.log('Deprecation: Polly helper was renamed to MockRequest, please update your config!');
|
|
41
|
-
|
|
42
|
-
module.exports = Polly;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
const Helper = require('../helper');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* SeleniumWebdriver helper is based on the official [Selenium Webdriver JS](https://www.npmjs.com/package/selenium-webdriver)
|
|
5
|
-
* library. It implements common web api methods (amOnPage, click, see).
|
|
6
|
-
*
|
|
7
|
-
* ## Backends
|
|
8
|
-
*
|
|
9
|
-
* ### Selenium Installation
|
|
10
|
-
*
|
|
11
|
-
* 1. Download [Selenium Server](http://docs.seleniumhq.org/download/)
|
|
12
|
-
* 2. For Chrome browser install [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/getting-started), for Firefox browser install [GeckoDriver](https://github.com/mozilla/geckodriver).
|
|
13
|
-
* 3. Launch the server: `java -jar selenium-server-standalone-3.xx.xxx.jar`. To locate Chromedriver binary use `-Dwebdriver.chrome.driver=./chromedriver` option. For Geckodriver use `-Dwebdriver.gecko.driver=`.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* ### PhantomJS Installation
|
|
17
|
-
*
|
|
18
|
-
* PhantomJS is a headless alternative to Selenium Server that implements [the WebDriver protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
|
|
19
|
-
* It allows you to run Selenium tests on a server without a GUI installed.
|
|
20
|
-
*
|
|
21
|
-
* 1. Download [PhantomJS](http://phantomjs.org/download.html)
|
|
22
|
-
* 2. Run PhantomJS in WebDriver mode: `phantomjs --webdriver=4444`
|
|
23
|
-
*
|
|
24
|
-
* ## Configuration
|
|
25
|
-
*
|
|
26
|
-
* This helper should be configured in codecept.json or codecept.conf.js
|
|
27
|
-
*
|
|
28
|
-
* * `url` - base url of website to be tested
|
|
29
|
-
* * `browser` - browser in which perform testing
|
|
30
|
-
* * `driver` - which protractor driver to use (local, direct, session, hosted, sauce, browserstack). By default set to 'hosted' which requires selenium server to be started.
|
|
31
|
-
* * `restart` - restart browser between tests (default: true).
|
|
32
|
-
* * `smartWait`: (optional) **enables SmartWait**; wait for additional milliseconds for element to appear. Enable for 5 secs: "smartWait": 5000
|
|
33
|
-
* * `disableScreenshots` (optional, default: false) - don't save screenshot on failure
|
|
34
|
-
* * `uniqueScreenshotNames` (optional, default: false) - option to prevent screenshot override if you have scenarios with the same name in different suites
|
|
35
|
-
* * `keepBrowserState` (optional, default: false) - keep browser state between tests when `restart` set to false.
|
|
36
|
-
* * `keepCookies` (optional, default: false) - keep cookies between tests when `restart` set to false.*
|
|
37
|
-
* * `seleniumAddress` - Selenium address to connect (default: http://localhost:4444/wd/hub)
|
|
38
|
-
* * `waitForTimeout`: (optional) sets default wait time in _ms_ for all `wait*` functions. 1000 by default;
|
|
39
|
-
* * `scriptTimeout`: (optional) sets default timeout for scripts in `executeAsync`. 1000 by default.
|
|
40
|
-
* * `windowSize`: (optional) default window size. Set to `maximize` or a dimension in the format `640x480`.
|
|
41
|
-
* * `manualStart` (optional, default: false) - do not start browser before a test, start it manually inside a helper with `this.helpers["WebDriverIO"]._startBrowser()`
|
|
42
|
-
* * `capabilities`: {} - list of [Desired Capabilities](https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities)
|
|
43
|
-
*
|
|
44
|
-
* Example:
|
|
45
|
-
*
|
|
46
|
-
* ```json
|
|
47
|
-
* {
|
|
48
|
-
* "helpers": {
|
|
49
|
-
* "SeleniumWebdriver" : {
|
|
50
|
-
* "url": "http://localhost",
|
|
51
|
-
* "browser": "chrome",
|
|
52
|
-
* "smartWait": 5000,
|
|
53
|
-
* "restart": false
|
|
54
|
-
* }
|
|
55
|
-
* }
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*
|
|
59
|
-
* ## Access From Helpers
|
|
60
|
-
*
|
|
61
|
-
* Receive a WebDriverIO client from a custom helper by accessing `browser` property:
|
|
62
|
-
*
|
|
63
|
-
* ```js
|
|
64
|
-
* this.helpers['SeleniumWebdriver'].browser
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
class SeleniumWebdriver extends Helper {
|
|
69
|
-
constructor(config) {
|
|
70
|
-
console.log('SeleniumWebdriver helper is now alias to Protractor');
|
|
71
|
-
console.log('Please replace in your config: SeleniumWebdriver -> Protractor');
|
|
72
|
-
super(config);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
module.exports = SeleniumWebdriver;
|