Skip to content

release 3.6.3 #4388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## 3.6.3

❤️ Thanks all to those who contributed to make this release! ❤️

🛩️ *Features*
* feat(plugin): coverage with WebDriver - devtools (#4349) - by @KobeNguyent
![Screenshot 2024-05-16 at 16 49 20](https://github.com/codeceptjs/CodeceptJS/assets/7845001/a02f0f99-ac78-4d3f-9774-2cb51c688025)

🐛 *Bug Fixes*
* fix(cli): stale process (#4367) - by @Horsty80 @kobenguyent
* fix(runner): screenshot error in beforeSuite/AfterSuite (#4385) - by @kobenguyent
* fix(cli): gherkin command init with TypeScript (#4366) - by @andonary
* fix(webApi): error message of dontSeeCookie (#4357) - by @a-stankevich

📖 *Documentation*
* fix(doc): Expect helper is not described correctly (#4370) - by @kobenguyent
* fix(docs): some strange characters (#4387) - by @kobenguyent
* fix: Puppeteer helper doc typo (#4369) - by @yoannfleurydev

## 3.6.2

❤️ Thanks all to those who contributed to make this release! ❤️
Expand Down
2 changes: 1 addition & 1 deletion lib/command/gherkin/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ module.exports = function (genPath) {
}

config.gherkin = {
features: "./features/*.feature",
features: './features/*.feature',
steps: [`./step_definitions/steps.${extension}`],
};

Expand Down
4 changes: 1 addition & 3 deletions lib/plugin/retryTo.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ module.exports = function (config) {
recorder.session.restore(`retryTo ${tries}`);
if (tries <= maxTries) {
debug(`Error ${err}... Retrying`);
recorder.add(`retryTo ${tries}`, () =>
setTimeout(tryBlock, pollInterval)
);
recorder.add(`retryTo ${tries}`, () => setTimeout(tryBlock, pollInterval));
} else {
// if maxTries reached
handleRetryException(err);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeceptjs",
"version": "3.6.2",
"version": "3.6.3",
"description": "Supercharged End 2 End Testing Framework for NodeJS",
"keywords": [
"acceptance",
Expand Down Expand Up @@ -179,4 +179,4 @@
"strict": false
}
}
}
}
2 changes: 1 addition & 1 deletion test/acceptance/retryTo_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Scenario('Should succeed at the third attempt @plugin', async () => {
await retryTo(async (tryNum) => {
if (tryNum < 2) throw new Error('Custom pluginRetryTo Error');
}, 3);
});
});
4 changes: 2 additions & 2 deletions test/data/sandbox/test.scenario-stale.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature('Scenario should not be staling');
const SHOULD_NOT_STALE = 'should not stale scenario error';

Scenario('Rejected promise should not stale the process', async () => {
await new Promise((_resolve, reject) => setTimeout(reject(new Error(SHOULD_NOT_STALE)), 500));
await new Promise((_resolve, reject) => { setTimeout(reject(new Error(SHOULD_NOT_STALE)), 500); });
});

Scenario('Should handle throw inside synchronous and terminate gracefully', () => {
Expand All @@ -17,6 +17,6 @@ Scenario('Should throw, retry and keep failing', async () => {
setTimeout(() => {
throw new Error(SHOULD_NOT_STALE);
}, 500);
await new Promise((resolve) => setTimeout(resolve, 300));
await new Promise((resolve) => { setTimeout(resolve, 300); });
throw new Error(SHOULD_NOT_STALE);
}).retry(2);
22 changes: 10 additions & 12 deletions test/plugin/plugin_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ describe('CodeceptJS plugin', function () {

it('should failed before the retryTo instruction', (done) => {
exec(`${config_run_config('codecept.Playwright.retryTo.js', 'Should be succeed')} --verbose`, (err, stdout) => {
expect(stdout).toContain('locator.waitFor: Timeout 1000ms exceeded.'),
expect(stdout).toContain('[1] Error | Error: element (.nothing) still not visible after 1 sec'),
expect(stdout).toContain('locator.waitFor: Timeout 1000ms exceeded.');
expect(stdout).toContain('[1] Error | Error: element (.nothing) still not visible after 1 sec');
expect(err).toBeTruthy();
done();
});
Expand Down Expand Up @@ -72,15 +72,13 @@ describe('CodeceptJS plugin', function () {
});

it('should retry to failure', (done) => {
exec(
`${config_run_config('codecept.Playwright.retryTo.js', 'Should fail after reached max retries')} --verbose`, (err, stdout) => {
const lines = stdout.split('\n');
expect(lines).toEqual(
expect.arrayContaining([expect.stringContaining('Custom pluginRetryTo Error')])
);
expect(err).toBeTruthy();
done();
}
);
exec(`${config_run_config('codecept.Playwright.retryTo.js', 'Should fail after reached max retries')} --verbose`, (err, stdout) => {
const lines = stdout.split('\n');
expect(lines).toEqual(
expect.arrayContaining([expect.stringContaining('Custom pluginRetryTo Error')]),
);
expect(err).toBeTruthy();
done();
});
});
});
Loading