codeceptjs 2.1.3 → 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 +125 -37
- package/README.md +15 -22
- package/bin/codecept.js +4 -1
- package/docs/acceptance.md +44 -1
- package/docs/advanced.md +1 -1
- package/docs/angular.md +6 -9
- package/docs/basics.md +388 -75
- package/docs/bdd.md +4 -3
- package/docs/best.md +1 -1
- package/docs/books.md +31 -0
- package/docs/build/Appium.js +215 -176
- package/docs/build/Nightmare.js +618 -489
- package/docs/build/Polly.js +189 -0
- package/docs/build/Protractor.js +747 -608
- package/docs/build/Puppeteer.js +914 -633
- package/docs/build/REST.js +1 -1
- package/docs/build/TestCafe.js +1835 -0
- package/docs/build/WebDriver.js +861 -805
- package/docs/build/WebDriverIO.js +616 -617
- package/docs/changelog.md +410 -316
- package/docs/commands.md +6 -6
- package/docs/community-helpers.md +2 -0
- package/docs/detox.md +235 -0
- package/docs/examples.md +23 -0
- package/docs/helpers/ApiDataFactory.md +11 -10
- package/docs/helpers/Appium.md +130 -61
- package/docs/helpers/Detox.md +579 -0
- package/docs/helpers/FileSystem.md +2 -1
- package/docs/helpers/Mochawesome.md +1 -0
- package/docs/helpers/Nightmare.md +348 -128
- package/docs/helpers/Polly.md +85 -0
- package/docs/helpers/Protractor.md +451 -184
- package/docs/helpers/Puppeteer-firefox.md +55 -0
- package/docs/helpers/Puppeteer.md +619 -183
- package/docs/helpers/REST.md +17 -16
- package/docs/helpers/SeleniumWebdriver.md +9 -8
- package/docs/helpers/TestCafe.md +1168 -0
- package/docs/helpers/WebDriver.md +600 -291
- package/docs/helpers/WebDriverIO.md +393 -278
- package/docs/helpers.md +37 -18
- package/docs/locators.md +2 -0
- package/docs/mobile-react-native-locators.md +64 -0
- package/docs/mobile.md +5 -0
- package/docs/plugins.md +54 -13
- package/docs/puppeteer.md +74 -26
- package/docs/quickstart.md +47 -12
- package/docs/react.md +67 -0
- package/docs/reports.md +1 -1
- package/docs/{webapi/_keys.mustache → shared/keys.mustache} +0 -0
- package/docs/shared/react.mustache +1 -0
- package/docs/testcafe.md +157 -0
- package/docs/videos.md +19 -0
- package/docs/webapi/amOnPage.mustache +1 -1
- package/docs/webapi/appendField.mustache +2 -2
- package/docs/webapi/attachFile.mustache +2 -2
- package/docs/webapi/checkOption.mustache +2 -2
- package/docs/webapi/clearCookie.mustache +1 -1
- package/docs/webapi/clearField.mustache +1 -1
- package/docs/webapi/click.mustache +2 -2
- package/docs/webapi/clickLink.mustache +3 -3
- package/docs/webapi/dontSee.mustache +6 -3
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +7 -1
- package/docs/webapi/dontSeeCookie.mustache +5 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +6 -1
- package/docs/webapi/dontSeeElement.mustache +5 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +5 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
- package/docs/webapi/dontSeeInField.mustache +7 -2
- package/docs/webapi/dontSeeInSource.mustache +5 -1
- package/docs/webapi/dontSeeInTitle.mustache +5 -1
- package/docs/webapi/doubleClick.mustache +2 -2
- package/docs/webapi/downloadFile.mustache +2 -2
- package/docs/webapi/dragAndDrop.mustache +2 -2
- package/docs/webapi/dragSlider.mustache +2 -2
- package/docs/webapi/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +2 -2
- package/docs/webapi/grabAttributeFrom.mustache +3 -2
- package/docs/webapi/grabBrowserLogs.mustache +3 -1
- package/docs/webapi/grabCookie.mustache +2 -1
- package/docs/webapi/grabCssPropertyFrom.mustache +3 -2
- package/docs/webapi/grabCurrentUrl.mustache +3 -1
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +19 -0
- package/docs/webapi/grabHTMLFrom.mustache +2 -1
- package/docs/webapi/grabNumberOfOpenTabs.mustache +4 -2
- package/docs/webapi/grabNumberOfVisibleElements.mustache +3 -2
- package/docs/webapi/grabPageScrollPosition.mustache +3 -1
- package/docs/webapi/grabSource.mustache +3 -1
- package/docs/webapi/grabTextFrom.mustache +2 -1
- package/docs/webapi/grabTitle.mustache +3 -1
- package/docs/webapi/grabValueFrom.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +3 -3
- package/docs/webapi/pressKey.mustache +1 -1
- package/docs/webapi/resizeWindow.mustache +2 -2
- package/docs/webapi/rightClick.mustache +2 -2
- package/docs/webapi/saveScreenshot.mustache +3 -3
- package/docs/webapi/say.mustache +2 -2
- package/docs/webapi/scrollPageToBottom.mustache +1 -1
- package/docs/webapi/scrollPageToTop.mustache +1 -1
- package/docs/webapi/scrollTo.mustache +3 -3
- package/docs/webapi/see.mustache +2 -2
- package/docs/webapi/seeAttributesOnElements.mustache +3 -3
- package/docs/webapi/seeCheckboxIsChecked.mustache +2 -1
- package/docs/webapi/seeCookie.mustache +1 -1
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -2
- package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
- package/docs/webapi/seeElement.mustache +1 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -1
- package/docs/webapi/seeInCurrentUrl.mustache +1 -1
- package/docs/webapi/seeInField.mustache +2 -2
- package/docs/webapi/seeInSource.mustache +1 -1
- package/docs/webapi/seeInTitle.mustache +5 -1
- package/docs/webapi/seeNumberOfElements.mustache +10 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +2 -2
- package/docs/webapi/selectOption.mustache +2 -2
- package/docs/webapi/setCookie.mustache +1 -1
- package/docs/webapi/switchTo.mustache +6 -1
- package/docs/webapi/uncheckOption.mustache +2 -2
- package/docs/webapi/wait.mustache +1 -2
- package/docs/webapi/waitForDetached.mustache +3 -3
- package/docs/webapi/waitForElement.mustache +2 -2
- package/docs/webapi/waitForEnabled.mustache +1 -1
- package/docs/webapi/waitForFunction.mustache +3 -3
- package/docs/webapi/waitForInvisible.mustache +3 -3
- package/docs/webapi/waitForText.mustache +3 -3
- package/docs/webapi/waitForValue.mustache +3 -3
- package/docs/webapi/waitForVisible.mustache +3 -3
- package/docs/webapi/waitInUrl.mustache +2 -2
- package/docs/webapi/waitNumberOfVisibleElements.mustache +3 -3
- package/docs/webapi/waitToHide.mustache +3 -3
- package/docs/webapi/waitUntil.mustache +3 -3
- package/docs/webapi/waitUrlEquals.mustache +2 -2
- package/docs/webdriver.md +453 -0
- package/lib/codecept.js +11 -9
- package/lib/command/definitions.js +183 -30
- package/lib/command/gherkin/snippets.js +29 -9
- package/lib/command/init.js +31 -9
- package/lib/command/run-multiple.js +46 -59
- package/lib/command/utils.js +1 -1
- package/lib/container.js +30 -4
- package/lib/data/dataScenarioConfig.js +18 -0
- package/lib/helper/Appium.js +24 -24
- package/lib/helper/Nightmare.js +81 -84
- package/lib/helper/Polly.js +189 -0
- package/lib/helper/Protractor.js +96 -86
- package/lib/helper/Puppeteer.js +238 -113
- package/lib/helper/REST.js +1 -1
- package/lib/helper/TestCafe.js +1257 -0
- package/lib/helper/WebDriver.js +217 -277
- package/lib/helper/WebDriverIO.js +75 -75
- package/lib/helper/clientscripts/nightmare.js +8 -0
- package/lib/helper/extras/React.js +55 -0
- package/lib/helper/testcafe/testControllerHolder.js +42 -0
- package/lib/helper/testcafe/testcafe-utils.js +63 -0
- package/lib/history.js +39 -0
- package/lib/hooks.js +25 -1
- package/lib/interfaces/gherkin.js +17 -1
- package/lib/interfaces/scenarioConfig.js +2 -2
- package/lib/listener/config.js +3 -3
- package/lib/locator.js +6 -0
- package/lib/pause.js +22 -1
- package/lib/plugin/allure.js +63 -0
- package/lib/plugin/autoLogin.js +65 -16
- package/lib/plugin/puppeteerCoverage.js +6 -1
- package/lib/plugin/stepByStepReport.js +4 -3
- package/lib/scenario.js +23 -17
- package/lib/step.js +5 -2
- package/lib/ui.js +1 -1
- package/lib/utils.js +70 -20
- package/package.json +20 -19
- package/translations/de-DE.js +69 -0
- package/translations/index.js +1 -0
- package/docs/video.md +0 -26
package/docs/commands.md
CHANGED
|
@@ -146,14 +146,14 @@ codeceptjs def
|
|
|
146
146
|
codeceptjs def --config path/to/codecept.json
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
After doing that IDE should provide autocompletion for `I` object inside `Scenario` and `within` blocks.
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
/// <reference path="./steps.d.ts" />
|
|
153
|
-
Feature('My new test');
|
|
154
|
-
```
|
|
151
|
+
Add optional parameter `output` (or shortcat `-o`), if you want to place your definition file in specific folder:
|
|
155
152
|
|
|
156
|
-
|
|
153
|
+
```sh
|
|
154
|
+
codeceptjs def --output ./tests/typings
|
|
155
|
+
codeceptjs def -o ./tests/typings
|
|
156
|
+
```
|
|
157
157
|
|
|
158
158
|
## List Commands
|
|
159
159
|
|
|
@@ -34,5 +34,7 @@ Please **add your own** by editing this page.
|
|
|
34
34
|
## Reporters
|
|
35
35
|
* [codeceptjs-rphelper](https://www.npmjs.com/package/codeceptjs-rphelper) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
|
|
36
36
|
|
|
37
|
+
## Page Object Code Generator
|
|
38
|
+
* [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).
|
|
37
39
|
## Other
|
|
38
40
|
|
package/docs/detox.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: detox
|
|
3
|
+
title: Testing React Native with Detox
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> Warning! Detox support in CodeceptJS is experimental. Please try it and help us to test it and improve it. [See Detox helper repository](https://github.com/Codeception/detox-helper).
|
|
7
|
+
|
|
8
|
+
Automated mobile testing can be slow, hard, and ineffective. The price of it goes high, if we take into account fragility of applications, slowness of emulators, and the complexity of debug. [Appium](https://codecept.io/mobile) helps writing mobile tests but not all apps can be tested effectively with it. That's why you should consider using an alternative approach.
|
|
9
|
+
|
|
10
|
+
Meet [Detox](https://github.com/wix/Detox) - grey-box testing solution for mobile testing by Wix.
|
|
11
|
+
|
|
12
|
+
Unlike, Appium, Detox requires to update mobile application to include test instrumentation, so an application could receive commands from a test, and act accordingly. Let's see pros and cons of such approach:
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
**Pros**:
|
|
16
|
+
|
|
17
|
+
* faster tests
|
|
18
|
+
* synchronization with application
|
|
19
|
+
* plays nicely with React Native
|
|
20
|
+
|
|
21
|
+
**Cons**:
|
|
22
|
+
|
|
23
|
+
* application should be built in a special way
|
|
24
|
+
* no hybrid applications
|
|
25
|
+
* native Android apps not supported (except React Native)
|
|
26
|
+
* no cloud testing with SauceLabs or BrowserStack
|
|
27
|
+
|
|
28
|
+
CodeceptJS allows you to try different options and choose the one which works best for you. Both Appium and Detox helpers share the same syntax for testing mobile applications, interactive pause, automatic retries, and other useful features.
|
|
29
|
+
|
|
30
|
+
CodeceptJS provides next features over standard Detox:
|
|
31
|
+
|
|
32
|
+
* **Unified API**. The same test can be executed in Appium or Detox. Unified API helps different teams to use the same syntax and easy port tests from one engine to another.
|
|
33
|
+
* [Interactive pause](https://codecept.io/basics#pause). When starting/stopping an application takes a long time, debugging and writing tests can be hard. CodeceptJS solves this by pausing an execution and letting you try different commands and locators. With this feature a test can be writtern during one running session.
|
|
34
|
+
* [Auto-retries](https://codecept.io/basics#retries) using `retryFailedStepPlugin` and `I.retry()`
|
|
35
|
+
* **Cross-Platform testing** - one test can be executed on different engines. When needed, platform-specific actions and locators can be easily applied.
|
|
36
|
+
|
|
37
|
+
## A Test
|
|
38
|
+
|
|
39
|
+
Compare a test written for Detox using its native syntax:
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
await expect(element(by.text('Welcome'))).toBeVisible();
|
|
43
|
+
await expect(element(by.id('createdAndVisibleText'))).toNotExist();
|
|
44
|
+
await element(by.id('GoButton')).tap();
|
|
45
|
+
await waitFor(element(by.id('createdAndVisibleText'))).toExist().withTimeout(20000);
|
|
46
|
+
await expect(element(by.id('createdAndVisibleText'))).toExist();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
with the same test written using CodeceptJS syntax:
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
I.see('Welcome');
|
|
53
|
+
I.dontSeeElement('#createdAndVisibleText');
|
|
54
|
+
I.click('#GoButton');
|
|
55
|
+
I.waitForElement('#createdAndVisibleText', 20);
|
|
56
|
+
I.seeElement('#createdAndVisibleText');
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
As you see, CodeceptJS test is shorter and easier to follow. By simplifying the code and reducing visual noise we make tests easier to follow. But before writing a test we need to prepare an application to be testable with Detox.
|
|
60
|
+
|
|
61
|
+
## Setup
|
|
62
|
+
|
|
63
|
+
It is important to follow [Detox guide](https://github.com/wix/Detox/blob/master/docs/Introduction.GettingStarted.md) to build an application with Detox test instrouments included.
|
|
64
|
+
|
|
65
|
+
After you install Detox, create configuration and build an application using `detox build` command, you are ready to integrate Detox with CodeceptJS.
|
|
66
|
+
|
|
67
|
+
You need to install Detox CodeceptJS helper:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
npm i @codeceptjs/detox-helper --save-dev
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Then enable this helper in `codecept.conf.js`:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
helpers: {
|
|
77
|
+
Detox: {
|
|
78
|
+
require: '@codeceptjs/detox-helper',
|
|
79
|
+
configuration: '<detox app configuration name>',
|
|
80
|
+
reloadReactNative: true,
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Enable `reloadReactNative: true` if you test React Native application.
|
|
86
|
+
|
|
87
|
+
## Actions
|
|
88
|
+
|
|
89
|
+
Create test as usual, by running command:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
npx codeceptjs gt
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A test starts when emulator starts and loads an application. So you can begin testing an application.
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
// inside a created test
|
|
99
|
+
Scenario('test React Native app', (I) => {
|
|
100
|
+
I.see('Welcome');
|
|
101
|
+
I.tap('Start');
|
|
102
|
+
I.see('Started!');
|
|
103
|
+
});
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The most common actions are:
|
|
107
|
+
|
|
108
|
+
* `tap` (or `click`)
|
|
109
|
+
* `multiTap` - perform multiple taps on element
|
|
110
|
+
* `longPress` - longer press
|
|
111
|
+
* `fillField` - fill in value of text field
|
|
112
|
+
* `clearField` - clear value in text field
|
|
113
|
+
* `appendField` - append value in a field
|
|
114
|
+
* `swipeUp`, `swipeDown`, `swipeLeft`, `swipeRigth`
|
|
115
|
+
|
|
116
|
+
There are also common assertions:
|
|
117
|
+
|
|
118
|
+
* `see` - to check visibility of text
|
|
119
|
+
* `seeElement` - to check visibility of element
|
|
120
|
+
* `seeElementExists` - to check that element exists
|
|
121
|
+
|
|
122
|
+
> For more details on actions refer to the [API reference of Detox helper](https://github.com/Codeception/detox-helper#api).
|
|
123
|
+
|
|
124
|
+
## Locators
|
|
125
|
+
|
|
126
|
+
To write a test you need to learn about available locators in Detox.
|
|
127
|
+
Unlike, Appium there are no XPath locators. Possible locators limited to `text`, `id`, `accessibility id`, and element `type`. Thus, again, an application should be prepared for testing, to ensure that all active elements are accessible.
|
|
128
|
+
|
|
129
|
+
Let's see how they can be used:
|
|
130
|
+
|
|
131
|
+
* For **ID locators** use `#` prefix (same as in CSS). Example:
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
I.seeElement('#WelcomeScreen')
|
|
135
|
+
```
|
|
136
|
+
* For **accessibility ID** use `~` prefix (as in Appium helper). Example:
|
|
137
|
+
|
|
138
|
+
```js
|
|
139
|
+
I.seeElement('~welcome')
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
* Locating elements **by text** requires no prefix, but can be applied only for actions accepting semantic locators.
|
|
143
|
+
|
|
144
|
+
```js
|
|
145
|
+
I.tap('Start')
|
|
146
|
+
I.fillField('Username', 'davert')
|
|
147
|
+
I.clearField('Username')
|
|
148
|
+
I.see('Welcome, davert')
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
* Locating elements **by type** also use no prefix but can be used only where for elements.
|
|
152
|
+
|
|
153
|
+
```js
|
|
154
|
+
I.seeElement('Button')
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Text locators can be combined with others, as methods `tap`, `click` and `see` can receive a second paramater, which defines a context where to perfrom a search.
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
// tap "Start" inside "#Layout"
|
|
161
|
+
I.tap('Start', '#Layout');
|
|
162
|
+
// see text "Welcome" inside "~msg"
|
|
163
|
+
I.see('Welcome', '~msg');
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Alternatively, you can use specify locator by using *strict locator*, passing an object as a locator:
|
|
167
|
+
|
|
168
|
+
```js
|
|
169
|
+
I.click({ type: 'Button' });
|
|
170
|
+
I.seeElement({ label: 'welcome' });
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
> If you are familiar with Detox API, this is how locators are actually translated: `{label: 'welcome'}` => `by.label('welcome')`.
|
|
174
|
+
|
|
175
|
+
### Cross Platform Testing
|
|
176
|
+
|
|
177
|
+
If element differs on on iOS and Android you can use **cross platform locators**.
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
// locate element by text on Android
|
|
181
|
+
// locate element by accessibility id on iOS
|
|
182
|
+
I.click({ android: 'Start', ios: '~start' });
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
When application behavior differs on Android and iOS use platform-specific actions:
|
|
186
|
+
|
|
187
|
+
```js
|
|
188
|
+
I.runOnIOS(() => {
|
|
189
|
+
// this will be executed only on IOS
|
|
190
|
+
I.see('Hello iOS');
|
|
191
|
+
});
|
|
192
|
+
I.runOnAndroid(() => {
|
|
193
|
+
// this will be executed only on Android
|
|
194
|
+
I.see('Hello Android');
|
|
195
|
+
});
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Sample Test
|
|
199
|
+
|
|
200
|
+
Finally, you can get a test looking like this
|
|
201
|
+
|
|
202
|
+
```js
|
|
203
|
+
Feature('My Detox App');
|
|
204
|
+
|
|
205
|
+
Scenario('save in application', (I) => {
|
|
206
|
+
I.setLandscapeOrientation();
|
|
207
|
+
I.fillField('#text', 'a new text');
|
|
208
|
+
I.see('a new text', '#textValue');
|
|
209
|
+
I.dontSeeElement('#createdAndVisibleText');
|
|
210
|
+
I.click({ ios: '#GoButton', android: 'Button' });
|
|
211
|
+
I.waitForElement('#createdAndVisibleText', 20);
|
|
212
|
+
I.seeElement('#createdAndVisibleText');
|
|
213
|
+
I.runOnAndroid(() => {
|
|
214
|
+
I.click('Save');
|
|
215
|
+
I.see('Text Saved', '#message');
|
|
216
|
+
});
|
|
217
|
+
I.runOnIOS(() => {
|
|
218
|
+
I.click('SAVE');
|
|
219
|
+
I.see('SAVED!');
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
To execute it use `codeceptjs run` command
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
npx codeceptjs run
|
|
228
|
+
```
|
|
229
|
+
If you want to use detox configuration other than is set in `codecept.conf.js` use `--configuration` argument:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
npx codeceptjs run --configuration android.test.ci
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
You can also pass all [other arguments that Detox CLI supports](https://github.com/wix/Detox/blob/master/docs/APIRef.DetoxCLI.md#test).
|
package/docs/examples.md
CHANGED
|
@@ -33,6 +33,21 @@ This repository demonstrates usage of:
|
|
|
33
33
|
* testing WYSIWYG editor
|
|
34
34
|
* GitLab CI
|
|
35
35
|
|
|
36
|
+
## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
|
|
37
|
+
|
|
38
|
+
This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
|
|
39
|
+
|
|
40
|
+
* CodecepJS-Cucumber E2E Framework
|
|
41
|
+
* Saucelabs Integration
|
|
42
|
+
* Run Cross Browser tests in Parallel on SauceLabs with a simple command
|
|
43
|
+
* Run tests on `chrome:headless`
|
|
44
|
+
* Page Objects
|
|
45
|
+
* `Should.js` Assertion Library
|
|
46
|
+
* Uses `wdio` service (selenium-standalone, sauce)
|
|
47
|
+
* Allure HTML Reports
|
|
48
|
+
* Uses shared Master configuration
|
|
49
|
+
* Sample example and feature files of GitHub Features
|
|
50
|
+
|
|
36
51
|
## [Amazon Tests v2](https://gitlab.com/thanhnguyendh/codeceptjs-wdio-services)
|
|
37
52
|
|
|
38
53
|
Testing Amazon website using Selenium WebDriver.
|
|
@@ -93,3 +108,11 @@ This repository demonstrates usage of
|
|
|
93
108
|
This repository demonstrates usage of
|
|
94
109
|
|
|
95
110
|
* REST helper
|
|
111
|
+
|
|
112
|
+
## [Automation Starter](https://github.com/sjorrillo/automation-starter)
|
|
113
|
+
|
|
114
|
+
The purpose of this application is for learning the basics and how to use good practices and useful tools in automation.
|
|
115
|
+
|
|
116
|
+
* Puppeteer helper
|
|
117
|
+
* 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
|
|
118
|
+
* Linting `airbnb-base`, `codeceptjs/codeceptjs` and full ES6 support
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
id: ApiDataFactory
|
|
3
3
|
title: ApiDataFactory
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
|
|
6
7
|
|
|
7
8
|
## ApiDataFactory
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Extends Helper
|
|
10
11
|
|
|
11
12
|
Helper for managing remote data using REST API.
|
|
12
13
|
Uses data generators like [rosie][1] or factory girl to create new record.
|
|
@@ -195,8 +196,8 @@ Can be replaced from a in custom helper.
|
|
|
195
196
|
|
|
196
197
|
#### Parameters
|
|
197
198
|
|
|
198
|
-
- `factory`
|
|
199
|
-
- `data`
|
|
199
|
+
- `factory` any
|
|
200
|
+
- `data` any
|
|
200
201
|
|
|
201
202
|
### \_requestDelete
|
|
202
203
|
|
|
@@ -205,8 +206,8 @@ Can be replaced from a custom helper.
|
|
|
205
206
|
|
|
206
207
|
#### Parameters
|
|
207
208
|
|
|
208
|
-
- `factory`
|
|
209
|
-
- `id`
|
|
209
|
+
- `factory` any
|
|
210
|
+
- `id` any
|
|
210
211
|
|
|
211
212
|
### have
|
|
212
213
|
|
|
@@ -222,8 +223,8 @@ const user = await I.have('user', { email: 'user@user.com'});
|
|
|
222
223
|
|
|
223
224
|
#### Parameters
|
|
224
225
|
|
|
225
|
-
- `factory`
|
|
226
|
-
- `params`
|
|
226
|
+
- `factory` any factory to use
|
|
227
|
+
- `params` any predefined parameters
|
|
227
228
|
|
|
228
229
|
### haveMultiple
|
|
229
230
|
|
|
@@ -239,9 +240,9 @@ I.haveMultiple('post', 3, { author: 'davert' });
|
|
|
239
240
|
|
|
240
241
|
#### Parameters
|
|
241
242
|
|
|
242
|
-
- `factory`
|
|
243
|
-
- `times`
|
|
244
|
-
- `params`
|
|
243
|
+
- `factory` any
|
|
244
|
+
- `times` any
|
|
245
|
+
- `params` any
|
|
245
246
|
|
|
246
247
|
[1]: https://github.com/rosiejs/rosie
|
|
247
248
|
|