codeceptjs 2.6.7 → 2.6.11

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 (97) hide show
  1. package/CHANGELOG.md +33 -6
  2. package/README.md +11 -11
  3. package/docs/advanced.md +21 -0
  4. package/docs/basics.md +6 -5
  5. package/docs/bdd.md +1 -2
  6. package/docs/books.md +1 -1
  7. package/docs/build/Appium.js +1 -2
  8. package/docs/build/FileSystem.js +3 -3
  9. package/docs/build/Mochawesome.js +1 -1
  10. package/docs/build/Nightmare.js +81 -5
  11. package/docs/build/Playwright.js +100 -17
  12. package/docs/build/Protractor.js +34 -2
  13. package/docs/build/Puppeteer.js +59 -2
  14. package/docs/build/TestCafe.js +23 -0
  15. package/docs/build/WebDriver.js +62 -16
  16. package/docs/changelog.md +152 -125
  17. package/docs/community-helpers.md +7 -3
  18. package/docs/configuration.md +1 -1
  19. package/docs/custom-helpers.md +2 -2
  20. package/docs/data.md +1 -1
  21. package/docs/detox.md +2 -2
  22. package/docs/email.md +1 -1
  23. package/docs/examples.md +12 -2
  24. package/docs/helpers/Appium.md +24 -5
  25. package/docs/helpers/Nightmare.md +42 -0
  26. package/docs/helpers/Playwright.md +41 -4
  27. package/docs/helpers/Protractor.md +14 -0
  28. package/docs/helpers/Puppeteer.md +38 -1
  29. package/docs/helpers/TestCafe.md +14 -0
  30. package/docs/helpers/WebDriver.md +24 -5
  31. package/docs/hooks.md +14 -14
  32. package/docs/locators.md +1 -1
  33. package/docs/playwright.md +13 -0
  34. package/docs/translation.md +21 -1
  35. package/docs/ui.md +2 -2
  36. package/docs/videos.md +4 -4
  37. package/docs/webapi/saveElementScreenshot.mustache +9 -0
  38. package/docs/webapi/type.mustache +11 -6
  39. package/docs/wiki/{Community-Helpers.md → Community-Helpers-&-Plugins.md} +6 -2
  40. package/docs/wiki/Examples.md +11 -1
  41. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +68 -0
  42. package/docs/wiki/Home.md +9 -4
  43. package/docs/wiki/Release-Process.md +24 -0
  44. package/docs/wiki/Tests.md +1391 -0
  45. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +153 -0
  46. package/docs/wiki/Videos.md +3 -3
  47. package/lib/actor.js +1 -1
  48. package/lib/assert/empty.js +1 -1
  49. package/lib/assert/equal.js +1 -1
  50. package/lib/assert/include.js +1 -1
  51. package/lib/assert/truth.js +1 -1
  52. package/lib/codecept.js +2 -3
  53. package/lib/command/configMigrate.js +3 -5
  54. package/lib/command/definitions.js +1 -2
  55. package/lib/command/dryRun.js +1 -2
  56. package/lib/command/gherkin/init.js +1 -1
  57. package/lib/command/gherkin/snippets.js +3 -3
  58. package/lib/command/gherkin/steps.js +2 -3
  59. package/lib/command/info.js +1 -2
  60. package/lib/command/init.js +2 -2
  61. package/lib/command/interactive.js +1 -2
  62. package/lib/command/list.js +3 -4
  63. package/lib/command/run-multiple.js +2 -3
  64. package/lib/command/run-rerun.js +2 -4
  65. package/lib/command/run.js +1 -2
  66. package/lib/container.js +2 -2
  67. package/lib/data/context.js +1 -1
  68. package/lib/event.js +1 -1
  69. package/lib/helper/Appium.js +1 -2
  70. package/lib/helper/FileSystem.js +3 -3
  71. package/lib/helper/Mochawesome.js +1 -1
  72. package/lib/helper/Nightmare.js +54 -5
  73. package/lib/helper/Playwright.js +75 -17
  74. package/lib/helper/Protractor.js +26 -2
  75. package/lib/helper/Puppeteer.js +34 -2
  76. package/lib/helper/TestCafe.js +15 -0
  77. package/lib/helper/WebDriver.js +43 -11
  78. package/lib/helper/clientscripts/PollyWebDriverExt.js +1 -1
  79. package/lib/hooks.js +1 -2
  80. package/lib/interfaces/gherkin.js +0 -1
  81. package/lib/listener/helpers.js +1 -2
  82. package/lib/listener/mocha.js +0 -1
  83. package/lib/locator.js +2 -2
  84. package/lib/pause.js +1 -1
  85. package/lib/plugin/allure.js +1 -1
  86. package/lib/plugin/autoDelay.js +3 -3
  87. package/lib/plugin/autoLogin.js +1 -1
  88. package/lib/plugin/screenshotOnFail.js +2 -1
  89. package/lib/plugin/standardActingHelpers.js +0 -3
  90. package/lib/recorder.js +1 -1
  91. package/lib/step.js +3 -0
  92. package/lib/ui.js +1 -0
  93. package/package.json +3 -2
  94. package/translations/fr-FR.js +63 -0
  95. package/translations/index.js +5 -4
  96. package/typings/types.d.ts +140 -8
  97. package/docs/wiki/Release-process.md +0 -25
package/docs/videos.md CHANGED
@@ -6,14 +6,14 @@ title: Videos
6
6
  editLink: false
7
7
  ---
8
8
 
9
- > Add your own videos to our [Wiki Page](https://github.com/Codeception/CodeceptJS/wiki/Videos)
9
+ > Add your own videos to our [Wiki Page](https://github.com/codeceptjs/CodeceptJS/wiki/Videos)
10
10
  [![](http://i3.ytimg.com/vi/BRMWstiOTks/maxresdefault.jpg)](https://www.youtube.com/watch?v=BRMWstiOTks)
11
11
 
12
- * ## [An Introduction, Getting started and working with CodeceptJS & Puppeteer (EAWeekend)](https://www.youtube.com/watch?v=BRMWstiOTks)
12
+ ## [An Introduction, Getting started and working with CodeceptJS & Puppeteer (EAWeekend)](https://www.youtube.com/watch?v=BRMWstiOTks)
13
13
 
14
- * ## [CodeceptJS Official YouTube Channel](https://www.youtube.com/channel/UCEs4030bmtonyDhTHEXa_2g)
14
+ ## [CodeceptJS Official YouTube Channel](https://www.youtube.com/channel/UCEs4030bmtonyDhTHEXa_2g)
15
15
 
16
- * ## [Introductory Videos](https://www.youtube.com/watch?v=FPFG1rBNJ64&list=PLcFXthgti9Lt4SjSvL1ALDg6dOeTC0TvT)
16
+ ## [Introductory Videos](https://www.youtube.com/watch?v=FPFG1rBNJ64&list=PLcFXthgti9Lt4SjSvL1ALDg6dOeTC0TvT)
17
17
 
18
18
  Free educational videos provided by our community member **[@ontytoom](http://github.com/ontytoom)**.
19
19
 
@@ -0,0 +1,9 @@
1
+ Saves screenshot of the specified locator to ouput folder (set in codecept.json or codecept.conf.js).
2
+ Filename is relative to output folder.
3
+
4
+ ```js
5
+ I.saveElementScreenshot(`#submit`,'debug.png');
6
+ ```
7
+
8
+ @param {string|object} locator element located by CSS|XPath|strict locator.
9
+ @param {string} fileName file name to save.
@@ -1,12 +1,17 @@
1
-
2
- Types out the given string or the array of keys provided.
3
- _Note:_ Should only be used when using [`fillField`](#fillfield) is not an option.
1
+ Types out the given text into an active field.
2
+ To slow down typing use a second parameter, to set interval between key presses.
3
+ _Note:_ Should be used when [`fillField`](#fillfield) is not an option.
4
4
 
5
5
  ```js
6
- // When passing in a string
6
+ // passing in a string
7
7
  I.type('Type this out.');
8
- // When passing in an array
8
+
9
+ // typing values with a 100ms interval
10
+ I.type('4141555311111111', 100);
11
+
12
+ // passing in an array
9
13
  I.type(['T', 'E', 'X', 'T']);
10
14
  ```
11
15
 
12
- @param {string|string[]} key or array of keys to type.
16
+ @param {string|string[]} key or array of keys to type.
17
+ @param {?number} [delay=null] (optional) delay in ms between key presses
@@ -4,12 +4,13 @@ Please **add your own** by editing this page.
4
4
  ## Email Checking
5
5
 
6
6
  * [MailCatcher](https://gist.github.com/schmkr/026732dfa1627b927ff3a08dc31ee884) - to check emails via Mailcatcher locally.
7
+ * [codeceptjs-mailhog-helper](https://github.com/tsuemura/codeceptjs-mailhog-helper) - to check emails via Mailhog locally.
7
8
 
8
9
  ## Data Sources
9
10
 
10
11
  * [codeceptjs-httpmock](https://github.com/testphony/codeceptjs-httpMock) - a helper which wraps mockttp library to manage http mock in tests.
11
12
  * [codeceptjs-http](https://github.com/testphony/codeceptjs-http) - a helper which wraps then-request library to process HTTP requests. It's alternative helper that provides more flexible request management.
12
- * [codeceptjs-dbhelper](https://www.npmjs.com/package/codeceptjs-dbhelper) - allows you to execute queries or commands to databases using database-js.
13
+ * [codeceptjs-dbhelper](https://github.com/thiagodp/codeceptjs-dbhelper) - allows you to execute queries or commands to databases using database-js.
13
14
 
14
15
  ## Cloud Providers
15
16
  * [codeceptjs-saucehelper](https://github.com/puneet0191/codeceptjs-saucehelper/) - a helper which updates `Test Names` & `Test Results` on Saucelabs
@@ -24,7 +25,9 @@ Please **add your own** by editing this page.
24
25
  * [codeceptjs-applitoolshelper](https://www.npmjs.com/package/codeceptjs-applitoolshelper) - a helper which helps interaction with [Applitools](https://applitools.com)
25
26
 
26
27
  ## Reporters
27
- * [codeceptjs-rphelper](https://www.npmjs.com/package/codeceptjs-rphelper) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
28
+ * [codeceptjs-rphelper](https://github.com/reportportal/agent-js-codecept) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
29
+ * [codeceptjs-xray-helper](https://www.npmjs.com/package/codeceptjs-xray-helper) is a CodeceptJS helper which can publish tests results on [XRAY](https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST).
30
+ * [codeceptjs-slack-reporter](https://www.npmjs.com/package/codeceptjs-slack-reporter) Get a Slack notification when one or more scenarios fail.
28
31
 
29
32
  ## Page Object Code Generator
30
33
  * [codeceptjs-CodeGenerator](https://github.com/senthillkumar/CodeCeptJS-PageObject) is a CodeceptJS custom wrapper which can create page class with action methods from the page object file(JSON) and project setup(Folder Structure).
@@ -38,4 +41,5 @@ Please **add your own** by editing this page.
38
41
 
39
42
  ## Other
40
43
 
44
+ * [codeceptjs-cmdhelper](https://github.com/thiagodp/codeceptjs-cmdhelper) allows you to run commands in the terminal/console
41
45
  * [eslint-plugin-codeceptjs](https://www.npmjs.com/package/eslint-plugin-codeceptjs) Eslint rules for CodeceptJS.
@@ -135,4 +135,14 @@ This is a ready to use example that shows how to integrate CodeceptJS with Puppe
135
135
  * puppeteer helper example
136
136
  * test steps, pages, fragments
137
137
  * examples for sequential and parallel execution
138
- * generation of allure test results
138
+ * generation of allure test results
139
+
140
+ ## [Framework with UI and API test support : CodeceptJS , Puppeteer , REST , ESLint](https://github.com/avighub/CodeceptJS-puppeteer)
141
+ This is a basic framework with Puppeteer , REST helpers which can support both UI and API actions within same test.
142
+ More improvements and features will be added and will be updated.
143
+ Suggestions and improvements are welcome , please raise a ticket in Issue tab.
144
+
145
+ * Step by step setup in README
146
+ * Two helpers are added. UI - Puppeteer , API - REST and chai-codeceptJS for assetion
147
+ * ESLint for code check
148
+ * Upcoming : API generic functions , Adaptor design pattern , More utilities
@@ -0,0 +1,68 @@
1
+ ### About
2
+ GSoC is an international annual program in which Google awards stipends to university students who successfully complete a requested coding project during the summer.
3
+
4
+ Codecept-JS has decided to apply to participate in GSoC 2020, Please note that the final list of GSoC 2020 organizations will be announced on 22nd Feb 2020.
5
+
6
+ To read more about the program please visit [GSoC Program](https://summerofcode.withgoogle.com/)
7
+
8
+ The timeline for the program can be found on [Official Program Timeline](https://summerofcode.withgoogle.com/how-it-works/#timeline)
9
+
10
+ ### Contact Information
11
+
12
+ For all the students who are interested in working with Codecept-JS organization for GSoC 2020, you can start by reaching out to our organization team by posting your interest in our [Forum](https://codecept.discourse.group/)
13
+
14
+ Read about the Project on our [Official Project Website](https://codecept.io/)
15
+
16
+ You can also join our Community Slack, which is used for community conversation, our GSoC team will be available on slack, we will have dedicated channel for GSoC Students and Projects, join [here](http://bit.ly/chat-codeceptjs)
17
+
18
+ ### Student Information
19
+
20
+ If you are a student and are interested in participating, the following is useful information.
21
+
22
+ #### Proposal Guidelines
23
+ Before applying as a Codeceptjs Contributor, we suggest you review the points below. It can help you with creating a strong Proposal.
24
+
25
+ 1. Read about Codeceptjs on our [Official Website](https://codecept.io/)
26
+ 2. Setup Codeceptjs on your working system, and then Go through the list of open issues on our [Github Repo](https://github.com/Codeception/CodeceptJS/issues), try to help us with fixing some of them, or help in testing existing PR's from our developers.
27
+ 3. Go through the guides available on our official website, understand how our helpers work and check the list of current helpers on our organization [Github](https://github.com/codecept-js)
28
+
29
+ #### Application Template
30
+
31
+ If you are planning to send us a proposal, please make sure you have addressed the following elements:
32
+
33
+ 1. About you (your background, experience, education, hobbies)
34
+ 2. Project background (current state of what exist)
35
+ 3. Design/description of work
36
+ 4. Benefit of your work to the project users and developers
37
+ 5. Deliverables
38
+ 6. Scheduling
39
+ 7. Other commitments (i.e., exams, part time work, holidays, lectures, etc.)
40
+ 8. Community engagement (involvement, sample PR's, forum discussions, other open-source involvement)
41
+
42
+ ### Idea's for GSoC 2020
43
+
44
+ #### Improve Visual Testing Support in Codeceptjs
45
+ CodeceptJS has a visual testing helper which is based on resemble.js, instructions to set up and use the helper can be found [here](https://github.com/codecept-js/codeceptjs-resemblehelper)
46
+
47
+ We have several improvements we want to make to our helper, here is the list.
48
+ 1. Add Support for Allure Reporter
49
+ 2. Add Support for Visual Testing with [Codecept UI](https://codecept.io/ui/)
50
+ 3. Support for [Workers](https://codecept.io/parallel/)
51
+
52
+ Knowledge Prerequisite: Github, Nodejs, CodeceptJS, Resemble.js
53
+
54
+ Difficulty: Medium
55
+
56
+ Possible Mentors: Puneet Kala, Koushik Mohan
57
+
58
+ #### Improve Codecept UI
59
+ CodeceptJS has an interactive, graphical test runner, which is called CodeceptUI. It works on Browsers and helps in managing tests.
60
+ We need help with improving the CodeceptUI project, fixing existing issues.
61
+ 1. To get started, please read about CodeceptUI [here](https://codecept.io/ui/)
62
+ 2. To get your hands on the code, you can check out the Repo [here](https://github.com/codecept-js/ui), look at the list of open issues and start with fixing them.
63
+
64
+ Knowledge Prerequisite: Github, CodeceptJS, JS, VueJS, Express.js, WebSockets, NodeJS
65
+
66
+ Difficulty: Medium
67
+
68
+ Possible Mentors: Michael Bodnarchuk, Paul
package/docs/wiki/Home.md CHANGED
@@ -1,11 +1,16 @@
1
- Welcome to the CodeceptJS wiki!
1
+ Wiki Pages contain community content which is partly copied into the website.
2
2
 
3
- Some useful links:
3
+ * :toolbox: [Community Helpers & Plugins](https://github.com/codeceptjs/CodeceptJS/wiki/Community-Helpers-&-Plugins) - collection of community-driven plugins and helpers (synced with website).
4
+ * :eyes: [Examples](https://github.com/codeceptjs/CodeceptJS/wiki/Examples) - collection of CodeceptJS sample projects (synced with website).
5
+ * :book: [Books & Posts](https://github.com/Codeception/CodeceptJS/wiki/Books-&-Posts) - posts about CodeceptJS (synced with website).
6
+ * :tv: [Videos](https://github.com/codeceptjs/CodeceptJS/wiki/Videos) - videos on CodeceptJS (synced with website).
7
+ Add your own entries to these lists.
8
+
9
+ Other useful links:
4
10
  * [Official Site](http://codecept.io)
5
11
  * [Roadmap](https://github.com/Codeception/CodeceptJS/wiki/Roadmap)
6
- * [Books & Posts](https://github.com/Codeception/CodeceptJS/wiki/Books-&-Posts)
7
- * [Community Helpers](https://github.com/Codeception/CodeceptJS/wiki/Community-Helpers)
8
12
  * [Code on Github](https://github.com/Codeception/CodeceptJS)
9
13
  * [Change log](https://github.com/Codeception/CodeceptJS/blob/master/CHANGELOG.md)
14
+ * [GSoC](https://github.com/Codeception/CodeceptJS/wiki/Google-Summer-of-Code-(GSoC)-2020)
10
15
 
11
16
 
@@ -0,0 +1,24 @@
1
+ This is the guide for maintainers:
2
+
3
+ ## Release Process
4
+
5
+ 1. Pull the latest changes from master
6
+ 2. Create a branch `release-x.x.x` and switch to it `git checkout -b release-x.x.x`
7
+ 3. Update version in `package.json`
8
+ 4. Go through the commits for the new release and add them to the CHANGELOG.md:
9
+ * Changelog should be written for humans (not for robots).
10
+ * Use simple wording explaining what the change is, how to use a new feature (maybe with a code example) and mention the related issue.
11
+ * When using `#123` a link for issue #123 will be automatically added.
12
+ * A contributor must be mentioned. We use GitHub names with `@` prefix. A link to user profile is automatically added.
13
+ 5. Run `./runio.js docs` to build documentation
14
+ 6. Commit all changes, push and create a PR
15
+ 7. Check that all tests pass and merge your PR
16
+ 8. Run `./runio.js release` to publish latest release. The website will be updated.
17
+ * To update version for patch release: `./runio.js release patch`
18
+ * To update version for minor release: `./runio.js release minor`
19
+ 9. Post announcements in Twitter & Slack
20
+
21
+ ## Updating the website
22
+
23
+ * Run `./runio.js docs:helpers` to build docs from helpers
24
+ * Run `./runio.js publish:site` to update a website