@zohodesk/testinglibrary 0.0.5-exp.7 → 0.0.5-exp.9

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.
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "expect", {
18
18
  exports.test = void 0;
19
19
  var _bddFramework = require("../../bdd-framework");
20
20
  var _test = require("@playwright/test");
21
+ var _readConfigFile = require("./readConfigFile");
21
22
  // function test(descrition, callback) {
22
23
  // return test(descrition, ({ page }) => {
23
24
  // const { locator, ...custompage } = page
@@ -48,6 +49,9 @@ var _test = require("@playwright/test");
48
49
  // }
49
50
  // }
50
51
  // }
52
+ const {
53
+ additionalPages = {}
54
+ } = (0, _readConfigFile.generateConfigFromFile)();
51
55
  const test = _bddFramework.test.extend({
52
56
  page: async ({
53
57
  baseURL,
@@ -91,6 +95,9 @@ const test = _bddFramework.test.extend({
91
95
  }, use) => {
92
96
  await context.addInitScript(() => window.localStorage.setItem('isDnBannerHide', true));
93
97
  await use(context);
94
- }
98
+ },
99
+ ...additionalPages
95
100
  });
101
+
102
+ // const { Given, When, Then } = createBdd();
96
103
  exports.test = test;
@@ -28,6 +28,7 @@ const fileName = 'uat.config.js';
28
28
  * @property {boolean} bddMode: Feature files needs to be processed
29
29
  * @property {number} expectTimeout: time in milliseconds which the expect condition should fail
30
30
  * @property {number} testTimeout: time in milliseconds which the test should fail
31
+ * @property {Object} additionalPages: custom pages configuration
31
32
  */
32
33
 
33
34
  /**
@@ -15,6 +15,7 @@
15
15
  * @property {boolean} bddMode: Feature files needs to be processed
16
16
  * @property {number} expectTimeout: time in milliseconds which the expect condition should fail
17
17
  * @property {number} testTimeout: time in milliseconds which the test should fail
18
+ * @property {Object} additionalPages: custom pages configuration
18
19
  */
19
20
 
20
21
  /**
package/changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Framework that abstracts the configuration for playwright and Jest
4
4
 
5
+ # 0.0.5-exp.8
6
+
7
+ - Additional pages support added as config
8
+
5
9
  # 0.0.5-exp.5
6
10
 
7
11
  - Added expect timeout and test timeout as an option
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.0.5-exp.7",
3
+ "version": "0.0.5-exp.9",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {