diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e71d9c0..b28ac45fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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! ❤ī¸ diff --git a/lib/command/gherkin/init.js b/lib/command/gherkin/init.js index bcb418dc9..a909c27bb 100644 --- a/lib/command/gherkin/init.js +++ b/lib/command/gherkin/init.js @@ -70,7 +70,7 @@ module.exports = function (genPath) { } config.gherkin = { - features: "./features/*.feature", + features: './features/*.feature', steps: [`./step_definitions/steps.${extension}`], }; diff --git a/lib/plugin/retryTo.js b/lib/plugin/retryTo.js index 4a2940176..4c93b56c9 100644 --- a/lib/plugin/retryTo.js +++ b/lib/plugin/retryTo.js @@ -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); diff --git a/package.json b/package.json index 147ce02c1..f07fed24a 100644 --- a/package.json +++ b/package.json @@ -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", @@ -179,4 +179,4 @@ "strict": false } } -} +} \ No newline at end of file diff --git a/test/acceptance/retryTo_test.js b/test/acceptance/retryTo_test.js index c3bfe5a74..6253fdb80 100644 --- a/test/acceptance/retryTo_test.js +++ b/test/acceptance/retryTo_test.js @@ -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); -}); \ No newline at end of file +}); diff --git a/test/data/sandbox/test.scenario-stale.js b/test/data/sandbox/test.scenario-stale.js index 30ec3c9b0..7dfdf435b 100644 --- a/test/data/sandbox/test.scenario-stale.js +++ b/test/data/sandbox/test.scenario-stale.js @@ -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', () => { @@ -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); diff --git a/test/plugin/plugin_test.js b/test/plugin/plugin_test.js index 0f5e6f0a7..4a4f49f66 100644 --- a/test/plugin/plugin_test.js +++ b/test/plugin/plugin_test.js @@ -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(); }); @@ -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(); + }); }); });