codeceptjs 3.3.0-beta.5 → 3.3.2
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 +50 -1
- package/README.md +6 -1
- package/docs/api.md +45 -30
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +53 -48
- package/docs/build/GraphQL.js +4 -2
- package/docs/build/GraphQLDataFactory.js +3 -3
- package/docs/build/JSONResponse.js +1 -1
- package/docs/build/Nightmare.js +101 -72
- package/docs/build/Playwright.js +166 -113
- package/docs/build/Protractor.js +72 -34
- package/docs/build/Puppeteer.js +143 -100
- package/docs/build/REST.js +5 -2
- package/docs/build/TestCafe.js +97 -66
- package/docs/build/WebDriver.js +183 -135
- package/docs/changelog.md +99 -0
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/email.md +5 -0
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +217 -175
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/MockRequest.md +8 -6
- package/docs/helpers/Nightmare.md +98 -45
- package/docs/helpers/Playwright.md +151 -59
- package/docs/helpers/Puppeteer.md +103 -26
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +77 -22
- package/docs/helpers/WebDriver.md +150 -62
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/videos.md +2 -2
- package/docs/webapi/amOnPage.mustache +2 -1
- package/docs/webapi/appendField.mustache +2 -1
- package/docs/webapi/attachFile.mustache +2 -1
- package/docs/webapi/checkOption.mustache +2 -1
- package/docs/webapi/clearCookie.mustache +2 -1
- package/docs/webapi/clearField.mustache +1 -0
- package/docs/webapi/click.mustache +2 -1
- package/docs/webapi/clickLink.mustache +2 -1
- package/docs/webapi/closeCurrentTab.mustache +6 -4
- package/docs/webapi/closeOtherTabs.mustache +6 -4
- package/docs/webapi/dontSee.mustache +1 -0
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/dontSeeCookie.mustache +2 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/dontSeeElement.mustache +2 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
- package/docs/webapi/dontSeeInField.mustache +2 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -0
- package/docs/webapi/dontSeeInTitle.mustache +2 -1
- package/docs/webapi/doubleClick.mustache +1 -0
- package/docs/webapi/downloadFile.mustache +2 -1
- package/docs/webapi/dragAndDrop.mustache +1 -0
- package/docs/webapi/dragSlider.mustache +2 -1
- package/docs/webapi/executeAsyncScript.mustache +1 -1
- package/docs/webapi/executeScript.mustache +1 -1
- package/docs/webapi/fillField.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -0
- package/docs/webapi/forceRightClick.mustache +1 -0
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +1 -0
- package/docs/webapi/openNewTab.mustache +6 -4
- package/docs/webapi/pressKey.mustache +2 -1
- package/docs/webapi/pressKeyDown.mustache +1 -0
- package/docs/webapi/pressKeyUp.mustache +1 -0
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
- package/docs/webapi/refreshPage.mustache +1 -0
- package/docs/webapi/resizeWindow.mustache +2 -1
- package/docs/webapi/rightClick.mustache +1 -0
- package/docs/webapi/saveElementScreenshot.mustache +1 -0
- package/docs/webapi/saveScreenshot.mustache +2 -1
- package/docs/webapi/say.mustache +2 -1
- package/docs/webapi/scrollIntoView.mustache +1 -0
- package/docs/webapi/scrollPageToBottom.mustache +1 -0
- package/docs/webapi/scrollPageToTop.mustache +1 -0
- package/docs/webapi/scrollTo.mustache +2 -1
- package/docs/webapi/see.mustache +2 -1
- package/docs/webapi/seeAttributesOnElements.mustache +2 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/seeCookie.mustache +1 -0
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/seeElement.mustache +2 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -0
- package/docs/webapi/seeInCurrentUrl.mustache +2 -1
- package/docs/webapi/seeInField.mustache +1 -0
- package/docs/webapi/seeInPopup.mustache +1 -0
- package/docs/webapi/seeInSource.mustache +2 -1
- package/docs/webapi/seeInTitle.mustache +2 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
- package/docs/webapi/seeTextEquals.mustache +2 -1
- package/docs/webapi/seeTitleEquals.mustache +6 -5
- package/docs/webapi/selectOption.mustache +1 -0
- package/docs/webapi/setCookie.mustache +1 -0
- package/docs/webapi/setGeoLocation.mustache +1 -0
- package/docs/webapi/switchTo.mustache +2 -1
- package/docs/webapi/switchToNextTab.mustache +8 -7
- package/docs/webapi/switchToPreviousTab.mustache +8 -7
- package/docs/webapi/type.mustache +1 -0
- package/docs/webapi/uncheckOption.mustache +2 -1
- package/docs/webapi/wait.mustache +2 -1
- package/docs/webapi/waitForClickable.mustache +2 -1
- package/docs/webapi/waitForDetached.mustache +2 -1
- package/docs/webapi/waitForElement.mustache +2 -1
- package/docs/webapi/waitForEnabled.mustache +2 -1
- package/docs/webapi/waitForFunction.mustache +1 -0
- package/docs/webapi/waitForInvisible.mustache +2 -1
- package/docs/webapi/waitForText.mustache +2 -1
- package/docs/webapi/waitForValue.mustache +1 -0
- package/docs/webapi/waitForVisible.mustache +1 -0
- package/docs/webapi/waitInUrl.mustache +2 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
- package/docs/webapi/waitToHide.mustache +2 -1
- package/docs/webapi/waitUrlEquals.mustache +2 -1
- package/lib/command/definitions.js +9 -0
- package/lib/command/run.js +2 -2
- package/lib/command/workers/runTests.js +40 -0
- package/lib/helper/ApiDataFactory.js +4 -3
- package/lib/helper/Appium.js +2 -7
- package/lib/helper/GraphQL.js +4 -2
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +1 -1
- package/lib/helper/Playwright.js +28 -17
- package/lib/helper/REST.js +5 -2
- package/lib/helper/WebDriver.js +4 -0
- package/lib/interfaces/bdd.js +5 -0
- package/lib/listener/steps.js +1 -0
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/stepByStepReport.js +8 -6
- package/lib/workers.js +12 -0
- package/package.json +3 -3
- package/typings/types.d.ts +578 -109
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
## 3.3.2
|
|
2
|
+
|
|
3
|
+
* [REST] Fixed override of headers/token in `haveRequestHeaders()` and `amBearerAuthenticated()`. See #3304 by @mirao
|
|
4
|
+
* Reverted typings change introduced in #3245. [More details on this](https://twitter.com/CodeceptJS/status/1519725963856207873)
|
|
5
|
+
|
|
6
|
+
## 3.3.1
|
|
7
|
+
|
|
8
|
+
🛩️ Features:
|
|
9
|
+
|
|
10
|
+
* Add option to avoid duplicate gherkin step definitions (#3257) - @raywiis
|
|
11
|
+
* Added `step.*` for run-workers #3272. Thanks to @abhimanyupandian
|
|
12
|
+
* Fixed loading tests for `codecept run` using glob patterns. By @jayudey-wf
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
npx codeceptjs run test-dir/*"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
* [Playwright] **Possible breaking change.** By default `timeout` is changed to 5000ms. The value set in 3.3.0 was too low. Please set `timeout` explicitly to not depend on release values.
|
|
19
|
+
* [Playwright] Added for color scheme option by @PeterNgTr
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
helpers: {
|
|
23
|
+
Playwright : {
|
|
24
|
+
url: "http://localhost",
|
|
25
|
+
colorScheme: "dark",
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
🐛 Bugfixes:
|
|
32
|
+
|
|
33
|
+
* [Playwright] Fixed `Cannot read property 'video' of undefined`
|
|
34
|
+
* Fixed haveRequestHeaders() and amBearerAuthenticated() of REST helper (#3260) - @mirao
|
|
35
|
+
* Fixed: allure attachment fails if screenshot failed #3298 by @ruudvanderweijde
|
|
36
|
+
* Fixed #3105 using autoLogin() plugin with TypeScript. Fix #3290 by @PeterNgTr
|
|
37
|
+
* [Playwright] Added extra params for click and dragAndDrop to type definitions by @mirao
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
📖 Documentation
|
|
41
|
+
* Improving the typings in many places
|
|
42
|
+
* Improving the return type of helpers for TS users (#3245) - @nlespiaucq
|
|
43
|
+
|
|
44
|
+
🇺🇦 Added #StandWithUkraine hashtag notice to CLI
|
|
45
|
+
|
|
1
46
|
## 3.3.0
|
|
2
47
|
|
|
3
48
|
🛩️ Features:
|
|
@@ -9,6 +54,10 @@
|
|
|
9
54
|
* Added dependency on `joi` and `chai`
|
|
10
55
|
* [Playwright] Added `timeout` option to set [timeout](https://playwright.dev/docs/api/class-page#page-set-default-timeout) for all Playwright actions. If an action fails, Playwright keeps retrying it for a time set by timeout.
|
|
11
56
|
* [Playwright] **Possible breaking change.** By default `timeout` is set to 1000ms. *Previous default was set by Playwright internally to 30s. This was causing contradiction to CodeceptJS retries, so triggered up to 3 retries for 30s of time. This timeout option was lowered so retryFailedStep plugin would not cause long delays.*
|
|
57
|
+
* [Playwright] Updated `restart` config option to include 3 restart strategies:
|
|
58
|
+
* 'context' or **false** - restarts [browser context](https://playwright.dev/docs/api/class-browsercontext) but keeps running browser. Recommended by Playwright team to keep tests isolated.
|
|
59
|
+
* 'browser' or **true** - closes browser and opens it again between tests.
|
|
60
|
+
* 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default prior CodeceptJS 3.1
|
|
12
61
|
* [Playwright] Extended methods to provide more options from engine. These methods were updated so additional options can be be passed as the last argument:
|
|
13
62
|
* [`click`](/helpers/Playwright#click)
|
|
14
63
|
* [`dragAndDrop`](/helpers/Playwright#dragAndDrop)
|
|
@@ -42,7 +91,7 @@ await eachElement('click all links in .list', '.list a', (el) => {
|
|
|
42
91
|
|
|
43
92
|
📖 Documentation
|
|
44
93
|
|
|
45
|
-
* Added [Testomat.io reporter](/
|
|
94
|
+
* Added [Testomat.io reporter](/reports#testomatio)
|
|
46
95
|
* Added [api testing](/api) guides
|
|
47
96
|
* Added [internal api](/internal-api) guides
|
|
48
97
|
* [Appium] Fixed documentation for `performSwipe`
|
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
[](https://stand-with-ukraine.pp.ua)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
1
5
|
[<img src="https://img.shields.io/badge/slack-@codeceptjs-purple.svg?logo=slack">](https://join.slack.com/t/codeceptjs/shared_invite/enQtMzA5OTM4NDM2MzA4LWE4MThhN2NmYTgxNTU5MTc4YzAyYWMwY2JkMmZlYWI5MWQ2MDM5MmRmYzZmYmNiNmY5NTAzM2EwMGIwOTNhOGQ) [<img src="https://img.shields.io/badge/discourse-codeceptjs-purple">](https://codecept.discourse.group) [![NPM version][npm-image]][npm-url]
|
|
6
|
+
[](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
|
|
2
7
|
|
|
3
8
|
Build Status:
|
|
4
9
|
|
|
@@ -8,7 +13,7 @@ Build Status:
|
|
|
8
13
|
[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium.yml)
|
|
9
14
|
[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/testcafe.yml)
|
|
10
15
|
|
|
11
|
-
# CodeceptJS
|
|
16
|
+
# CodeceptJS [](https://stand-with-ukraine.pp.ua)
|
|
12
17
|
|
|
13
18
|
Reference: [Helpers API](https://github.com/codeceptjs/CodeceptJS/tree/master/docs/helpers)
|
|
14
19
|
|
package/docs/api.md
CHANGED
|
@@ -86,8 +86,15 @@ They were used to perform API requests for browser tests. As so, they lack asser
|
|
|
86
86
|
|
|
87
87
|
> 💡 In CodeceptJS assertions start with `see` prefix. Learn more about assertions by [opening reference for JSONResponse](/helpers/JSONResponse/) helper.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Generate TypeScript definitions to get auto-completions for JSONResponse:
|
|
90
90
|
|
|
91
|
+
```
|
|
92
|
+
npx codeceptjs def
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
After helpers were configured and typings were generated, you can start writing first API test. By default, CodeceptJS saves tests in `tests` directory and uses `*_test.js` suffix. The `init` command created the first test for you to start.
|
|
96
|
+
|
|
97
|
+
> Check [API Examples](https://github.com/codeceptjs/api-examples) to see tests implementations.
|
|
91
98
|
|
|
92
99
|
## Requests
|
|
93
100
|
|
|
@@ -148,22 +155,26 @@ Authentication headers can be set in [helper's config](https://codecept.io/helpe
|
|
|
148
155
|
Example:
|
|
149
156
|
|
|
150
157
|
```js
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
//
|
|
155
|
-
|
|
156
|
-
//
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
|
|
158
|
+
Feature('Users endpoint')
|
|
159
|
+
|
|
160
|
+
Scenario('create user', ({ I }) => {
|
|
161
|
+
// this way we pass Bearer token
|
|
162
|
+
I.amBearerAuthenticated(secret('token-is-here'));
|
|
163
|
+
// for custom authorization with headers use
|
|
164
|
+
// I.haveRequestHeaders method
|
|
165
|
+
|
|
166
|
+
// here we send a POST request
|
|
167
|
+
const response = await I.sendPostRequest('/users', {
|
|
168
|
+
name: 'joe',
|
|
169
|
+
email: 'joe@mail.com'
|
|
170
|
+
});
|
|
171
|
+
// usually we won't need direct access to response object for API testing
|
|
172
|
+
// but you can obtain it from request
|
|
173
|
+
|
|
174
|
+
// check the last request was successful
|
|
175
|
+
// this method introduced by JSONResponse helper
|
|
176
|
+
I.seeResponseCodeIsSuccessful();
|
|
177
|
+
})
|
|
167
178
|
```
|
|
168
179
|
|
|
169
180
|
### GraphQL
|
|
@@ -173,21 +184,25 @@ It's plain old JSON. This why `JSONResponse` helper works for both API types.
|
|
|
173
184
|
Configure authorization headers in `codecept.conf.js` and make your first query:
|
|
174
185
|
|
|
175
186
|
```js
|
|
176
|
-
|
|
177
|
-
const resp = await I.sendQuery('{ user(id: 0) { id name email }}');
|
|
178
|
-
I.seeResponseCodeIsSuccessful();
|
|
187
|
+
Feature('Users endpoint')
|
|
179
188
|
|
|
180
|
-
|
|
181
|
-
|
|
189
|
+
Scenario('get user by query', ({ I }) => {
|
|
190
|
+
// make GraphQL query or mutation
|
|
191
|
+
const resp = await I.sendQuery('{ user(id: 0) { id name email }}');
|
|
192
|
+
I.seeResponseCodeIsSuccessful();
|
|
182
193
|
|
|
183
|
-
//
|
|
184
|
-
I.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
194
|
+
// GraphQL always returns key data as part of response
|
|
195
|
+
I.seeResponseContainsKeys(['data']);
|
|
196
|
+
|
|
197
|
+
// check data for partial inclusion
|
|
198
|
+
I.seeResponseContainsJson({
|
|
199
|
+
data: {
|
|
200
|
+
user: {
|
|
201
|
+
name: 'john doe',
|
|
202
|
+
email: 'johnd@mutex.com',
|
|
203
|
+
},
|
|
189
204
|
},
|
|
190
|
-
}
|
|
205
|
+
});
|
|
191
206
|
});
|
|
192
207
|
```
|
|
193
208
|
|
|
@@ -285,7 +300,7 @@ To perform arbitrary assertions on a response object use `seeResponseValidByCall
|
|
|
285
300
|
It allows you to do any kind of assertions by using `expect` from [`chai`](https://www.chaijs.com) library.
|
|
286
301
|
|
|
287
302
|
```js
|
|
288
|
-
I.seeResponseValidByCallback({ data, status, expect } => {
|
|
303
|
+
I.seeResponseValidByCallback(({ data, status, expect }) => {
|
|
289
304
|
// we receive data and expect to combine them for good assertion
|
|
290
305
|
expect(data.users.length).to.be.gte(10);
|
|
291
306
|
})
|
package/docs/bdd.md
CHANGED
|
@@ -399,6 +399,7 @@ Tag should be placed before *Scenario:* or before *Feature:* keyword. In the las
|
|
|
399
399
|
* `gherkin`
|
|
400
400
|
* `features` - path to feature files, or an array of feature file paths
|
|
401
401
|
* `steps` - array of files with step definitions
|
|
402
|
+
* `avoidDuplicateSteps` - attempts to avoid duplicate step definitions by shallow compare
|
|
402
403
|
|
|
403
404
|
```js
|
|
404
405
|
"gherkin": {
|
package/docs/best.md
CHANGED
|
@@ -215,7 +215,7 @@ include: {
|
|
|
215
215
|
* When you need to customize access to API and go beyond what ApiDataFactory provides, implement DAO:
|
|
216
216
|
|
|
217
217
|
```js
|
|
218
|
-
const faker = require('faker');
|
|
218
|
+
const faker = require('@faker-js/faker');
|
|
219
219
|
const { I } = inject();
|
|
220
220
|
const { output } = require('codeceptjs');
|
|
221
221
|
|
|
@@ -36,7 +36,7 @@ const REST = require('./REST');
|
|
|
36
36
|
* Install [Rosie](https://github.com/rosiejs/rosie) and [Faker](https://www.npmjs.com/package/faker) libraries.
|
|
37
37
|
*
|
|
38
38
|
* ```sh
|
|
39
|
-
* npm i rosie faker --save-dev
|
|
39
|
+
* npm i rosie @faker-js/faker --save-dev
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
42
|
* Create a factory file for a resource.
|
|
@@ -46,8 +46,8 @@ const REST = require('./REST');
|
|
|
46
46
|
* ```js
|
|
47
47
|
* // tests/factories/posts.js
|
|
48
48
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* const Factory = require('rosie').Factory;
|
|
50
|
+
* const faker = require('@faker-js/faker');
|
|
51
51
|
*
|
|
52
52
|
* module.exports = new Factory()
|
|
53
53
|
* // no need to set id, it will be set by REST API
|
|
@@ -264,6 +264,7 @@ class ApiDataFactory extends Helper {
|
|
|
264
264
|
* @param {*} factory factory to use
|
|
265
265
|
* @param {*} params predefined parameters
|
|
266
266
|
* @param {*} options options for programmatically generate the attributes
|
|
267
|
+
* @returns {Promise<*>}
|
|
267
268
|
*/
|
|
268
269
|
have(factory, params, options) {
|
|
269
270
|
const item = this._createItem(factory, params, options);
|
package/docs/build/Appium.js
CHANGED
|
@@ -124,6 +124,7 @@ const webRoot = 'body';
|
|
|
124
124
|
class Appium extends Webdriver {
|
|
125
125
|
/**
|
|
126
126
|
* Appium Special Methods for Mobile only
|
|
127
|
+
* @augments WebDriver
|
|
127
128
|
*/
|
|
128
129
|
|
|
129
130
|
constructor(config) {
|
|
@@ -331,7 +332,6 @@ class Appium extends Webdriver {
|
|
|
331
332
|
*
|
|
332
333
|
* @param {*} caps
|
|
333
334
|
* @param {*} fn
|
|
334
|
-
* @return {Promise<any>}
|
|
335
335
|
*/
|
|
336
336
|
async runOnIOS(caps, fn) {
|
|
337
337
|
if (this.platform !== 'ios') return;
|
|
@@ -374,7 +374,6 @@ class Appium extends Webdriver {
|
|
|
374
374
|
*
|
|
375
375
|
* @param {*} caps
|
|
376
376
|
* @param {*} fn
|
|
377
|
-
* @return {Promise<any>}
|
|
378
377
|
*/
|
|
379
378
|
async runOnAndroid(caps, fn) {
|
|
380
379
|
if (this.platform !== 'android') return;
|
|
@@ -395,7 +394,6 @@ class Appium extends Webdriver {
|
|
|
395
394
|
* ```
|
|
396
395
|
*
|
|
397
396
|
* @param {*} fn
|
|
398
|
-
* @return {Promise<any>}
|
|
399
397
|
*/
|
|
400
398
|
/* eslint-disable */
|
|
401
399
|
async runInWeb(fn) {
|
|
@@ -599,7 +597,6 @@ class Appium extends Webdriver {
|
|
|
599
597
|
* ```
|
|
600
598
|
*
|
|
601
599
|
* @param {'LANDSCAPE'|'PORTRAIT'} orientation LANDSCAPE or PORTRAIT
|
|
602
|
-
* @return {Promise<any>}
|
|
603
600
|
*
|
|
604
601
|
* Appium: support Android and iOS
|
|
605
602
|
*/
|
|
@@ -728,7 +725,6 @@ class Appium extends Webdriver {
|
|
|
728
725
|
* Switch to the specified context.
|
|
729
726
|
*
|
|
730
727
|
* @param {*} context the context to switch to
|
|
731
|
-
|
|
732
728
|
*/
|
|
733
729
|
async _switchToContext(context) {
|
|
734
730
|
return this.browser.switchContext(context);
|
|
@@ -774,7 +770,7 @@ class Appium extends Webdriver {
|
|
|
774
770
|
* // or set context explicitly
|
|
775
771
|
* I.switchToNative('SOME_OTHER_CONTEXT');
|
|
776
772
|
* ```
|
|
777
|
-
* @param {*} context
|
|
773
|
+
* @param {*} [context]
|
|
778
774
|
* @return {Promise<void>}
|
|
779
775
|
*/
|
|
780
776
|
async switchToNative(context = null) {
|
|
@@ -834,7 +830,6 @@ class Appium extends Webdriver {
|
|
|
834
830
|
* ```
|
|
835
831
|
*
|
|
836
832
|
* @param {object} settings object
|
|
837
|
-
* @return {Promise<any>}
|
|
838
833
|
*
|
|
839
834
|
* Appium: support Android and iOS
|
|
840
835
|
*/
|
|
@@ -955,7 +950,7 @@ class Appium extends Webdriver {
|
|
|
955
950
|
*
|
|
956
951
|
* [See complete reference](http://webdriver.io/api/mobile/swipe.html)
|
|
957
952
|
*
|
|
958
|
-
* @param {
|
|
953
|
+
* @param {CodeceptJS.LocatorOrString} locator
|
|
959
954
|
* @param {number} xoffset
|
|
960
955
|
* @param {number} yoffset
|
|
961
956
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
@@ -1010,7 +1005,7 @@ class Appium extends Webdriver {
|
|
|
1010
1005
|
* I.swipeDown(locator, 1200, 1000); // set offset and speed
|
|
1011
1006
|
* ```
|
|
1012
1007
|
*
|
|
1013
|
-
* @param {
|
|
1008
|
+
* @param {CodeceptJS.LocatorOrString} locator
|
|
1014
1009
|
* @param {number} [yoffset] (optional)
|
|
1015
1010
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1016
1011
|
* @return {Promise<void>}
|
|
@@ -1039,7 +1034,7 @@ class Appium extends Webdriver {
|
|
|
1039
1034
|
* I.swipeLeft(locator, 1200, 1000); // set offset and speed
|
|
1040
1035
|
* ```
|
|
1041
1036
|
*
|
|
1042
|
-
* @param {
|
|
1037
|
+
* @param {CodeceptJS.LocatorOrString} locator
|
|
1043
1038
|
* @param {number} [xoffset] (optional)
|
|
1044
1039
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1045
1040
|
* @return {Promise<void>}
|
|
@@ -1066,7 +1061,7 @@ class Appium extends Webdriver {
|
|
|
1066
1061
|
* I.swipeRight(locator, 1200, 1000); // set offset and speed
|
|
1067
1062
|
* ```
|
|
1068
1063
|
*
|
|
1069
|
-
* @param {
|
|
1064
|
+
* @param {CodeceptJS.LocatorOrString} locator
|
|
1070
1065
|
* @param {number} [xoffset] (optional)
|
|
1071
1066
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1072
1067
|
* @return {Promise<void>}
|
|
@@ -1093,7 +1088,7 @@ class Appium extends Webdriver {
|
|
|
1093
1088
|
* I.swipeUp(locator, 1200, 1000); // set offset and speed
|
|
1094
1089
|
* ```
|
|
1095
1090
|
*
|
|
1096
|
-
* @param {
|
|
1091
|
+
* @param {CodeceptJS.LocatorOrString} locator
|
|
1097
1092
|
* @param {number} [yoffset] (optional)
|
|
1098
1093
|
* @param {number} [speed=1000] (optional), 1000 by default
|
|
1099
1094
|
* @return {Promise<void>}
|
|
@@ -1335,8 +1330,9 @@ class Appium extends Webdriver {
|
|
|
1335
1330
|
* ```js
|
|
1336
1331
|
* I.appendField('#myTextField', 'appended');
|
|
1337
1332
|
* ```
|
|
1338
|
-
* @param {
|
|
1333
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator
|
|
1339
1334
|
* @param {string} value text value to append.
|
|
1335
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1340
1336
|
*
|
|
1341
1337
|
*/
|
|
1342
1338
|
async appendField(field, value) {
|
|
@@ -1355,8 +1351,9 @@ class Appium extends Webdriver {
|
|
|
1355
1351
|
* I.checkOption('I Agree to Terms and Conditions');
|
|
1356
1352
|
* I.checkOption('agree', '//form');
|
|
1357
1353
|
* ```
|
|
1358
|
-
* @param {
|
|
1359
|
-
* @param {?
|
|
1354
|
+
* @param {CodeceptJS.LocatorOrString} field checkbox located by label | name | CSS | XPath | strict locator.
|
|
1355
|
+
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS | XPath | strict locator.
|
|
1356
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1360
1357
|
*
|
|
1361
1358
|
*/
|
|
1362
1359
|
async checkOption(field) {
|
|
@@ -1387,8 +1384,9 @@ class Appium extends Webdriver {
|
|
|
1387
1384
|
* I.click({css: 'nav a.login'});
|
|
1388
1385
|
* ```
|
|
1389
1386
|
*
|
|
1390
|
-
* @param {
|
|
1391
|
-
* @param {?
|
|
1387
|
+
* @param {CodeceptJS.LocatorOrString} locator clickable link or button located by text, or any element located by CSS|XPath|strict locator.
|
|
1388
|
+
* @param {?CodeceptJS.LocatorOrString | null} [context=null] (optional, `null` by default) element to search in CSS|XPath|Strict locator.
|
|
1389
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1392
1390
|
*
|
|
1393
1391
|
*
|
|
1394
1392
|
*/
|
|
@@ -1406,8 +1404,8 @@ class Appium extends Webdriver {
|
|
|
1406
1404
|
* I.dontSeeCheckboxIsChecked('agree'); // located by name
|
|
1407
1405
|
* ```
|
|
1408
1406
|
*
|
|
1409
|
-
* @param {
|
|
1410
|
-
*
|
|
1407
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1408
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1411
1409
|
*
|
|
1412
1410
|
*/
|
|
1413
1411
|
async dontSeeCheckboxIsChecked(field) {
|
|
@@ -1422,7 +1420,8 @@ class Appium extends Webdriver {
|
|
|
1422
1420
|
* I.dontSeeElement('.modal'); // modal is not shown
|
|
1423
1421
|
* ```
|
|
1424
1422
|
*
|
|
1425
|
-
* @param {
|
|
1423
|
+
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|Strict locator.
|
|
1424
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1426
1425
|
*/
|
|
1427
1426
|
async dontSeeElement(locator) {
|
|
1428
1427
|
if (this.isWeb) return super.dontSeeElement(locator);
|
|
@@ -1438,8 +1437,9 @@ class Appium extends Webdriver {
|
|
|
1438
1437
|
* I.dontSeeInField({ css: 'form input.email' }, 'user@user.com'); // field by CSS
|
|
1439
1438
|
* ```
|
|
1440
1439
|
*
|
|
1441
|
-
* @param {
|
|
1440
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1442
1441
|
* @param {string} value value to check.
|
|
1442
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1443
1443
|
*
|
|
1444
1444
|
*/
|
|
1445
1445
|
async dontSeeInField(field, value) {
|
|
@@ -1457,8 +1457,8 @@ class Appium extends Webdriver {
|
|
|
1457
1457
|
* ```
|
|
1458
1458
|
*
|
|
1459
1459
|
* @param {string} text which is not present.
|
|
1460
|
-
* @param {
|
|
1461
|
-
*
|
|
1460
|
+
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator in which to perfrom search.
|
|
1461
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1462
1462
|
*/
|
|
1463
1463
|
async dontSee(text, context = null) {
|
|
1464
1464
|
if (this.isWeb) return super.dontSee(text, context);
|
|
@@ -1479,9 +1479,9 @@ class Appium extends Webdriver {
|
|
|
1479
1479
|
* // or by strict locator
|
|
1480
1480
|
* I.fillField({css: 'form#login input[name=username]'}, 'John');
|
|
1481
1481
|
* ```
|
|
1482
|
-
* @param {
|
|
1483
|
-
* @param {
|
|
1484
|
-
*
|
|
1482
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1483
|
+
* @param {CodeceptJS.StringOrSecret} value text value to fill.
|
|
1484
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1485
1485
|
*
|
|
1486
1486
|
*/
|
|
1487
1487
|
async fillField(field, value) {
|
|
@@ -1498,7 +1498,7 @@ class Appium extends Webdriver {
|
|
|
1498
1498
|
* let pins = await I.grabTextFromAll('#pin li');
|
|
1499
1499
|
* ```
|
|
1500
1500
|
*
|
|
1501
|
-
* @param {
|
|
1501
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1502
1502
|
* @returns {Promise<string[]>} attribute value
|
|
1503
1503
|
*
|
|
1504
1504
|
*
|
|
@@ -1517,7 +1517,7 @@ class Appium extends Webdriver {
|
|
|
1517
1517
|
* ```
|
|
1518
1518
|
* If multiple elements found returns first element.
|
|
1519
1519
|
*
|
|
1520
|
-
* @param {
|
|
1520
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1521
1521
|
* @returns {Promise<string>} attribute value
|
|
1522
1522
|
*
|
|
1523
1523
|
*
|
|
@@ -1535,7 +1535,7 @@ class Appium extends Webdriver {
|
|
|
1535
1535
|
* let numOfElements = await I.grabNumberOfVisibleElements('p');
|
|
1536
1536
|
* ```
|
|
1537
1537
|
*
|
|
1538
|
-
* @param {
|
|
1538
|
+
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1539
1539
|
* @returns {Promise<number>} number of visible elements
|
|
1540
1540
|
*/
|
|
1541
1541
|
async grabNumberOfVisibleElements(locator) {
|
|
@@ -1553,7 +1553,7 @@ class Appium extends Webdriver {
|
|
|
1553
1553
|
* ```js
|
|
1554
1554
|
* let hint = await I.grabAttributeFrom('#tooltip', 'title');
|
|
1555
1555
|
* ```
|
|
1556
|
-
* @param {
|
|
1556
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1557
1557
|
* @param {string} attr attribute name.
|
|
1558
1558
|
* @returns {Promise<string>} attribute value
|
|
1559
1559
|
*
|
|
@@ -1571,7 +1571,7 @@ class Appium extends Webdriver {
|
|
|
1571
1571
|
* ```js
|
|
1572
1572
|
* let hints = await I.grabAttributeFromAll('.tooltip', 'title');
|
|
1573
1573
|
* ```
|
|
1574
|
-
* @param {
|
|
1574
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1575
1575
|
* @param {string} attr attribute name.
|
|
1576
1576
|
* @returns {Promise<string[]>} attribute value
|
|
1577
1577
|
*
|
|
@@ -1588,7 +1588,7 @@ class Appium extends Webdriver {
|
|
|
1588
1588
|
* ```js
|
|
1589
1589
|
* let inputs = await I.grabValueFromAll('//form/input');
|
|
1590
1590
|
* ```
|
|
1591
|
-
* @param {
|
|
1591
|
+
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
1592
1592
|
* @returns {Promise<string[]>} attribute value
|
|
1593
1593
|
*
|
|
1594
1594
|
*
|
|
@@ -1606,7 +1606,7 @@ class Appium extends Webdriver {
|
|
|
1606
1606
|
* ```js
|
|
1607
1607
|
* let email = await I.grabValueFrom('input[name=email]');
|
|
1608
1608
|
* ```
|
|
1609
|
-
* @param {
|
|
1609
|
+
* @param {CodeceptJS.LocatorOrString} locator field located by label|name|CSS|XPath|strict locator.
|
|
1610
1610
|
* @returns {Promise<string>} attribute value
|
|
1611
1611
|
*
|
|
1612
1612
|
*
|
|
@@ -1640,9 +1640,9 @@ class Appium extends Webdriver {
|
|
|
1640
1640
|
* I.scrollIntoView('#submit', { behavior: "smooth", block: "center", inline: "center" });
|
|
1641
1641
|
* ```
|
|
1642
1642
|
*
|
|
1643
|
-
* @param {
|
|
1643
|
+
* @param {LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1644
1644
|
* @param {ScrollIntoViewOptions} scrollIntoViewOptions see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.
|
|
1645
|
-
*
|
|
1645
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1646
1646
|
*
|
|
1647
1647
|
* Supported only for web testing
|
|
1648
1648
|
*/
|
|
@@ -1659,8 +1659,8 @@ class Appium extends Webdriver {
|
|
|
1659
1659
|
* I.seeCheckboxIsChecked({css: '#signup_form input[type=checkbox]'});
|
|
1660
1660
|
* ```
|
|
1661
1661
|
*
|
|
1662
|
-
* @param {
|
|
1663
|
-
*
|
|
1662
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1663
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1664
1664
|
*
|
|
1665
1665
|
*/
|
|
1666
1666
|
async seeCheckboxIsChecked(field) {
|
|
@@ -1675,7 +1675,8 @@ class Appium extends Webdriver {
|
|
|
1675
1675
|
* ```js
|
|
1676
1676
|
* I.seeElement('#modal');
|
|
1677
1677
|
* ```
|
|
1678
|
-
* @param {
|
|
1678
|
+
* @param {CodeceptJS.LocatorOrString} locator located by CSS|XPath|strict locator.
|
|
1679
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1679
1680
|
*
|
|
1680
1681
|
*/
|
|
1681
1682
|
async seeElement(locator) {
|
|
@@ -1693,9 +1694,9 @@ class Appium extends Webdriver {
|
|
|
1693
1694
|
* I.seeInField('form input[type=hidden]','hidden_value');
|
|
1694
1695
|
* I.seeInField('#searchform input','Search');
|
|
1695
1696
|
* ```
|
|
1696
|
-
* @param {
|
|
1697
|
+
* @param {CodeceptJS.LocatorOrString} field located by label|name|CSS|XPath|strict locator.
|
|
1697
1698
|
* @param {string} value value to check.
|
|
1698
|
-
*
|
|
1699
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1699
1700
|
*
|
|
1700
1701
|
*/
|
|
1701
1702
|
async seeInField(field, value) {
|
|
@@ -1713,7 +1714,8 @@ class Appium extends Webdriver {
|
|
|
1713
1714
|
* I.see('Register', {css: 'form.register'}); // use strict locator
|
|
1714
1715
|
* ```
|
|
1715
1716
|
* @param {string} text expected on page.
|
|
1716
|
-
* @param {?
|
|
1717
|
+
* @param {?CodeceptJS.LocatorOrString} [context=null] (optional, `null` by default) element located by CSS|Xpath|strict locator in which to search for text.
|
|
1718
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1717
1719
|
*
|
|
1718
1720
|
*/
|
|
1719
1721
|
async see(text, context) {
|
|
@@ -1740,9 +1742,9 @@ class Appium extends Webdriver {
|
|
|
1740
1742
|
* ```js
|
|
1741
1743
|
* I.selectOption('Which OS do you use?', ['Android', 'iOS']);
|
|
1742
1744
|
* ```
|
|
1743
|
-
* @param {
|
|
1745
|
+
* @param {LocatorOrString} select field located by label|name|CSS|XPath|strict locator.
|
|
1744
1746
|
* @param {string|Array<*>} option visible text or value of option.
|
|
1745
|
-
*
|
|
1747
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1746
1748
|
*
|
|
1747
1749
|
* Supported only for web testing
|
|
1748
1750
|
*/
|
|
@@ -1760,8 +1762,9 @@ class Appium extends Webdriver {
|
|
|
1760
1762
|
* I.waitForElement('.btn.continue', 5); // wait for 5 secs
|
|
1761
1763
|
* ```
|
|
1762
1764
|
*
|
|
1763
|
-
* @param {
|
|
1765
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1764
1766
|
* @param {number} [sec] (optional, `1` by default) time in seconds to wait
|
|
1767
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1765
1768
|
*
|
|
1766
1769
|
*/
|
|
1767
1770
|
async waitForElement(locator, sec = null) {
|
|
@@ -1777,9 +1780,9 @@ class Appium extends Webdriver {
|
|
|
1777
1780
|
* I.waitForVisible('#popup');
|
|
1778
1781
|
* ```
|
|
1779
1782
|
*
|
|
1780
|
-
* @param {
|
|
1783
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1781
1784
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1782
|
-
*
|
|
1785
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1783
1786
|
*
|
|
1784
1787
|
*/
|
|
1785
1788
|
async waitForVisible(locator, sec = null) {
|
|
@@ -1795,8 +1798,9 @@ class Appium extends Webdriver {
|
|
|
1795
1798
|
* I.waitForInvisible('#popup');
|
|
1796
1799
|
* ```
|
|
1797
1800
|
*
|
|
1798
|
-
* @param {
|
|
1801
|
+
* @param {CodeceptJS.LocatorOrString} locator element located by CSS|XPath|strict locator.
|
|
1799
1802
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1803
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1800
1804
|
*
|
|
1801
1805
|
*/
|
|
1802
1806
|
async waitForInvisible(locator, sec = null) {
|
|
@@ -1816,7 +1820,8 @@ class Appium extends Webdriver {
|
|
|
1816
1820
|
*
|
|
1817
1821
|
* @param {string }text to wait for.
|
|
1818
1822
|
* @param {number} [sec=1] (optional, `1` by default) time in seconds to wait
|
|
1819
|
-
* @param {
|
|
1823
|
+
* @param {CodeceptJS.LocatorOrString} [context] (optional) element located by CSS|XPath|strict locator.
|
|
1824
|
+
* [!] returns a _promise_ which is synchronized internally by recorder
|
|
1820
1825
|
*
|
|
1821
1826
|
*/
|
|
1822
1827
|
async waitForText(text, sec = null, context = null) {
|
package/docs/build/GraphQL.js
CHANGED
|
@@ -112,15 +112,15 @@ class GraphQL extends Helper {
|
|
|
112
112
|
*
|
|
113
113
|
* @param {object} operation
|
|
114
114
|
* @param {object} headers
|
|
115
|
+
* @return {object} graphQLRequest
|
|
115
116
|
*/
|
|
116
117
|
_prepareGraphQLRequest(operation, headers) {
|
|
117
|
-
|
|
118
|
+
return {
|
|
118
119
|
baseURL: this.options.endpoint,
|
|
119
120
|
method: 'POST',
|
|
120
121
|
data: operation,
|
|
121
122
|
headers,
|
|
122
123
|
};
|
|
123
|
-
return request;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
@@ -142,6 +142,7 @@ class GraphQL extends Helper {
|
|
|
142
142
|
* @param {object} variables that may go along with the query
|
|
143
143
|
* @param {object} options are additional query options
|
|
144
144
|
* @param {object} headers
|
|
145
|
+
* @return Promise<any>
|
|
145
146
|
*/
|
|
146
147
|
async sendQuery(query, variables, options = {}, headers = {}) {
|
|
147
148
|
if (typeof query !== 'string') {
|
|
@@ -181,6 +182,7 @@ class GraphQL extends Helper {
|
|
|
181
182
|
* @param {object} variables that may go along with the mutation
|
|
182
183
|
* @param {object} options are additional query options
|
|
183
184
|
* @param {object} headers
|
|
185
|
+
* @return Promise<any>
|
|
184
186
|
*/
|
|
185
187
|
async sendMutation(mutation, variables, options = {}, headers = {}) {
|
|
186
188
|
if (typeof mutation !== 'string') {
|
|
@@ -36,7 +36,7 @@ const GraphQL = require('./GraphQL');
|
|
|
36
36
|
* Install [Rosie](https://github.com/rosiejs/rosie) and [Faker](https://www.npmjs.com/package/faker) libraries.
|
|
37
37
|
*
|
|
38
38
|
* ```sh
|
|
39
|
-
* npm i rosie faker --save-dev
|
|
39
|
+
* npm i rosie @faker-js/faker --save-dev
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
42
|
* Create a factory file for a resource.
|
|
@@ -46,8 +46,8 @@ const GraphQL = require('./GraphQL');
|
|
|
46
46
|
* ```js
|
|
47
47
|
* // tests/factories/users.js
|
|
48
48
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
49
|
+
* const Factory = require('rosie').Factory;
|
|
50
|
+
* const faker = require('@faker-js/faker');
|
|
51
51
|
*
|
|
52
52
|
* // Used with a constructor function passed to Factory, so that the final build
|
|
53
53
|
* // object matches the necessary pattern to be sent as the variables object.
|
|
@@ -218,7 +218,7 @@ class JSONResponse extends Helper {
|
|
|
218
218
|
* Use it to perform custom checks of response data
|
|
219
219
|
*
|
|
220
220
|
* ```js
|
|
221
|
-
* I.seeResponseValidByCallback({ data, status, expect } => {
|
|
221
|
+
* I.seeResponseValidByCallback(({ data, status, expect }) => {
|
|
222
222
|
* expect(status).to.eql(200);
|
|
223
223
|
* expect(data).keys.to.include(['user', 'company']);
|
|
224
224
|
* });
|