codeceptjs 2.3.4 → 2.4.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 (269) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +28 -6
  3. package/bin/codecept.js +42 -0
  4. package/docs/advanced.md +45 -1
  5. package/docs/angular.md +3 -3
  6. package/docs/basics.md +162 -118
  7. package/docs/bdd.md +30 -5
  8. package/docs/best.md +8 -6
  9. package/docs/books.md +6 -1
  10. package/docs/build/Appium.js +95 -85
  11. package/docs/build/FileSystem.js +48 -3
  12. package/docs/build/GraphQL.js +3 -2
  13. package/docs/build/GraphQLDataFactory.js +1 -0
  14. package/docs/build/Mochawesome.js +3 -2
  15. package/docs/build/MockRequest.js +23 -5
  16. package/docs/build/Nightmare.js +87 -128
  17. package/docs/build/Protractor.js +107 -155
  18. package/docs/build/Puppeteer.js +190 -174
  19. package/docs/build/REST.js +13 -9
  20. package/docs/build/SeleniumWebdriver.js +0 -17
  21. package/docs/build/TestCafe.js +164 -158
  22. package/docs/build/WebDriver.js +236 -211
  23. package/docs/build/WebDriverIO.js +218 -187
  24. package/docs/changelog.md +57 -1
  25. package/docs/commands.md +41 -2
  26. package/docs/community-helpers.md +12 -1
  27. package/docs/configuration.md +5 -2
  28. package/docs/continuous-integration.md +22 -0
  29. package/docs/{helpers.md → custom-helpers.md} +16 -10
  30. package/docs/data.md +7 -6
  31. package/docs/detox.md +6 -6
  32. package/docs/email.md +4 -2
  33. package/docs/examples.md +22 -3
  34. package/docs/helpers/ApiDataFactory.md +15 -13
  35. package/docs/helpers/Appium.md +1011 -468
  36. package/docs/helpers/Detox.md +33 -26
  37. package/docs/helpers/FileSystem.md +43 -13
  38. package/docs/helpers/GraphQL.md +17 -15
  39. package/docs/helpers/GraphQLDataFactory.md +15 -13
  40. package/docs/helpers/Mochawesome.md +3 -1
  41. package/docs/helpers/MockRequest.md +37 -19
  42. package/docs/helpers/Nightmare.md +129 -240
  43. package/docs/helpers/Polly.md +1 -1
  44. package/docs/helpers/Protractor.md +157 -298
  45. package/docs/helpers/Puppeteer.md +216 -335
  46. package/docs/helpers/REST.md +29 -24
  47. package/docs/helpers/TestCafe.md +137 -235
  48. package/docs/helpers/WebDriver.md +250 -347
  49. package/docs/hooks.md +14 -10
  50. package/docs/index.md +112 -0
  51. package/docs/installation.md +3 -1
  52. package/docs/locators.md +19 -8
  53. package/docs/mobile-react-native-locators.md +2 -2
  54. package/docs/mobile.md +5 -3
  55. package/docs/nightmare.md +2 -1
  56. package/docs/pageobjects.md +4 -2
  57. package/docs/parallel.md +4 -2
  58. package/docs/plugins.md +41 -15
  59. package/docs/puppeteer.md +8 -6
  60. package/docs/quickstart.md +130 -0
  61. package/docs/react.md +4 -2
  62. package/docs/reports.md +6 -4
  63. package/docs/testcafe.md +10 -8
  64. package/docs/translation.md +4 -2
  65. package/docs/ui.md +56 -0
  66. package/docs/videos.md +11 -2
  67. package/docs/visual.md +7 -5
  68. package/docs/vue.md +121 -0
  69. package/docs/webapi/appendField.mustache +1 -1
  70. package/docs/webapi/attachFile.mustache +1 -1
  71. package/docs/webapi/checkOption.mustache +2 -2
  72. package/docs/webapi/clearCookie.mustache +1 -1
  73. package/docs/webapi/click.mustache +2 -2
  74. package/docs/webapi/clickLink.mustache +2 -2
  75. package/docs/webapi/dontSee.mustache +1 -2
  76. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  77. package/docs/webapi/dontSeeElement.mustache +1 -1
  78. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  79. package/docs/webapi/dontSeeInField.mustache +1 -1
  80. package/docs/webapi/doubleClick.mustache +2 -2
  81. package/docs/webapi/downloadFile.mustache +1 -1
  82. package/docs/webapi/dragSlider.mustache +1 -1
  83. package/docs/webapi/executeAsyncScript.mustache +2 -1
  84. package/docs/webapi/executeScript.mustache +2 -1
  85. package/docs/webapi/fillField.mustache +1 -1
  86. package/docs/webapi/grabAttributeFrom.mustache +1 -1
  87. package/docs/webapi/grabBrowserLogs.mustache +1 -1
  88. package/docs/webapi/grabCookie.mustache +2 -2
  89. package/docs/webapi/grabCssPropertyFrom.mustache +1 -1
  90. package/docs/webapi/grabHTMLFrom.mustache +1 -1
  91. package/docs/webapi/grabNumberOfVisibleElements.mustache +1 -1
  92. package/docs/webapi/grabPageScrollPosition.mustache +1 -1
  93. package/docs/webapi/grabTextFrom.mustache +2 -2
  94. package/docs/webapi/grabValueFrom.mustache +1 -1
  95. package/docs/webapi/moveCursorTo.mustache +3 -3
  96. package/docs/webapi/pressKey.mustache +1 -1
  97. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  98. package/docs/webapi/rightClick.mustache +2 -2
  99. package/docs/webapi/saveScreenshot.mustache +1 -1
  100. package/docs/webapi/scrollIntoView.mustache +10 -0
  101. package/docs/webapi/scrollTo.mustache +3 -3
  102. package/docs/webapi/see.mustache +1 -1
  103. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  104. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  105. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  106. package/docs/webapi/seeElement.mustache +1 -1
  107. package/docs/webapi/seeElementInDOM.mustache +1 -1
  108. package/docs/webapi/seeInField.mustache +1 -1
  109. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  110. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  111. package/docs/webapi/seeTextEquals.mustache +8 -0
  112. package/docs/webapi/selectOption.mustache +2 -2
  113. package/docs/webapi/switchTo.mustache +1 -1
  114. package/docs/webapi/uncheckOption.mustache +2 -2
  115. package/docs/webapi/waitForClickable.mustache +10 -0
  116. package/docs/webapi/waitForDetached.mustache +2 -2
  117. package/docs/webapi/waitForElement.mustache +2 -2
  118. package/docs/webapi/waitForEnabled.mustache +2 -2
  119. package/docs/webapi/waitForFunction.mustache +2 -2
  120. package/docs/webapi/waitForInvisible.mustache +2 -2
  121. package/docs/webapi/waitForText.mustache +2 -2
  122. package/docs/webapi/waitForValue.mustache +1 -1
  123. package/docs/webapi/waitForVisible.mustache +2 -2
  124. package/docs/webapi/waitInUrl.mustache +1 -1
  125. package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -2
  126. package/docs/webapi/waitToHide.mustache +2 -2
  127. package/docs/webapi/waitUntil.mustache +3 -2
  128. package/docs/webapi/waitUrlEquals.mustache +1 -1
  129. package/docs/webdriver.md +20 -18
  130. package/docs/wiki/.git/FETCH_HEAD +1 -0
  131. package/docs/wiki/.git/HEAD +1 -0
  132. package/docs/wiki/.git/ORIG_HEAD +1 -0
  133. package/docs/wiki/.git/config +11 -0
  134. package/docs/wiki/.git/description +1 -0
  135. package/docs/wiki/.git/hooks/applypatch-msg.sample +15 -0
  136. package/docs/wiki/.git/hooks/commit-msg.sample +24 -0
  137. package/docs/wiki/.git/hooks/fsmonitor-watchman.sample +114 -0
  138. package/docs/wiki/.git/hooks/post-update.sample +8 -0
  139. package/docs/wiki/.git/hooks/pre-applypatch.sample +14 -0
  140. package/docs/wiki/.git/hooks/pre-commit.sample +49 -0
  141. package/docs/wiki/.git/hooks/pre-push.sample +53 -0
  142. package/docs/wiki/.git/hooks/pre-rebase.sample +169 -0
  143. package/docs/wiki/.git/hooks/pre-receive.sample +24 -0
  144. package/docs/wiki/.git/hooks/prepare-commit-msg.sample +42 -0
  145. package/docs/wiki/.git/hooks/update.sample +128 -0
  146. package/docs/wiki/.git/index +0 -0
  147. package/docs/wiki/.git/info/exclude +6 -0
  148. package/docs/wiki/.git/logs/HEAD +4 -0
  149. package/docs/wiki/.git/logs/refs/heads/master +4 -0
  150. package/docs/wiki/.git/logs/refs/remotes/origin/HEAD +1 -0
  151. package/docs/wiki/.git/logs/refs/remotes/origin/master +3 -0
  152. package/docs/wiki/.git/objects/00/d216b0774d15db2d0a2a0d4ce249b5251acc55 +3 -0
  153. package/docs/wiki/.git/objects/09/01d87c5241905fdfe3493cfe8f04df4a2685ea +0 -0
  154. package/docs/wiki/.git/objects/0d/bdd0c20c4deb6a8cc81dbbf32ecf8c09238983 +2 -0
  155. package/docs/wiki/.git/objects/1a/c29e4fa82422c52392f22f0f2b8d1a759535bf +0 -0
  156. package/docs/wiki/.git/objects/27/12f92898d3e8f68e229b6cda76570d6c66d781 +0 -0
  157. package/docs/wiki/.git/objects/2d/dbe22c257166b648928eeb9460ecfb71ba702d +0 -0
  158. package/docs/wiki/.git/objects/2f/c942ec3773efd2678d9ff98035c61fcded81a1 +0 -0
  159. package/docs/wiki/.git/objects/40/a2856342c67796b48911a256b764fb06888b94 +5 -0
  160. package/docs/wiki/.git/objects/47/53181844fc4dc563cf3aa5e80462243cb58d38 +0 -0
  161. package/docs/wiki/.git/objects/4e/24a95fb2e4f8ffef51f19b694451a205c06f10 +3 -0
  162. package/docs/wiki/.git/objects/73/31ebd96f3c7e08a9f63f05a25f939afa0d4de1 +0 -0
  163. package/docs/wiki/.git/objects/86/19cbb2289caa502e33fccf0ed14eecf6ba2ba0 +0 -0
  164. package/docs/wiki/.git/objects/a4/72f797d9d74b87c9f71a2b1539d75bb07d1e35 +0 -0
  165. package/docs/wiki/.git/objects/c9/9f3e4bd227d6b050b2e416f9876df49583dbf6 +0 -0
  166. package/docs/wiki/.git/objects/ca/e609b4ef3e0ef85fcbe0d68d1a58246584b915 +0 -0
  167. package/docs/wiki/.git/objects/d5/8386ca72f6d550548f3d71d74e3ac73d5ad488 +0 -0
  168. package/docs/wiki/.git/objects/d9/c6874a6de524bdafeb563a20d847f4fdd59a86 +0 -0
  169. package/docs/wiki/.git/objects/f1/c944675bb38b40ae553b0be36c14674c79af54 +0 -0
  170. package/docs/wiki/.git/objects/pack/pack-28da0fc7e6c08d4c5350717bfbb7b1c53e8198ad.idx +0 -0
  171. package/docs/wiki/.git/objects/pack/pack-28da0fc7e6c08d4c5350717bfbb7b1c53e8198ad.pack +0 -0
  172. package/docs/wiki/.git/packed-refs +2 -0
  173. package/docs/wiki/.git/refs/heads/master +1 -0
  174. package/docs/wiki/.git/refs/remotes/origin/HEAD +1 -0
  175. package/docs/wiki/.git/refs/remotes/origin/master +1 -0
  176. package/docs/wiki/Books-&-Posts.md +27 -0
  177. package/docs/wiki/Community-Helpers.md +41 -0
  178. package/docs/wiki/Examples.md +138 -0
  179. package/docs/wiki/Home.md +11 -0
  180. package/docs/wiki/Release-process.md +25 -0
  181. package/docs/wiki/Roadmap.md +23 -0
  182. package/docs/wiki/Videos.md +19 -0
  183. package/lib/actor.js +18 -1
  184. package/lib/assert/error.js +3 -3
  185. package/lib/codecept.js +9 -6
  186. package/lib/command/configMigrate.js +7 -6
  187. package/lib/command/definitions.js +98 -350
  188. package/lib/command/generate.js +22 -17
  189. package/lib/command/gherkin/init.js +2 -1
  190. package/lib/command/gherkin/snippets.js +6 -6
  191. package/lib/command/gherkin/steps.js +0 -1
  192. package/lib/command/info.js +40 -0
  193. package/lib/command/init.js +54 -41
  194. package/lib/command/run-multiple.js +5 -4
  195. package/lib/command/run-rerun.js +39 -0
  196. package/lib/command/run-workers.js +4 -6
  197. package/lib/command/run.js +8 -18
  198. package/lib/command/utils.js +23 -2
  199. package/lib/command/workers/runTests.js +1 -2
  200. package/lib/config.js +10 -4
  201. package/lib/container.js +31 -6
  202. package/lib/data/dataTableArgument.js +31 -0
  203. package/lib/data/table.js +4 -0
  204. package/lib/event.js +65 -1
  205. package/lib/helper/Appium.js +52 -38
  206. package/lib/helper/FileSystem.js +48 -3
  207. package/lib/helper/GraphQL.js +3 -2
  208. package/lib/helper/GraphQLDataFactory.js +1 -0
  209. package/lib/helper/Mochawesome.js +3 -2
  210. package/lib/helper/MockRequest.js +23 -5
  211. package/lib/helper/Nightmare.js +5 -6
  212. package/lib/helper/Protractor.js +7 -8
  213. package/lib/helper/Puppeteer.js +76 -20
  214. package/lib/helper/REST.js +13 -9
  215. package/lib/helper/SeleniumWebdriver.js +0 -17
  216. package/lib/helper/TestCafe.js +84 -36
  217. package/lib/helper/WebDriver.js +113 -59
  218. package/lib/helper/WebDriverIO.js +43 -59
  219. package/lib/helper/clientscripts/nightmare.js +66 -4
  220. package/lib/helper/scripts/isElementClickable.js +24 -0
  221. package/lib/helper.js +34 -10
  222. package/lib/history.js +1 -1
  223. package/lib/hooks.js +2 -1
  224. package/lib/index.js +19 -0
  225. package/lib/interfaces/bdd.js +4 -0
  226. package/lib/interfaces/featureConfig.js +10 -3
  227. package/lib/interfaces/gherkin.js +6 -2
  228. package/lib/interfaces/scenarioConfig.js +17 -6
  229. package/lib/listener/config.js +1 -1
  230. package/lib/listener/exit.js +6 -0
  231. package/lib/listener/steps.js +0 -1
  232. package/lib/listener/trace.js +0 -1
  233. package/lib/locator.js +67 -2
  234. package/lib/output.js +53 -0
  235. package/lib/parser.js +2 -71
  236. package/lib/pause.js +3 -2
  237. package/lib/plugin/allure.js +41 -22
  238. package/lib/plugin/autoLogin.js +4 -1
  239. package/lib/plugin/pauseOnFail.js +38 -0
  240. package/lib/plugin/puppeteerCoverage.js +8 -7
  241. package/lib/plugin/screenshotOnFail.js +13 -8
  242. package/lib/plugin/stepByStepReport.js +7 -6
  243. package/lib/plugin/wdio.js +2 -1
  244. package/lib/recorder.js +85 -7
  245. package/lib/rerun.js +81 -0
  246. package/lib/secret.js +6 -0
  247. package/lib/session.js +9 -2
  248. package/lib/step.js +37 -2
  249. package/lib/store.js +5 -1
  250. package/lib/ui.js +34 -8
  251. package/lib/utils.js +6 -13
  252. package/lib/within.js +5 -0
  253. package/package.json +49 -29
  254. package/typings/Mocha.d.ts +21 -0
  255. package/typings/Protractor.d.ts +16 -0
  256. package/typings/index.d.ts +169 -0
  257. package/typings/jsdoc.conf.js +34 -0
  258. package/typings/jsdoc.namespace.js +29 -0
  259. package/typings/types.d.ts +9827 -0
  260. package/typings/utils.d.ts +7 -0
  261. package/docs/acceptance.md +0 -409
  262. package/docs/api/codecept.md +0 -75
  263. package/docs/api/config.md +0 -49
  264. package/docs/api/container.md +0 -66
  265. package/docs/api/helper.md +0 -116
  266. package/docs/api/output.md +0 -67
  267. package/docs/api/recorder.md +0 -63
  268. package/docs/helpers/SeleniumWebdriver.md +0 -92
  269. package/docs/helpers/WebDriverIO.md +0 -1671
@@ -0,0 +1,138 @@
1
+ ## [TodoMVC Examples](https://github.com/codecept-js/examples)
2
+
3
+ ![](https://github.com/codecept-js/examples/raw/master/todo.png)
4
+
5
+ Playground repository where you can run tests in different helpers on a basic single-page website.
6
+
7
+ Tests repository demonstrate usage of
8
+
9
+ * Puppeteer helper
10
+ * WebDriver helper
11
+ * TestCafe plugin
12
+ * Toggle headless mode with env variables
13
+ * PageObjects
14
+ * Cucumber syntax
15
+
16
+ ## [Basic Examples](https://github.com/Codeception/CodeceptJS/tree/master/examples)
17
+
18
+ CodeceptJS repo contains basic tests (both failing and passing) just to show how it works.
19
+ Our team uses it to test new features and run simple scenarios.
20
+
21
+
22
+ ## [Testing Single Page Application](https://github.com/bugiratracker/codeceptjs-demo)
23
+
24
+ ![](https://user-images.githubusercontent.com/220264/56353972-56975080-61db-11e9-8b23-06e8b4620995.png)
25
+
26
+ End 2 end tests for [Bugira Bugtracker](https://bugira.com) app built with Rails & EmberJS. Bugira is a SaaS application that helps collecting users' feedbacks and transforming them into professional bug reports.
27
+
28
+ Tests repository demonstrate usage of
29
+
30
+ * Puppeteer helper
31
+ * ApiDataFactory helper
32
+ * autoLogin plugin
33
+ * Dynamic config with profiles
34
+
35
+ ## [Practical E2E Tests](https://gitlab.com/paulvincent/codeceptjs-e2e-testing)
36
+
37
+ Examples from the book [Practical End 2 End Testing with CodeceptJS](https://leanpub.com/codeceptjs/) by **Paul Vincent Beigang**.
38
+
39
+ This repository demonstrates usage of:
40
+
41
+ * dynamic config with profiles
42
+ * testing WYSIWYG editor
43
+ * GitLab CI
44
+
45
+ ## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
46
+
47
+ This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
48
+
49
+ * CodecepJS-Cucumber E2E Framework
50
+ * Saucelabs Integration
51
+ * Run Cross Browser tests in Parallel on SauceLabs with a simple command
52
+ * Run tests on `chrome:headless`
53
+ * Page Objects
54
+ * `Should.js` Assertion Library
55
+ * Uses `wdio` service (selenium-standalone, sauce)
56
+ * Allure HTML Reports
57
+ * Uses shared Master configuration
58
+ * Sample example and feature files of GitHub Features
59
+
60
+ ## [Amazon Tests v2](https://gitlab.com/thanhnguyendh/codeceptjs-wdio-services)
61
+
62
+ Testing Amazon website using Selenium WebDriver.
63
+
64
+ This repository demonstrates usage of:
65
+
66
+ * WebDriver helper
67
+ * Page Objects
68
+ * wdio services (selenium-standalone)
69
+ * Parallel execution
70
+ * GitLab CI setup
71
+
72
+ ## [Amazon Tests v1](https://github.com/PeterNgTr/amazon-ui-tests)
73
+
74
+ Previous version of Amazon Tests, still valid but quite different.
75
+
76
+ This repository demonstrates usage of:
77
+
78
+ * WebDriver helper
79
+ * Page Objects
80
+ * Bootstrap and teardown
81
+ * Parallel execution
82
+
83
+ ## [Tests with Docker Compose](https://github.com/mathesouza/codeceptjs-docker-compose)
84
+
85
+ Running CodeceptJS tests with Docker Compose
86
+
87
+ This repository demonstrates usage of:
88
+
89
+ * CodeceptJS Docker image
90
+ * WebDriver helper
91
+ * Allure plugin
92
+
93
+
94
+ ## [ModusCreate Tests](https://github.com/ModusCreateOrg/codeceptjs-nightmare-harness)
95
+
96
+ Test automation by ModusCreate agency with NightmareJS.
97
+
98
+ This repository demonstrates usage of:
99
+
100
+ * Nightmare helper
101
+ * Reports with Mochawesome
102
+ * Docker
103
+ * Page objects and page fragments
104
+
105
+ ## [AngularJS Example Tests](https://github.com/armno/angular-e2e-codeceptjs-example)
106
+
107
+ Based on [Setting up End-to-End Testing in Angular Project with CodeceptJS](https://medium.com/@armno/setting-up-end-to-end-testing-in-angular-project-with-codeceptjs-ac1784de3420) post by Armno Prommarak.
108
+
109
+ This repository demonstrates usage of
110
+
111
+ * Puppeteer helper
112
+ * Working with Angular CLI
113
+ * Reports with Mochawesome helper
114
+
115
+ ## [REST Example Tests](https://github.com/PeterNgTr/codeceptjs-rest-demo)
116
+
117
+ This repository demonstrates usage of
118
+
119
+ * REST helper
120
+
121
+ ## [Automation Starter](https://github.com/sjorrillo/automation-starter)
122
+
123
+ The purpose of this application is for learning the basics and how to use good practices and useful tools in automation.
124
+
125
+ * Puppeteer helper
126
+ * Working with gherkin, also it has type definitions and to be able to use them inside when, given and then make sure you add `declare function inject(): { I: CodeceptJS.I, [key: string]: any; };`in the `steps.d.ts`file
127
+ * Linting `airbnb-base`, `codeceptjs/codeceptjs` and full ES6 support
128
+
129
+ ## [Example for using: Puppeteer, Gherkin, Allure with parallel execution](https://github.com/SchnuckySchuster/codeceptJSExample)
130
+
131
+ This is a ready to use example that shows how to integrate CodeceptJS with Puppeteer and Allure as reporting tool.
132
+
133
+ * detailed ReadMe
134
+ * tests written in cucumber alongside tests written in the codeceptJS DSL
135
+ * puppeteer helper example
136
+ * test steps, pages, fragments
137
+ * examples for sequential and parallel execution
138
+ * generation of allure test results
@@ -0,0 +1,11 @@
1
+ Welcome to the CodeceptJS wiki!
2
+
3
+ Some useful links:
4
+ * [Official Site](http://codecept.io)
5
+ * [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
+ * [Code on Github](https://github.com/Codeception/CodeceptJS)
9
+ * [Change log](https://github.com/Codeception/CodeceptJS/blob/master/CHANGELOG.md)
10
+
11
+
@@ -0,0 +1,25 @@
1
+ This is the guide for maintainers:
2
+
3
+ ## Release Process
4
+
5
+ 1. pull in the latest changes from master
6
+ 2. create branch `release-x.x.x` and switch to it
7
+ 3. update version in `package.json`
8
+ 4. go through commits in this release and write a changelog.
9
+ * Changelog should be written not for robots!
10
+ * Use simple wording explaining what a change was, how to use a new feature (maybe with a code example), and mention a 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 make PR
15
+ 7. check that all tests pass and merge your PR
16
+ 8. run `./runio.js release` to publish latest release. A website will be updated.
17
+ * to update version for patch release: `./runio release patch`
18
+ * to update version for minor release: `./runio release minor`
19
+ 9. Post announcements in Twitter & Slack
20
+
21
+ ## Updating a website
22
+
23
+ * Run `./runio.js docs:helpers` to build docs from helpers
24
+ * Run `./runio.js publish:site` to update a website
25
+
@@ -0,0 +1,23 @@
1
+ [Upcoming releases](https://github.com/Codeception/CodeceptJS/projects)
2
+
3
+ ## Backlog
4
+
5
+ * Shadow-DOM locator integration with webdriverio 5.x
6
+ * Cypress integration
7
+ * Reuse a single browser session while writing tests
8
+
9
+ ---
10
+
11
+ ## Done
12
+
13
+ To make those features implemented, consider [sponsoring CodeceptJS](https://github.com/Codeception/CodeceptJS/issues/1462).
14
+
15
+ * ~GraphQL helper~
16
+ * ~Cypress-like Development mode:~
17
+ * ~UI for selecting and executing tests~
18
+ * ~[Detox](https://github.com/wix/Detox) integration for React Native and mobile testing~
19
+ * ~TestCafe integration~
20
+ * ~Parallel execution via workers (improves CPU consumation, reporting)~
21
+ * ~Mock Request/Response in Puppeteer helper via [PollyJS](https://github.com/Netflix/pollyjs).~
22
+ * Update BDD/Gherkin support to Gherkin version 6 specification
23
+ * [See Version 6.0.13](https://github.com/cucumber/cucumber/blob/master/gherkin/CHANGELOG.md#6013---2018-09-25)
@@ -0,0 +1,19 @@
1
+ [![](http://i3.ytimg.com/vi/BRMWstiOTks/maxresdefault.jpg)](https://www.youtube.com/watch?v=BRMWstiOTks)
2
+
3
+ * ## [An Introduction, Getting started and working with CodeceptJS & Puppeteer (EAWeekend)](https://www.youtube.com/watch?v=BRMWstiOTks)
4
+
5
+ * ## [CodeceptJS Official YouTube Channel](https://www.youtube.com/channel/UCEs4030bmtonyDhTHEXa_2g)
6
+
7
+ * ## [Introductory Videos](https://www.youtube.com/watch?v=FPFG1rBNJ64&list=PLcFXthgti9Lt4SjSvL1ALDg6dOeTC0TvT)
8
+
9
+ Free educational videos provided by our community member **[@ontytoom](http://github.com/ontytoom)**.
10
+
11
+ 1. [Installation](https://www.youtube.com/watch?v=FPFG1rBNJ64)
12
+ 1. [Creating a Test](https://www.youtube.com/watch?v=mdQZjL3h9d0)
13
+ 1. [Using Page Objects](https://www.youtube.com/watch?v=s677_6VctjQ)
14
+
15
+ ## [Practical E2E Testing with CodeceptJS](https://www.udemy.com/practical-e2e-testing-with-codeceptjs/)
16
+
17
+ Udemy course by Luke Beilharz
18
+
19
+
package/lib/actor.js CHANGED
@@ -9,8 +9,13 @@ const output = require('./output');
9
9
  * Fetches all methods from all enabled helpers,
10
10
  * and makes them available to use from I. object
11
11
  * Wraps helper methods into promises.
12
+ * @ignore
12
13
  */
13
14
  module.exports = function (obj) {
15
+ /**
16
+ * @interface
17
+ * @alias ActorStatic
18
+ */
14
19
  obj = obj || {};
15
20
 
16
21
  const helpers = container.helpers();
@@ -36,11 +41,23 @@ module.exports = function (obj) {
36
41
  });
37
42
  });
38
43
 
39
- // add print comment method`
44
+ /**
45
+ * add print comment method`
46
+ * @param {string} msg
47
+ * @param {string} color
48
+ * @return {Promise<any> | undefined}
49
+ * @inner
50
+ */
40
51
  obj.say = (msg, color = 'cyan') => recorder.add(`say ${msg}`, () => {
41
52
  event.emit(event.step.comment, msg);
42
53
  output.say(msg, `${color}`);
43
54
  });
55
+ /**
56
+ * @function
57
+ * @param {*} opts
58
+ * @return {this}
59
+ * @inner
60
+ */
44
61
  obj.retry = retryStep;
45
62
 
46
63
  return obj;
@@ -11,9 +11,9 @@ function AssertionFailedError(params, template) {
11
11
  // this.message = "AssertionFailedError";
12
12
  let stack = new Error().stack;
13
13
  // this.showDiff = true;
14
- stack = stack ? stack.split('\n').filter(line =>
15
- // @todo cut assert things nicer
16
- line.indexOf('lib/assert') < 0).join('\n') : '';
14
+
15
+ // @todo cut assert things nicer
16
+ stack = stack ? stack.split('\n').filter(line => line.indexOf('lib/assert') < 0).join('\n') : '';
17
17
  this.showDiff = true;
18
18
 
19
19
  this.actual = this.params.actual;
package/lib/codecept.js CHANGED
@@ -1,12 +1,14 @@
1
- const fsPath = require('path');
1
+ const existsSync = require('fs').existsSync;
2
2
  const readFileSync = require('fs').readFileSync;
3
+ const glob = require('glob');
4
+ const fsPath = require('path');
5
+ const resolve = require('path').resolve;
6
+
3
7
  const container = require('./container');
4
8
  const Config = require('./config');
5
9
  const event = require('../lib/event');
6
- const glob = require('glob');
7
10
  const runHook = require('./hooks');
8
- const existsSync = require('fs').existsSync;
9
- const resolve = require('path').resolve;
11
+ const output = require('./output');
10
12
 
11
13
  /**
12
14
  * CodeceptJS runner
@@ -29,7 +31,7 @@ class Codecept {
29
31
  /**
30
32
  * Require modules before codeceptjs running
31
33
  *
32
- * @param {[string]} requiringModules
34
+ * @param {string[]} requiringModules
33
35
  */
34
36
  requireModules(requiringModules) {
35
37
  if (requiringModules) {
@@ -104,7 +106,7 @@ class Codecept {
104
106
  * Executes bootstrap.
105
107
  * If bootstrap is async, second parameter is required.
106
108
  *
107
- * @param {() => any} [done]
109
+ * @param {Function} [done]
108
110
  */
109
111
  runBootstrap(done) {
110
112
  runHook(this.config.bootstrap, done, 'bootstrap');
@@ -171,6 +173,7 @@ class Codecept {
171
173
  mocha.run(() => this.teardown(done));
172
174
  } catch (e) {
173
175
  this.teardown(done);
176
+ output.error(e.stack);
174
177
  throw new Error(e);
175
178
  }
176
179
  }
@@ -1,15 +1,16 @@
1
- const print = require('../output').print;
2
- const success = require('../output').success;
3
- const error = require('../output').error;
4
1
  const colors = require('chalk');
5
2
  const fs = require('fs');
6
- const path = require('path');
7
- const fileExists = require('../utils').fileExists;
8
3
  const inquirer = require('inquirer');
9
- const getTestRoot = require('./utils').getTestRoot;
10
4
  const mkdirp = require('mkdirp');
5
+ const path = require('path');
11
6
  const util = require('util');
12
7
 
8
+ const print = require('../output').print;
9
+ const success = require('../output').success;
10
+ const error = require('../output').error;
11
+ const fileExists = require('../utils').fileExists;
12
+ const getTestRoot = require('./utils').getTestRoot;
13
+
13
14
  module.exports = function (initPath) {
14
15
  const testsPath = getTestRoot(initPath);
15
16