Skip to content

Commit dc86bc1

Browse files
potapovDims-syamhanna-beckertomByrerJoão Paulo Vanzuita
authored
Small fixes, fix inheritance (#2269)
* Updated to click the firstVisibleElement (#2230) Earlier it seems like it was clicking the first element. Now it clicks the first visible element, * add missing JSDoc parameter for seeInPopup method, update documentation (#2228) * add missing JSDoc parameter for seeInPopup method, update documentation * refactor duplicated JSDoc of seeInSource method to mustache file * update interactive shell in basics.md (#2256) I guess docs had older version? * Update playwright.md (#2255) Edits update to new generator version, minor typos, clarifications. Otherwise good overview docs! * Readme update and fix import (#2267) * remove let, add const * fix import error * Small fixes, fix inheritance * fix eslint * alignment * fix comments Co-authored-by: SS <syam.s@outlook.com> Co-authored-by: Hanna Becker <hanna.e.becker@gmail.com> Co-authored-by: Tom Byrer <tomByrer@gmail.com> Co-authored-by: João Paulo Vanzuita <joao.vanzuita@cobi.bike> Co-authored-by: Michael Bodnarchuk <DavertMik@users.noreply.github.com>
1 parent 46facb1 commit dc86bc1

File tree

108 files changed

+317
-375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+317
-375
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"rules": {
77
"func-names": 0,
88
"no-use-before-define": 0,
9-
"no-unused-vars": 0,
9+
"no-unused-vars": 2,
1010
"no-underscore-dangle": 0,
1111
"no-undef": 0,
1212
"prefer-destructuring": 0,

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ In case you need to return a value from a webpage and use it directly in test, y
182182
They are expected to be used inside async/await functions, and their results will be available in test:
183183

184184
```js
185-
let assert = require('assert');
185+
const assert = require('assert');
186186

187187
Feature('CodeceptJS Demonstration');
188188

189189
Scenario('test page title', async (I) => {
190190
I.amOnPage('http://simple-form-bootstrap.plataformatec.com.br/documentation');
191-
let title = await I.grabTitle();
191+
const title = await I.grabTitle();
192192
assert.equal(title, 'Example application with SimpleForm and Twitter Bootstrap');
193193
});
194194
```

docs/basics.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,11 @@ This launches the interactive console where you can call any action from the `I`
431431
```
432432
Interactive shell started
433433
Press ENTER to resume test
434-
- Use JavaScript syntax to try steps in action
434+
Use JavaScript syntax to try steps in action
435+
- Press ENTER to run the next step
435436
- Press TAB twice to see all available commands
436-
- Enter next to run the next step
437-
437+
- Type exit + Enter to exit the interactive shell
438+
- Prefix => to run js commands
438439
I.
439440
```
440441

docs/helpers/Playwright.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,9 +1267,13 @@ I.seeInField('#searchform input','Search');
12671267
Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
12681268
given string.
12691269
1270+
```js
1271+
I.seeInPopup('Popup text');
1272+
```
1273+
12701274
#### Parameters
12711275
1272-
- `text`
1276+
- `text` **[string][7]** value to check.
12731277
12741278
### seeInSource
12751279

docs/helpers/Protractor.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,9 +1094,13 @@ I.seeInField('#searchform input','Search');
10941094
Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
10951095
given string.
10961096
1097+
```js
1098+
I.seeInPopup('Popup text');
1099+
```
1100+
10971101
#### Parameters
10981102
1099-
- `text`
1103+
- `text` **[string][9]** value to check.
11001104
11011105
### seeInSource
11021106

docs/helpers/Puppeteer.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,9 +1366,13 @@ I.seeInField('#searchform input','Search');
13661366
Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
13671367
given string.
13681368
1369+
```js
1370+
I.seeInPopup('Popup text');
1371+
```
1372+
13691373
#### Parameters
13701374
1371-
- `text`
1375+
- `text` **[string][8]** value to check.
13721376
13731377
### seeInSource
13741378

docs/playwright.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ It's readable and simple and working using Playwright API!
2828
To start you need CodeceptJS with Playwright packages installed
2929

3030
```bash
31-
npm install codeceptjs playwright@^0.10.0 --save
31+
npm install codeceptjs playwright@^0.11.1 --save
3232
```
3333

3434
Or see [alternative installation options](http://codecept.io/installation/)
@@ -52,7 +52,8 @@ Make sure `Playwright` helper is enabled in `codecept.conf.js` config:
5252
helpers: {
5353
Playwright: {
5454
url: "http://localhost",
55-
show: true
55+
show: true,
56+
browser: 'chromium'
5657
}
5758
}
5859
// ..
@@ -75,6 +76,7 @@ When to consider navigation succeeded, defaults to `load`. Given an array of eve
7576
Playwright: {
7677
url: "http://localhost",
7778
show: true,
79+
browser: 'chromium',
7880
waitForNavigation: "networkidle0"
7981
}
8082
}
@@ -87,7 +89,7 @@ It will wait for a small amount of time (100ms) by default after each user actio
8789
8890
## Writing Tests
8991

90-
CodeceptJS test should be created with `gt` command:
92+
Additional CodeceptJS tests should be created with `gt` command:
9193

9294
```sh
9395
npx codeceptjs gt
@@ -110,7 +112,7 @@ Tests consist with a scenario of user's action taken on a page. The most widely
110112

111113
> ℹ All actions are listed in [Playwright helper reference](http://codecept.io/helpers/Playwright/).*
112114
113-
All actions which interact with elements **support CSS and XPath locators**. Actions like `click` or `fillField` by locate elements by their name or value on a page:
115+
All actions which interact with elements can use **[CSS or XPath locators](https://codecept.io/locators/#css-and-xpath)**. Actions like `click` or `fillField` can locate elements by their name or value on a page:
114116

115117
```js
116118
// search for link or button

docs/plugins.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,6 @@ Enable it manually on each run via `-p` option:
392392
393393
npx codeceptjs run -p pauseOnFail
394394
395-
### Parameters
396-
397-
- `config`
398-
399395
## puppeteerCoverage
400396
401397
Dumps puppeteers code coverage after every test.

docs/webapi/seeInPopup.mustache

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Checks that the active JavaScript popup, as created by `window.alert|window.confirm|window.prompt`, contains the
2+
given string.
3+
4+
```js
5+
I.seeInPopup('Popup text');
6+
```
7+
@param {string} text value to check.

examples/fragments/Signin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
let I;
23

34
module.exports = {

0 commit comments

Comments
 (0)