codeceptjs 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -1
- package/README.md +26 -0
- package/docs/api.md +1 -1
- package/docs/bdd.md +1 -0
- package/docs/best.md +1 -1
- package/docs/build/ApiDataFactory.js +4 -3
- package/docs/build/Appium.js +26 -11
- package/docs/build/GraphQL.js +4 -2
- package/docs/build/GraphQLDataFactory.js +3 -3
- package/docs/build/JSONResponse.js +1 -1
- package/docs/build/Nightmare.js +52 -23
- package/docs/build/Playwright.js +126 -48
- package/docs/build/Protractor.js +70 -32
- package/docs/build/Puppeteer.js +78 -35
- package/docs/build/REST.js +4 -1
- package/docs/build/TestCafe.js +53 -22
- package/docs/build/WebDriver.js +115 -65
- package/docs/changelog.md +39 -1
- package/docs/custom-helpers.md +1 -1
- package/docs/data.md +2 -2
- package/docs/helpers/ApiDataFactory.md +7 -3
- package/docs/helpers/Appium.md +113 -15
- package/docs/helpers/GraphQL.md +6 -0
- package/docs/helpers/GraphQLDataFactory.md +3 -3
- package/docs/helpers/JSONResponse.md +1 -1
- package/docs/helpers/Nightmare.md +131 -29
- package/docs/helpers/Playwright.md +424 -215
- package/docs/helpers/Puppeteer.md +229 -92
- package/docs/helpers/REST.md +1 -1
- package/docs/helpers/TestCafe.md +166 -62
- package/docs/helpers/WebDriver.md +254 -103
- package/docs/index.md +1 -1
- package/docs/locators.md +1 -1
- package/docs/webapi/amOnPage.mustache +2 -1
- package/docs/webapi/appendField.mustache +2 -1
- package/docs/webapi/attachFile.mustache +2 -1
- package/docs/webapi/checkOption.mustache +2 -1
- package/docs/webapi/clearCookie.mustache +2 -1
- package/docs/webapi/clearField.mustache +1 -0
- package/docs/webapi/click.mustache +2 -1
- package/docs/webapi/clickLink.mustache +2 -1
- package/docs/webapi/closeCurrentTab.mustache +6 -4
- package/docs/webapi/closeOtherTabs.mustache +6 -4
- package/docs/webapi/dontSee.mustache +1 -0
- package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/dontSeeCookie.mustache +2 -1
- package/docs/webapi/dontSeeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/dontSeeElement.mustache +2 -1
- package/docs/webapi/dontSeeElementInDOM.mustache +2 -1
- package/docs/webapi/dontSeeInCurrentUrl.mustache +2 -1
- package/docs/webapi/dontSeeInField.mustache +2 -1
- package/docs/webapi/dontSeeInSource.mustache +1 -0
- package/docs/webapi/dontSeeInTitle.mustache +2 -1
- package/docs/webapi/doubleClick.mustache +1 -0
- package/docs/webapi/downloadFile.mustache +2 -1
- package/docs/webapi/dragAndDrop.mustache +1 -0
- package/docs/webapi/dragSlider.mustache +2 -1
- package/docs/webapi/fillField.mustache +1 -0
- package/docs/webapi/forceClick.mustache +1 -0
- package/docs/webapi/forceRightClick.mustache +1 -0
- package/docs/webapi/grabDataFromPerformanceTiming.mustache +2 -1
- package/docs/webapi/moveCursorTo.mustache +1 -0
- package/docs/webapi/openNewTab.mustache +6 -4
- package/docs/webapi/pressKey.mustache +2 -1
- package/docs/webapi/pressKeyDown.mustache +1 -0
- package/docs/webapi/pressKeyUp.mustache +1 -0
- package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -0
- package/docs/webapi/refreshPage.mustache +1 -0
- package/docs/webapi/resizeWindow.mustache +2 -1
- package/docs/webapi/rightClick.mustache +1 -0
- package/docs/webapi/saveElementScreenshot.mustache +1 -0
- package/docs/webapi/saveScreenshot.mustache +2 -1
- package/docs/webapi/say.mustache +2 -1
- package/docs/webapi/scrollIntoView.mustache +1 -0
- package/docs/webapi/scrollPageToBottom.mustache +1 -0
- package/docs/webapi/scrollPageToTop.mustache +1 -0
- package/docs/webapi/scrollTo.mustache +2 -1
- package/docs/webapi/see.mustache +2 -1
- package/docs/webapi/seeAttributesOnElements.mustache +2 -1
- package/docs/webapi/seeCheckboxIsChecked.mustache +1 -0
- package/docs/webapi/seeCookie.mustache +1 -0
- package/docs/webapi/seeCssPropertiesOnElements.mustache +2 -1
- package/docs/webapi/seeCurrentUrlEquals.mustache +2 -1
- package/docs/webapi/seeElement.mustache +2 -1
- package/docs/webapi/seeElementInDOM.mustache +1 -0
- package/docs/webapi/seeInCurrentUrl.mustache +2 -1
- package/docs/webapi/seeInField.mustache +1 -0
- package/docs/webapi/seeInPopup.mustache +1 -0
- package/docs/webapi/seeInSource.mustache +2 -1
- package/docs/webapi/seeInTitle.mustache +2 -1
- package/docs/webapi/seeNumberOfElements.mustache +1 -0
- package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -0
- package/docs/webapi/seeTextEquals.mustache +2 -1
- package/docs/webapi/seeTitleEquals.mustache +6 -5
- package/docs/webapi/selectOption.mustache +1 -0
- package/docs/webapi/setCookie.mustache +1 -0
- package/docs/webapi/setGeoLocation.mustache +1 -0
- package/docs/webapi/switchTo.mustache +2 -1
- package/docs/webapi/switchToNextTab.mustache +8 -7
- package/docs/webapi/switchToPreviousTab.mustache +8 -7
- package/docs/webapi/type.mustache +1 -0
- package/docs/webapi/uncheckOption.mustache +2 -1
- package/docs/webapi/wait.mustache +2 -1
- package/docs/webapi/waitForClickable.mustache +2 -1
- package/docs/webapi/waitForDetached.mustache +2 -1
- package/docs/webapi/waitForElement.mustache +2 -1
- package/docs/webapi/waitForEnabled.mustache +2 -1
- package/docs/webapi/waitForFunction.mustache +1 -0
- package/docs/webapi/waitForInvisible.mustache +2 -1
- package/docs/webapi/waitForText.mustache +2 -1
- package/docs/webapi/waitForValue.mustache +1 -0
- package/docs/webapi/waitForVisible.mustache +1 -0
- package/docs/webapi/waitInUrl.mustache +2 -1
- package/docs/webapi/waitNumberOfVisibleElements.mustache +2 -1
- package/docs/webapi/waitToHide.mustache +2 -1
- package/docs/webapi/waitUrlEquals.mustache +2 -1
- package/lib/command/definitions.js +9 -0
- package/lib/command/run.js +2 -2
- package/lib/command/workers/runTests.js +40 -0
- package/lib/helper/ApiDataFactory.js +4 -3
- package/lib/helper/Appium.js +7 -2
- package/lib/helper/GraphQL.js +4 -2
- package/lib/helper/GraphQLDataFactory.js +3 -3
- package/lib/helper/JSONResponse.js +1 -1
- package/lib/helper/Playwright.js +49 -13
- package/lib/helper/REST.js +4 -1
- package/lib/helper/WebDriver.js +6 -0
- package/lib/interfaces/bdd.js +5 -0
- package/lib/listener/steps.js +1 -0
- package/lib/plugin/fakerTransform.js +1 -1
- package/lib/plugin/stepByStepReport.js +8 -6
- package/lib/workers.js +12 -0
- package/package.json +3 -3
- package/typings/types.d.ts +558 -607
|
@@ -142,18 +142,20 @@ module.exports = function (config) {
|
|
|
142
142
|
if (step.metaStep && step.metaStep.name === 'BeforeSuite') return;
|
|
143
143
|
|
|
144
144
|
const fileName = `${pad.substring(0, pad.length - stepNum.toString().length) + stepNum.toString()}.png`;
|
|
145
|
+
if (step.status === 'failed') {
|
|
146
|
+
scenarioFailed = true;
|
|
147
|
+
}
|
|
148
|
+
stepNum++;
|
|
149
|
+
slides[fileName] = step;
|
|
145
150
|
try {
|
|
146
|
-
if (step.status === 'failed') {
|
|
147
|
-
scenarioFailed = true;
|
|
148
|
-
}
|
|
149
|
-
stepNum++;
|
|
150
|
-
slides[fileName] = step;
|
|
151
151
|
await helper.saveScreenshot(path.relative(reportDir, path.join(dir, fileName)), config.fullPageScreenshots);
|
|
152
152
|
} catch (err) {
|
|
153
153
|
output.plugin(`Can't save step screenshot: ${err}`);
|
|
154
154
|
error = err;
|
|
155
|
+
return;
|
|
156
|
+
} finally {
|
|
157
|
+
savedStep = step;
|
|
155
158
|
}
|
|
156
|
-
savedStep = step;
|
|
157
159
|
|
|
158
160
|
if (!currentTest.artifacts.screenshots) currentTest.artifacts.screenshots = [];
|
|
159
161
|
// added attachments to test
|
package/lib/workers.js
CHANGED
|
@@ -358,6 +358,18 @@ class Workers extends EventEmitter {
|
|
|
358
358
|
case event.test.after:
|
|
359
359
|
this.emit(event.test.after, repackTest(message.data));
|
|
360
360
|
break;
|
|
361
|
+
case event.step.finished:
|
|
362
|
+
this.emit(event.step.finished, message.data);
|
|
363
|
+
break;
|
|
364
|
+
case event.step.started:
|
|
365
|
+
this.emit(event.step.started, message.data);
|
|
366
|
+
break;
|
|
367
|
+
case event.step.passed:
|
|
368
|
+
this.emit(event.step.passed, message.data);
|
|
369
|
+
break;
|
|
370
|
+
case event.step.failed:
|
|
371
|
+
this.emit(event.step.failed, message.data);
|
|
372
|
+
break;
|
|
361
373
|
}
|
|
362
374
|
});
|
|
363
375
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@codeceptjs/detox-helper": "^1.0.2",
|
|
94
94
|
"@codeceptjs/mock-request": "^0.3.1",
|
|
95
|
+
"@faker-js/faker": "^5.5.3",
|
|
95
96
|
"@pollyjs/adapter-puppeteer": "^5.1.0",
|
|
96
97
|
"@pollyjs/core": "^5.1.0",
|
|
97
98
|
"@types/inquirer": "^0.0.35",
|
|
@@ -112,7 +113,6 @@
|
|
|
112
113
|
"eslint-plugin-mocha": "^6.3.0",
|
|
113
114
|
"expect": "^26.6.2",
|
|
114
115
|
"express": "^4.17.2",
|
|
115
|
-
"faker": "5.5.3",
|
|
116
116
|
"form-data": "^3.0.1",
|
|
117
117
|
"graphql": "^14.6.0",
|
|
118
118
|
"husky": "^4.3.8",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"npm": ">=5.6.0"
|
|
146
146
|
},
|
|
147
147
|
"peerDependencies": {
|
|
148
|
-
"faker": "^5.5.
|
|
148
|
+
"@faker-js/faker": "^5.5.3"
|
|
149
149
|
},
|
|
150
150
|
"es6": true,
|
|
151
151
|
"husky": {
|