@zohodesk/testinglibrary 4.0.1 → 4.0.3

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 CHANGED
@@ -16,6 +16,21 @@
16
16
  ### Generate Report
17
17
 
18
18
  - npm run report
19
+
20
+
21
+ ### v4.0.3 - 17-12-2025
22
+
23
+ #### Enhancement
24
+ - Cookie storage prefix support is provided in this version.
25
+
26
+
27
+ ### v4.0.2 - 16-12-2025
28
+
29
+ #### Bug Fixes
30
+
31
+ - Deprecated the react and react hooks from dependencies
32
+ - @cucumber/cucumber - 10.9.0 version downgraded due to Missing Step Definition Issue
33
+
19
34
 
20
35
  ### v4.0.0 - 04-12-2025
21
36
 
@@ -28,10 +43,6 @@
28
43
  - @playwright/test - 1.56.1,
29
44
  - @cucumber/cucumber - 12.2.0
30
45
 
31
- ### v3.2.18 - 09-12-2025
32
-
33
- #### Enhancement
34
- - Cookie storage prefix support is provided in this version.
35
46
 
36
47
  ### v3.2.15 - 14-11-2025
37
48
 
@@ -41,8 +41,7 @@ async function executeDefaultLoginSteps(context, testInfo, testDetails, testPort
41
41
  }
42
42
  try {
43
43
  const projectName = testInfo.project.name;
44
- const authFileName = process.env.authFileName;
45
- testDetails.authFilePrefix = authFileName;
44
+ testDetails.authFilePrefix = process.env.authFilePrefix;
46
45
  if (testPortalDetails && projectName !== 'setup' && projectName !== 'cleanup') {
47
46
  await context.clearCookies();
48
47
  await (0, _auth.performLoginSteps)(testDetails, async testInfo => {
@@ -19,16 +19,14 @@ async function performLoginSteps(testInfo, isLoggedIn, loginSteps) {
19
19
  email
20
20
  } = testInfo;
21
21
  let authFileName;
22
- if (!authFilePrefix) {
23
- authFileName = email;
24
- } else if (authFilePrefix.includes(email)) {
25
- authFileName = authFilePrefix;
22
+ if (authFilePrefix) {
23
+ authFileName = `${authFilePrefix}-${email}`;
24
+ process.env.authFilePrefix = authFilePrefix;
26
25
  } else {
27
- authFileName = authFilePrefix + email;
26
+ authFileName = `${email}`;
28
27
  }
29
- process.env.authFileName = authFileName;
30
28
  const authFile = _path.default.resolve(_path.default.join((0, _checkAuthCookies.getAuthFileDirectory)(), `${authFileName}-cookies.json`));
31
- const lockFileName = authFileName.replace(/[@.]/g, '_');
29
+ const lockFileName = `${authFileName}`.replace(/[@.]/g, '_');
32
30
  const fileMutex = new _fileMutex.default((0, _checkAuthDirectory.getLockDirectoryPath)(), lockFileName, _fileMutexConfig.fileDeletionTimeoutConfig);
33
31
  let loginUsingCookie = false;
34
32
  try {
@@ -16,9 +16,14 @@ var _mergeObjects = require("./helpers/mergeObjects");
16
16
  var _Configuration = _interopRequireDefault(require("./configuration/Configuration"));
17
17
  var _UserArgs = _interopRequireDefault(require("./configuration/UserArgs"));
18
18
  var _ConfigurationHelper = require("./configuration/ConfigurationHelper");
19
+ var _auth = require("./helpers/auth");
19
20
  let cachedConfig = null;
20
21
  function getPrimaryCookiePath() {
21
- const authFileName = process.env.authFileName;
22
+ const {
23
+ email
24
+ } = (0, _auth.getDefaultActor)();
25
+ const authFilePrefix = process.env.authFilePrefix;
26
+ let authFileName = authFilePrefix ? `${authFilePrefix}-${email}` : `${email}`;
22
27
  return `uat/playwright/.auth/${authFileName}-cookies.json`;
23
28
  }
24
29
  function getDefaultConfig() {
@@ -31,7 +31,6 @@ class SpawnRunner extends _Runner.default {
31
31
  });
32
32
  }
33
33
  runPreprocessing() {
34
- console.log("Node version:", process.version);
35
34
  //This below functoin is called to copy the data generator spec files to the current project
36
35
  (0, _commonUtils.copyCommonSpecs)();
37
36
  const {
package/build/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import {
3
3
  test,
4
4
  createBdd
5
5
  } from './core/playwright/index';
6
- import { fireEvent, render } from '@testing-library/react';
7
6
  import {
8
7
  PlaywrightTestArgs,
9
8
  PlaywrightTestOptions,
package/build/index.js CHANGED
@@ -89,8 +89,6 @@ Object.defineProperty(exports, "verifyIfCookieFileExists", {
89
89
  }
90
90
  });
91
91
  var _index = require("./core/playwright/index");
92
- // import { fireEvent, render } from '@testing-library/react';
93
-
94
92
  const {
95
93
  Given,
96
94
  Then,