Skip to content

Commit 31424b1

Browse files
committed
Merge remote-tracking branch 'upstream/master' into codeceptjs-v3.0
2 parents fb4499d + 6e5125c commit 31424b1

Some content is hidden

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

74 files changed

+2317
-636
lines changed

.circleci/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ docker-compose run --rm test-rest &&
99
docker-compose run --rm test-acceptance.webdriverio &&
1010
docker-compose run --rm test-acceptance.nightmare &&
1111
docker-compose run --rm test-acceptance.puppeteer &&
12-
docker-compose run --rm test-acceptance.protractor &&
12+
docker-compose run --rm test-acceptance.protractor

.github/workflows/playwright.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
branches:
99
- master
1010

11+
env:
12+
CI: true
13+
# Force terminal colors. @see https://www.npmjs.com/package/colors
14+
FORCE_COLOR: 1
15+
1116
jobs:
1217
build:
1318

@@ -26,17 +31,16 @@ jobs:
2631
- name: install required packages
2732
run: |
2833
sudo apt-get update
29-
sudo apt-get install libgbm-dev libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libxslt1.1
30-
sudo apt-get install xvfb
34+
sudo apt-get install libgbm1 libgbm-dev libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libxslt1.1
3135
sudo apt-get install php
3236
- name: npm install
3337
run: |
3438
npm install
3539
- name: start a server
3640
run: "php -S 127.0.0.1:8000 -t test/data/app &"
3741
- name: run chromium tests
38-
run: " ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
42+
run: "./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
3943
- name: run firefox tests
40-
run: "BROWSER=firefox ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
44+
run: "BROWSER=firefox node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
4145
- name: run webkit tests
42-
run: "BROWSER=webkit ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"
46+
run: "BROWSER=webkit node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug"

CHANGELOG.md

+85
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,88 @@
1+
## 2.6.1
2+
3+
* [screenshotOnFail plugin] Fixed saving screenshot of active session.
4+
* [screenshotOnFail plugin] Fix issue #2301 when having the flag `uniqueScreenshotNames`=true results in `undefined` in screenshot file name by @PeterNgTr
5+
* [WebDriver] Fixed `waitForElement` not applying the optional second argument to override the default timeout in webdriverio 6. Fix by @Mooksc
6+
* [WebDriver] Updated `waitUntil` method which is used by all of the wait* functions. This updates the `waitForElement` by the same convention used to update `waitForVisible` and `waitInUrl` to be compatible with both WebDriverIO v5 & v6. See #2313 by @Mooksc
7+
8+
## 2.6.0
9+
10+
* **[Playwright] Updated to Playwright 0.12** by @Georgegriff.
11+
12+
Upgrade playwright to ^0.12:
13+
14+
```
15+
npm i playwright@^0.12 --save
16+
```
17+
18+
[Notable changes](https://github.com/microsoft/playwright/releases/tag/v0.12.0):
19+
* Fixed opening two browsers on start
20+
* `executeScript` - passed function now accepts only one argument. Pass in objects or arrays if you need multtple arguments:
21+
```js
22+
// Old style, does not work anymore:
23+
I.executeScript((x, y) => x + y, x, y);
24+
// New style, passing an object:
25+
I.executeScript(({x, y}) => x + y, {x, y});
26+
```
27+
* `click` - automatically waits for element to become clickable (visible, not animated) and waits for navigation.
28+
* `clickLink` - deprecated
29+
* `waitForClickable` - deprecated
30+
* `forceClick` - added
31+
* Added support for custom locators. See #2277
32+
* Introduced [device emulation](/playwright/#device-emulation):
33+
* globally via `emulate` config option
34+
* per session
35+
36+
**[WebDriver] Updated to webdriverio v6** by @PeterNgTr.
37+
38+
Read [release notes](https://webdriver.io/blog/2020/03/26/webdriverio-v6-released.html), then
39+
upgrade webdriverio to ^6.0:
40+
41+
```
42+
npm i webdriverio@^6.0 --save
43+
```
44+
*(webdriverio v5 support is deprecated and will be removed in CodeceptJS 3.0)*
45+
46+
[WebDriver] Introduced [Shadow DOM support](/shadow) by @gkushang
47+
48+
```js
49+
I.click({ shadow: ['my-app', 'recipe-hello', 'button'] });
50+
```
51+
52+
* **Fixed parallel execution of `run-workers` for Gherkin** scenarios by @koushikmohan1996
53+
* [MockRequest] Updated and **moved to [standalone package](https://github.com/codecept-js/mock-request)**:
54+
* full support for record/replay mode for Puppeteer
55+
* added `mockServer` method to use flexible PollyJS API to define mocks
56+
* fixed stale browser screen in record mode.
57+
* [Playwright] Added support on for `screenshotOnFail` plugin by @amonkc
58+
* Gherkin improvement: setting different tags per examples. See #2208 by @acuper
59+
* [TestCafe] Updated `click` to take first visible element. Fixes #2226 by @theTainted
60+
* [Puppeteer][WebDriver] Updated `waitForClickable` method to check for element overlapping. See #2261 by @PiQx
61+
* [Puppeteer] Dropped `puppeteer-firefox` support, as Puppeteer supports Firefox natively.
62+
* [REST] Rrespect Content-Type header. See #2262 by @pmarshall-legacy
63+
* [allure plugin] Fixes BeforeSuite failures in allure reports. See #2248 by @Georgegriff
64+
* [WebDriver][Puppeteer][Playwright] A screenshot of for an active session is saved in multi-session mode. See #2253 by @ChexWarrior
65+
* Fixed `--profile` option by @pablopaul. Profile value to be passed into `run-multiple` and `run-workers`:
66+
67+
```
68+
npx codecept run-workers 2 --profile firefox
69+
```
70+
71+
Value is available at `process.env.profile` (previously `process.profile`). See #2302. Fixes #1968 #1315
72+
73+
* [commentStep Plugin introduced](/plugins#commentstep). Allows to annotate logical parts of a test:
74+
75+
```js
76+
__`Given`;
77+
I.amOnPage('/profile')
78+
79+
__`When`;
80+
I.click('Logout');
81+
82+
__`Then`;
83+
I.see('You are logged out');
84+
```
85+
186
## 2.5.0
287

388
* **Experimental: [Playwright](/playwright) helper introduced**.

README.md

+30-5
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,36 @@ When using typescript, replace `module.exports` with `export` for autocompletion
277277
Thanks all to those who are and will have contributing to this awesome project!
278278

279279
[//]: contributor-faces
280-
<a href="https://github.com/DavertMik"><img src="https://avatars0.githubusercontent.com/u/220264?v=4" title="DavertMik" width="80" height="80"></a><a href="https://github.com/PeterNgTr"><img src="https://avatars0.githubusercontent.com/u/7845001?v=4" title="PeterNgTr" width="80" height="80"></a><a href="https://github.com/APshenkin"><img src="https://avatars1.githubusercontent.com/u/14344430?v=4" title="APshenkin" width="80" height="80"></a><a href="https://github.com/reubenmiller"><img src="https://avatars0.githubusercontent.com/u/3029781?v=4" title="reubenmiller" width="80" height="80"></a><a href="https://github.com/fabioel"><img src="https://avatars1.githubusercontent.com/u/9824235?v=4" title="fabioel" width="80" height="80"></a><a href="https://github.com/Vorobeyko"><img src="https://avatars3.githubusercontent.com/u/11293201?v=4" title="Vorobeyko" width="80" height="80"></a><a href="https://github.com/pablopaul"><img src="https://avatars1.githubusercontent.com/u/635526?v=4" title="pablopaul" width="80" height="80"></a><a href="https://github.com/tsuemura"><img src="https://avatars1.githubusercontent.com/u/17092259?v=4" title="tsuemura" width="80" height="80"></a>
281-
<a href="https://github.com/VikalpP"><img src="https://avatars2.githubusercontent.com/u/11846339?v=4" title="VikalpP" width="80" height="80"></a><a href="https://github.com/MercifulCode"><img src="https://avatars2.githubusercontent.com/u/1740822?v=4" title="MercifulCode" width="80" height="80"></a><a href="https://github.com/elukoyanov"><img src="https://avatars3.githubusercontent.com/u/11647141?v=4" title="elukoyanov" width="80" height="80"></a><a href="https://github.com/hubidu"><img src="https://avatars2.githubusercontent.com/u/13134082?v=4" title="hubidu" width="80" height="80"></a><a href="https://github.com/BorisOsipov"><img src="https://avatars0.githubusercontent.com/u/6514276?v=4" title="BorisOsipov" width="80" height="80"></a><a href="https://github.com/jploskonka"><img src="https://avatars3.githubusercontent.com/u/669483?v=4" title="jploskonka" width="80" height="80"></a><a href="https://github.com/martomo"><img src="https://avatars2.githubusercontent.com/u/1850135?v=4" title="martomo" width="80" height="80"></a><a href="https://github.com/denis-sokolov"><img src="https://avatars0.githubusercontent.com/u/113721?v=4" title="denis-sokolov" width="80" height="80"></a>
282-
<a href="https://github.com/lennym"><img src="https://avatars3.githubusercontent.com/u/117398?v=4" title="lennym" width="80" height="80"></a><a href="https://github.com/petehouston"><img src="https://avatars0.githubusercontent.com/u/9006720?v=4" title="petehouston" width="80" height="80"></a><a href="https://github.com/Holorium"><img src="https://avatars1.githubusercontent.com/u/10815542?v=4" title="Holorium" width="80" height="80"></a><a href="https://github.com/johnyb"><img src="https://avatars2.githubusercontent.com/u/86358?v=4" title="johnyb" width="80" height="80"></a><a href="https://github.com/jamesgeorge007"><img src="https://avatars2.githubusercontent.com/u/25279263?v=4" title="jamesgeorge007" width="80" height="80"></a><a href="https://github.com/jinjorge"><img src="https://avatars3.githubusercontent.com/u/2208083?v=4" title="jinjorge" width="80" height="80"></a>
283-
<a href="https://github.com/galkin"><img src="https://avatars3.githubusercontent.com/u/5930544?v=4" title="galkin" width="80" height="80"></a><a href="https://github.com/radhey1851"><img src="https://avatars2.githubusercontent.com/u/22446528?v=4" title="radhey1851" width="80" height="80"></a>
284-
<a href="https://github.com/nitschSB"><img src="https://avatars0.githubusercontent.com/u/39341455?v=4" title="nitschSB" width="80" height="80"></a><a href="https://github.com/abner"><img src="https://avatars1.githubusercontent.com/u/42773?v=4" title="abner" width="80" height="80"></a><a href="https://github.com/Akxe"><img src="https://avatars3.githubusercontent.com/u/2001798?v=4" title="Akxe" width="80" height="80"></a><a href="https://github.com/Kalostrinho"><img src="https://avatars0.githubusercontent.com/u/19229249?v=4" title="Kalostrinho" width="80" height="80"></a><a href="https://github.com/asselin"><img src="https://avatars2.githubusercontent.com/u/911250?v=4" title="asselin" width="80" height="80"></a><a href="https://github.com/xt1"><img src="https://avatars2.githubusercontent.com/u/3820037?v=4" title="xt1" width="80" height="80"></a>
280+
<a href="https://github.com/DavertMik"><img src="https://avatars0.githubusercontent.com/u/220264?v=4" title="DavertMik" width="80" height="80"></a>
281+
<a href="https://github.com/PeterNgTr"><img src="https://avatars0.githubusercontent.com/u/7845001?v=4" title="PeterNgTr" width="80" height="80"></a>
282+
<a href="https://github.com/APshenkin"><img src="https://avatars1.githubusercontent.com/u/14344430?v=4" title="APshenkin" width="80" height="80"></a>
283+
<a href="https://github.com/reubenmiller"><img src="https://avatars0.githubusercontent.com/u/3029781?v=4" title="reubenmiller" width="80" height="80"></a>
284+
<a href="https://github.com/Vorobeyko"><img src="https://avatars3.githubusercontent.com/u/11293201?v=4" title="Vorobeyko" width="80" height="80"></a>
285+
<a href="https://github.com/fabioel"><img src="https://avatars1.githubusercontent.com/u/9824235?v=4" title="fabioel" width="80" height="80"></a>
286+
<a href="https://github.com/pablopaul"><img src="https://avatars1.githubusercontent.com/u/635526?v=4" title="pablopaul" width="80" height="80"></a>
287+
<a href="https://github.com/tsuemura"><img src="https://avatars1.githubusercontent.com/u/17092259?v=4" title="tsuemura" width="80" height="80"></a>
288+
<a href="https://github.com/VikalpP"><img src="https://avatars2.githubusercontent.com/u/11846339?v=4" title="VikalpP" width="80" height="80"></a>
289+
<a href="https://github.com/elukoyanov"><img src="https://avatars3.githubusercontent.com/u/11647141?v=4" title="elukoyanov" width="80" height="80"></a>
290+
<a href="https://github.com/MercifulCode"><img src="https://avatars2.githubusercontent.com/u/1740822?v=4" title="MercifulCode" width="80" height="80"></a>
291+
<a href="https://github.com/koushikmohan1996"><img src="https://avatars3.githubusercontent.com/u/24666922?v=4" title="koushikmohan1996" width="80" height="80"></a>
292+
<a href="https://github.com/hubidu"><img src="https://avatars2.githubusercontent.com/u/13134082?v=4" title="hubidu" width="80" height="80"></a>
293+
<a href="https://github.com/BorisOsipov"><img src="https://avatars0.githubusercontent.com/u/6514276?v=4" title="BorisOsipov" width="80" height="80"></a>
294+
<a href="https://github.com/jploskonka"><img src="https://avatars3.githubusercontent.com/u/669483?v=4" title="jploskonka" width="80" height="80"></a>
295+
<a href="https://github.com/martomo"><img src="https://avatars2.githubusercontent.com/u/1850135?v=4" title="martomo" width="80" height="80"></a>
296+
<a href="https://github.com/denis-sokolov"><img src="https://avatars0.githubusercontent.com/u/113721?v=4" title="denis-sokolov" width="80" height="80"></a>
297+
<a href="https://github.com/lennym"><img src="https://avatars3.githubusercontent.com/u/117398?v=4" title="lennym" width="80" height="80"></a>
298+
<a href="https://github.com/petehouston"><img src="https://avatars0.githubusercontent.com/u/9006720?v=4" title="petehouston" width="80" height="80"></a>
299+
<a href="https://github.com/Holorium"><img src="https://avatars1.githubusercontent.com/u/10815542?v=4" title="Holorium" width="80" height="80"></a>
300+
<a href="https://github.com/nitschSB"><img src="https://avatars0.githubusercontent.com/u/39341455?v=4" title="nitschSB" width="80" height="80"></a>
301+
<a href="https://github.com/johnyb"><img src="https://avatars2.githubusercontent.com/u/86358?v=4" title="johnyb" width="80" height="80"></a>
302+
<a href="https://github.com/jamesgeorge007"><img src="https://avatars2.githubusercontent.com/u/25279263?v=4" title="jamesgeorge007" width="80" height="80"></a>
303+
<a href="https://github.com/jinjorge"><img src="https://avatars3.githubusercontent.com/u/2208083?v=4" title="jinjorge" width="80" height="80"></a>
304+
<a href="https://github.com/galkin"><img src="https://avatars3.githubusercontent.com/u/5930544?v=4" title="galkin" width="80" height="80"></a>
305+
<a href="https://github.com/orihomie"><img src="https://avatars2.githubusercontent.com/u/29889683?v=4" title="orihomie" width="80" height="80"></a>
306+
<a href="https://github.com/radhey1851"><img src="https://avatars2.githubusercontent.com/u/22446528?v=4" title="radhey1851" width="80" height="80"></a>
307+
<a href="https://github.com/abner"><img src="https://avatars1.githubusercontent.com/u/42773?v=4" title="abner" width="80" height="80"></a>
308+
<a href="https://github.com/Akxe"><img src="https://avatars3.githubusercontent.com/u/2001798?v=4" title="Akxe" width="80" height="80"></a>
309+
<a href="https://github.com/Kalostrinho"><img src="https://avatars0.githubusercontent.com/u/19229249?v=4" title="Kalostrinho" width="80" height="80"></a>
285310

286311
[//]: contributor-faces
287312

docs/basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ within('.js-signup-form', () => {
622622
I.see('There were problems creating your account.');
623623
```
624624

625-
> `within` can cause problems when used incorrectly. If you see a weired behavior of a test try to refactor it to not use `within`. It is recommended to keep within for simplest cases when possible.
625+
> `within` can cause problems when used incorrectly. If you see a weird behavior of a test try to refactor it to not use `within`. It is recommended to keep within for simplest cases when possible.
626626
627627
`within` can also work with IFrames. A special `frame` locator is required to locate the iframe and get into its context.
628628

0 commit comments

Comments
 (0)