Skip to content

Commit c7d4eb7

Browse files
authored
fixed for release (#3301)
1 parent 58bf5d9 commit c7d4eb7

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
## 3.3.1
2+
23
🛩️ Features:
4+
35
* Add option to avoid duplicate gherkin step definitions (#3257) - @raywiis
6+
* Added `step.*` for run-workers #3272. Thanks to @abhimanyupandian
7+
* Fixed loading tests for `codecept run` using glob patterns. By @jayudey-wf
8+
9+
```
10+
npx codeceptjs run test-dir/*"
11+
```
12+
13+
* [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.
14+
* [Playwright] Added for color scheme option by @PeterNgTr
15+
16+
```js
17+
helpers: {
18+
Playwright : {
19+
url: "http://localhost",
20+
colorScheme: "dark",
21+
}
22+
}
23+
```
24+
425

526
🐛 Bugfixes:
6-
* Changing the defunct faker library. See #3232 - @cybersonic
27+
28+
* [Playwright] Fixed `Cannot read property 'video' of undefined`
729
* Fixed haveRequestHeaders() and amBearerAuthenticated() of REST helper (#3260) - @mirao
30+
* Fixed: allure attachment fails if screenshot failed #3298 by @ruudvanderweijde
31+
* Fixed #3105 using autoLogin() plugin with TypeScript. Fix #3290 by @PeterNgTr
32+
* [Playwright] Added extra params for click and dragAndDrop to type definitions by @mirao
33+
834

935
📖 Documentation
1036
* Improving the typings in many places

lib/command/workers/runTests.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function initializeListeners() {
127127
parent,
128128
};
129129
}
130-
130+
131131
function simplifyStep(step, err = null) {
132132
step = { ...step };
133133

@@ -156,10 +156,10 @@ function initializeListeners() {
156156
duration: step.duration || 0,
157157
err,
158158
parent,
159-
test: simplifyTest(step.test)
159+
test: simplifyTest(step.test),
160160
};
161161
}
162-
162+
163163
collectStats();
164164
// suite
165165
event.dispatcher.on(event.suite.before, suite => sendToParentThread({ event: event.suite.before, workerIndex, data: simplifyTest(suite) }));
@@ -178,12 +178,12 @@ function initializeListeners() {
178178
event.dispatcher.on(event.test.started, test => sendToParentThread({ event: event.test.started, workerIndex, data: simplifyTest(test) }));
179179
event.dispatcher.on(event.test.skipped, test => sendToParentThread({ event: event.test.skipped, workerIndex, data: simplifyTest(test) }));
180180

181-
// steps
181+
// steps
182182
event.dispatcher.on(event.step.finished, step => sendToParentThread({ event: event.step.finished, workerIndex, data: simplifyStep(step) }));
183183
event.dispatcher.on(event.step.started, step => sendToParentThread({ event: event.step.started, workerIndex, data: simplifyStep(step) }));
184184
event.dispatcher.on(event.step.passed, step => sendToParentThread({ event: event.step.passed, workerIndex, data: simplifyStep(step) }));
185185
event.dispatcher.on(event.step.failed, step => sendToParentThread({ event: event.step.failed, workerIndex, data: simplifyStep(step) }));
186-
186+
187187
event.dispatcher.on(event.hook.failed, (test, err) => sendToParentThread({ event: event.hook.failed, workerIndex, data: simplifyTest(test, err) }));
188188
event.dispatcher.on(event.hook.passed, (test, err) => sendToParentThread({ event: event.hook.passed, workerIndex, data: simplifyTest(test, err) }));
189189
event.dispatcher.on(event.all.failures, (data) => sendToParentThread({ event: event.all.failures, workerIndex, data }));

lib/helper/Playwright.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const { createValueEngine, createDisabledEngine } = require('./extras/Playwright
225225
* }
226226
* }
227227
* ```
228-
*
228+
*
229229
* * #### Example #8: Launch test with a specific color scheme
230230
*
231231
* ```js
@@ -287,7 +287,7 @@ class Playwright extends Helper {
287287
waitForAction: 100,
288288
waitForTimeout: 1000,
289289
pressKeyDelay: 10,
290-
timeout: 1000,
290+
timeout: 5000,
291291
fullPageScreenshots: false,
292292
disableScreenshots: false,
293293
ignoreLog: ['warning', 'log'],
@@ -2025,7 +2025,7 @@ class Playwright extends Helper {
20252025
test.artifacts = {};
20262026
}
20272027

2028-
if (this.options.recordVideo && this.page.video()) {
2028+
if (this.options.recordVideo && this.page && this.page.video()) {
20292029
test.artifacts.video = await this.page.video().path();
20302030
}
20312031

@@ -2037,7 +2037,7 @@ class Playwright extends Helper {
20372037
}
20382038

20392039
async _passed(test) {
2040-
if (this.options.recordVideo && this.page.video()) {
2040+
if (this.options.recordVideo && this.page && this.page.video()) {
20412041
if (this.options.keepVideoForPassedTests) {
20422042
test.artifacts.video = await this.page.video().path();
20432043
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@
154154
"pre-push": "npm run test:unit"
155155
}
156156
}
157-
}
157+
}

0 commit comments

Comments
 (0)