@zohodesk/testinglibrary 0.1.9-exp-actors → 0.2.0
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/build/bdd-framework/cli/commands/env.js +1 -1
- package/build/bdd-framework/cli/commands/export.js +18 -3
- package/build/bdd-framework/decorators.js +2 -2
- package/build/bdd-framework/gen/formatter.js +57 -13
- package/build/bdd-framework/gen/index.js +21 -9
- package/build/bdd-framework/gen/specialTags.js +70 -0
- package/build/bdd-framework/gen/testFile.js +10 -5
- package/build/bdd-framework/gen/testNode.js +4 -29
- package/build/bdd-framework/gen/testPoms.js +1 -1
- package/build/bdd-framework/index.js +1 -1
- package/build/bdd-framework/playwright/testTypeImpl.js +28 -10
- package/build/bdd-framework/playwright/types.js +8 -1
- package/build/bdd-framework/playwright/utils.js +22 -0
- package/build/bdd-framework/reporter/cucumber/base.js +2 -7
- package/build/bdd-framework/reporter/cucumber/html.js +9 -4
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/AttachmentMapper.js +28 -10
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Builder.js +21 -20
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Hook.js +3 -3
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRun.js +46 -18
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRunHooks.js +41 -20
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepAttachments.js +19 -2
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepRun.js +42 -16
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/{pwUtils.js → pwStepUtils.js} +33 -14
- package/build/bdd-framework/run/StepInvoker.js +8 -7
- package/build/bdd-framework/run/bddData/index.js +59 -0
- package/build/bdd-framework/run/bddData/types.js +5 -0
- package/build/bdd-framework/run/bddFixtures.js +5 -4
- package/build/bdd-framework/run/bddWorld.js +3 -3
- package/build/bdd-framework/run/bddWorldInternal.js +1 -5
- package/build/bdd-framework/snippets/index.js +1 -1
- package/build/bdd-framework/steps/createBdd.js +78 -0
- package/build/bdd-framework/steps/decorators/class.js +68 -0
- package/build/bdd-framework/steps/decorators/steps.js +98 -0
- package/build/bdd-framework/steps/defineStep.js +62 -0
- package/build/bdd-framework/steps/stepConfig.js +24 -0
- package/build/core/playwright/env-initializer.js +17 -2
- package/build/core/playwright/helpers/configFileNameProvider.js +1 -0
- package/build/core/playwright/index.js +14 -71
- package/build/core/playwright/readConfigFile.js +13 -2
- package/build/index.d.ts +2 -21
- package/changelog.md +14 -0
- package/npm-shrinkwrap.json +1 -1
- package/package.json +3 -2
- package/build/bdd-framework/run/bddDataAttachment.js +0 -46
package/build/index.d.ts
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
expect,
|
|
3
3
|
test,
|
|
4
|
-
|
|
5
|
-
getRunMode,
|
|
6
|
-
isCI,
|
|
7
|
-
isDevelopmentSetup,
|
|
8
|
-
getListOfActors,
|
|
9
|
-
getDefaultActor,
|
|
10
|
-
getUserForSelectedEditionAndProfile,
|
|
11
|
-
loadCookiesIfPresent,
|
|
12
|
-
performLoginSteps,
|
|
13
|
-
verifyIfCookieFileExists
|
|
4
|
+
createBdd
|
|
14
5
|
} from './core/playwright/index';
|
|
15
6
|
import { fireEvent, render } from '@testing-library/react';
|
|
16
7
|
import {
|
|
@@ -81,17 +72,7 @@ export {
|
|
|
81
72
|
expect,
|
|
82
73
|
test,
|
|
83
74
|
createBdd,
|
|
84
|
-
Page
|
|
85
|
-
accountLogin,
|
|
86
|
-
getRunMode,
|
|
87
|
-
isCI,
|
|
88
|
-
isDevelopmentSetup,
|
|
89
|
-
getListOfActors,
|
|
90
|
-
getDefaultActor,
|
|
91
|
-
getUserForSelectedEditionAndProfile,
|
|
92
|
-
loadCookiesIfPresent,
|
|
93
|
-
performLoginSteps,
|
|
94
|
-
verifyIfCookieFileExists
|
|
75
|
+
Page
|
|
95
76
|
};
|
|
96
77
|
|
|
97
78
|
export * from '@playwright/test/types/test';
|
package/changelog.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Framework that abstracts the configuration for playwright and Jest
|
|
4
4
|
|
|
5
|
+
# 1.0.0
|
|
6
|
+
**Major Breaking Change**
|
|
7
|
+
- Removed Env-config.json in favour of conf/*/settings.json
|
|
8
|
+
- Mode in uat.config.js is deprecated. Use command args instead
|
|
9
|
+
|
|
10
|
+
**Enhancements**
|
|
11
|
+
- Playwright version updated to 1.42.1
|
|
12
|
+
- Playwright-bdd version updated to 6.1.1
|
|
13
|
+
- Tags Support
|
|
14
|
+
- Added getMetaInfo fixture to get the actors Info data
|
|
15
|
+
|
|
16
|
+
**Issue Fixes**
|
|
17
|
+
- Fixes #10- Mode config not working properly
|
|
18
|
+
|
|
5
19
|
# 0.1.9
|
|
6
20
|
**Enhancements**
|
|
7
21
|
- Added option to specify browsers in command line.
|
package/npm-shrinkwrap.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": "./build/index.js",
|
|
17
|
-
"./decorators": "./build/decorators.js"
|
|
17
|
+
"./decorators": "./build/decorators.js",
|
|
18
|
+
"./helpers": "./build/core/playwright/helpers/auth/index.js"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [],
|
|
20
21
|
"author": "",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.BddData = void 0;
|
|
7
|
-
exports.getBddDataFromTestResult = getBddDataFromTestResult;
|
|
8
|
-
exports.isBddDataAttachment = isBddDataAttachment;
|
|
9
|
-
var _createTestStep = require("../cucumber/createTestStep");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
const BDD_DATA_ATTACHMENT_NAME = '__bddData';
|
|
12
|
-
class BddData {
|
|
13
|
-
world;
|
|
14
|
-
steps = [];
|
|
15
|
-
constructor(world) {
|
|
16
|
-
this.world = world;
|
|
17
|
-
}
|
|
18
|
-
registerStep(stepDefinition, stepText, pwStepLocation) {
|
|
19
|
-
const step = (0, _createTestStep.createTestStep)(stepDefinition, stepText);
|
|
20
|
-
this.steps.push({
|
|
21
|
-
pwStepLocation: (0, _utils.stringifyLocation)(pwStepLocation),
|
|
22
|
-
stepMatchArgumentsLists: step.stepMatchArgumentsLists || []
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
async attach(testMeta, uri) {
|
|
26
|
-
const attachment = {
|
|
27
|
-
uri,
|
|
28
|
-
pickleLocation: testMeta.pickleLocation,
|
|
29
|
-
steps: this.steps
|
|
30
|
-
};
|
|
31
|
-
await this.world.testInfo.attach(BDD_DATA_ATTACHMENT_NAME, {
|
|
32
|
-
contentType: 'application/json',
|
|
33
|
-
body: JSON.stringify(attachment)
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.BddData = BddData;
|
|
38
|
-
function getBddDataFromTestResult(result) {
|
|
39
|
-
var _attachment$body;
|
|
40
|
-
const attachment = result.attachments.find(isBddDataAttachment);
|
|
41
|
-
const attachmentBody = attachment === null || attachment === void 0 || (_attachment$body = attachment.body) === null || _attachment$body === void 0 ? void 0 : _attachment$body.toString();
|
|
42
|
-
return attachmentBody ? JSON.parse(attachmentBody) : undefined;
|
|
43
|
-
}
|
|
44
|
-
function isBddDataAttachment(attachment) {
|
|
45
|
-
return attachment.name === BDD_DATA_ATTACHMENT_NAME;
|
|
46
|
-
}
|