@zohodesk/testinglibrary 3.2.6 → 3.2.7
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/README.md +5 -0
- package/build/common/multi-actor/steps/additionalContext.spec.js +6 -2
- package/build/core/playwright/builtInFixtures/{actorCtx.js → actorContext.js} +1 -1
- package/build/core/playwright/builtInFixtures/index.js +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { createBdd } from '@zohodesk/testinglibrary';
|
|
2
2
|
const { BeforeScenario, Given } = createBdd();
|
|
3
3
|
|
|
4
|
-
BeforeScenario(async function({
|
|
4
|
+
BeforeScenario(async function({ page, context, browser, executionContext, actorContext }) {
|
|
5
5
|
// This will run before each scenario and set all the fixtures into this context
|
|
6
|
+
this.page = page;
|
|
7
|
+
this.context = context;
|
|
8
|
+
this.browser = browser;
|
|
9
|
+
this.executionContext = executionContext;
|
|
6
10
|
this.setActor = async (role) => {
|
|
7
|
-
const userPage =
|
|
11
|
+
const userPage = actorContext.actorsObj[role];
|
|
8
12
|
if (userPage) {
|
|
9
13
|
this.page = userPage.page;
|
|
10
14
|
this.context = userPage.context;
|
|
@@ -12,14 +12,14 @@ var _addTags = _interopRequireDefault(require("./addTags"));
|
|
|
12
12
|
var _i18N = _interopRequireDefault(require("./i18N"));
|
|
13
13
|
var _unauthenticatedPage = _interopRequireDefault(require("./unauthenticatedPage"));
|
|
14
14
|
var _executionContext = _interopRequireDefault(require("./executionContext"));
|
|
15
|
-
var
|
|
15
|
+
var _actorContext = _interopRequireDefault(require("./actorContext"));
|
|
16
16
|
function extractTagsFromTitle(text) {
|
|
17
17
|
return text.match(/@\w+/g) || [];
|
|
18
18
|
}
|
|
19
19
|
function getBuiltInFixtures(bddMode) {
|
|
20
20
|
let builtInFixtures = {
|
|
21
21
|
..._page.default,
|
|
22
|
-
...
|
|
22
|
+
..._actorContext.default,
|
|
23
23
|
..._context.default,
|
|
24
24
|
..._cacheLayer.default,
|
|
25
25
|
..._i18N.default,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@zohodesk/testinglibrary",
|
|
9
|
-
"version": "3.2.
|
|
9
|
+
"version": "3.2.7",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|