codeceptjs 2.2.0 → 2.2.1
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/CHANGELOG.md +30 -1
- package/README.md +15 -22
- package/bin/codecept.js +3 -1
- package/docs/advanced.md +1 -1
- package/docs/angular.md +6 -9
- package/docs/basics.md +388 -86
- package/docs/bdd.md +4 -3
- package/docs/build/Nightmare.js +3 -0
- package/docs/build/Polly.js +26 -12
- package/docs/build/Puppeteer.js +14 -13
- package/docs/build/TestCafe.js +101 -2
- package/docs/build/WebDriver.js +53 -52
- package/docs/changelog.md +86 -57
- package/docs/detox.md +235 -0
- package/docs/helpers/Detox.md +579 -0
- package/docs/helpers/Polly.md +13 -3
- package/docs/helpers/Puppeteer.md +155 -156
- package/docs/helpers/TestCafe.md +53 -0
- package/docs/helpers/WebDriver.md +209 -204
- package/docs/locators.md +2 -0
- package/docs/mobile.md +5 -1
- package/docs/puppeteer.md +59 -13
- package/docs/quickstart.md +47 -12
- package/docs/testcafe.md +157 -0
- package/docs/webdriver.md +453 -0
- package/lib/command/definitions.js +152 -7
- package/lib/command/gherkin/snippets.js +19 -8
- package/lib/command/init.js +30 -22
- package/lib/command/utils.js +1 -1
- package/lib/container.js +36 -10
- package/lib/data/dataScenarioConfig.js +18 -0
- package/lib/helper/Nightmare.js +3 -0
- package/lib/helper/Polly.js +26 -12
- package/lib/helper/Puppeteer.js +14 -13
- package/lib/helper/TestCafe.js +72 -2
- package/lib/helper/WebDriver.js +53 -52
- package/lib/helper/testcafe/testcafe-utils.js +3 -2
- package/lib/interfaces/scenarioConfig.js +2 -2
- package/lib/listener/config.js +2 -2
- package/lib/plugin/allure.js +3 -0
- package/lib/step.js +5 -2
- package/lib/ui.js +1 -1
- package/lib/utils.js +13 -21
- package/package.json +14 -12
package/docs/helpers/TestCafe.md
CHANGED
|
@@ -491,6 +491,19 @@ Returns [Promise][6]<[number][7]> number of visible elements
|
|
|
491
491
|
|
|
492
492
|
|
|
493
493
|
|
|
494
|
+
### grabPageScrollPosition
|
|
495
|
+
|
|
496
|
+
Retrieves a page scroll position and returns it to test.
|
|
497
|
+
Resumes test execution, so should be used inside an async function with `await` operator.
|
|
498
|
+
|
|
499
|
+
```js
|
|
500
|
+
let { x, y } = await I.grabPageScrollPosition();
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
Returns [Promise][6]<[object][4]> scroll position
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
494
507
|
### grabSource
|
|
495
508
|
|
|
496
509
|
Retrieves page source and returns it to test.
|
|
@@ -670,6 +683,46 @@ I.saveScreenshot('debug.png', true) //resizes to available scrollHeight and scro
|
|
|
670
683
|
|
|
671
684
|
|
|
672
685
|
|
|
686
|
+
### scrollPageToBottom
|
|
687
|
+
|
|
688
|
+
Scroll page to the bottom.
|
|
689
|
+
|
|
690
|
+
```js
|
|
691
|
+
I.scrollPageToBottom();
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
### scrollPageToTop
|
|
698
|
+
|
|
699
|
+
Scroll page to the top.
|
|
700
|
+
|
|
701
|
+
```js
|
|
702
|
+
I.scrollPageToTop();
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
### scrollTo
|
|
709
|
+
|
|
710
|
+
Scrolls to element matched by locator.
|
|
711
|
+
Extra shift can be set with offsetX and offsetY options.
|
|
712
|
+
|
|
713
|
+
```js
|
|
714
|
+
I.scrollTo('footer');
|
|
715
|
+
I.scrollTo('#submit', 5, 5);
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
#### Parameters
|
|
719
|
+
|
|
720
|
+
- `locator` ([string][3] \| [object][4]) located by CSS|XPath|strict locator.
|
|
721
|
+
- `offsetX` [number][7] (optional, `0` by default) X-axis offset.
|
|
722
|
+
- `offsetY` [number][7] (optional, `0` by default) Y-axis offset.
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
673
726
|
### see
|
|
674
727
|
|
|
675
728
|
Checks that a page contains a visible text.
|