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.
Files changed (44) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +15 -22
  3. package/bin/codecept.js +3 -1
  4. package/docs/advanced.md +1 -1
  5. package/docs/angular.md +6 -9
  6. package/docs/basics.md +388 -86
  7. package/docs/bdd.md +4 -3
  8. package/docs/build/Nightmare.js +3 -0
  9. package/docs/build/Polly.js +26 -12
  10. package/docs/build/Puppeteer.js +14 -13
  11. package/docs/build/TestCafe.js +101 -2
  12. package/docs/build/WebDriver.js +53 -52
  13. package/docs/changelog.md +86 -57
  14. package/docs/detox.md +235 -0
  15. package/docs/helpers/Detox.md +579 -0
  16. package/docs/helpers/Polly.md +13 -3
  17. package/docs/helpers/Puppeteer.md +155 -156
  18. package/docs/helpers/TestCafe.md +53 -0
  19. package/docs/helpers/WebDriver.md +209 -204
  20. package/docs/locators.md +2 -0
  21. package/docs/mobile.md +5 -1
  22. package/docs/puppeteer.md +59 -13
  23. package/docs/quickstart.md +47 -12
  24. package/docs/testcafe.md +157 -0
  25. package/docs/webdriver.md +453 -0
  26. package/lib/command/definitions.js +152 -7
  27. package/lib/command/gherkin/snippets.js +19 -8
  28. package/lib/command/init.js +30 -22
  29. package/lib/command/utils.js +1 -1
  30. package/lib/container.js +36 -10
  31. package/lib/data/dataScenarioConfig.js +18 -0
  32. package/lib/helper/Nightmare.js +3 -0
  33. package/lib/helper/Polly.js +26 -12
  34. package/lib/helper/Puppeteer.js +14 -13
  35. package/lib/helper/TestCafe.js +72 -2
  36. package/lib/helper/WebDriver.js +53 -52
  37. package/lib/helper/testcafe/testcafe-utils.js +3 -2
  38. package/lib/interfaces/scenarioConfig.js +2 -2
  39. package/lib/listener/config.js +2 -2
  40. package/lib/plugin/allure.js +3 -0
  41. package/lib/step.js +5 -2
  42. package/lib/ui.js +1 -1
  43. package/lib/utils.js +13 -21
  44. package/package.json +14 -12
@@ -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.