@zohodesk/testinglibrary 4.0.1 → 4.0.2

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
@@ -17,22 +17,6 @@
17
17
 
18
18
  - npm run report
19
19
 
20
- ### v4.0.0 - 04-12-2025
21
-
22
- #### Features
23
- - Supported node 20 for the testing-framework
24
-
25
- - Below package versions are updated in this release.
26
- - playwright - 1.56.1,
27
- - playwright-bdd - 8.4.2,
28
- - @playwright/test - 1.56.1,
29
- - @cucumber/cucumber - 12.2.0
30
-
31
- ### v3.2.18 - 09-12-2025
32
-
33
- #### Enhancement
34
- - Cookie storage prefix support is provided in this version.
35
-
36
20
  ### v3.2.15 - 14-11-2025
37
21
 
38
22
  #### Enhancement
@@ -41,8 +41,6 @@ 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;
46
44
  if (testPortalDetails && projectName !== 'setup' && projectName !== 'cleanup') {
47
45
  await context.clearCookies();
48
46
  await (0, _auth.performLoginSteps)(testDetails, async testInfo => {
@@ -18,22 +18,14 @@ async function performLoginSteps(testInfo, isLoggedIn, loginSteps) {
18
18
  authFilePrefix,
19
19
  email
20
20
  } = testInfo;
21
- let authFileName;
22
- if (!authFilePrefix) {
23
- authFileName = email;
24
- } else if (authFilePrefix.includes(email)) {
25
- authFileName = authFilePrefix;
26
- } else {
27
- authFileName = authFilePrefix + email;
28
- }
29
- process.env.authFileName = authFileName;
30
- const authFile = _path.default.resolve(_path.default.join((0, _checkAuthCookies.getAuthFileDirectory)(), `${authFileName}-cookies.json`));
31
- const lockFileName = authFileName.replace(/[@.]/g, '_');
21
+ authFilePrefix = authFilePrefix || email;
22
+ const authFile = _path.default.resolve(_path.default.join((0, _checkAuthCookies.getAuthFileDirectory)(), `${authFilePrefix}-cookies.json`));
23
+ const lockFileName = email.replace(/[@.]/g, '_');
32
24
  const fileMutex = new _fileMutex.default((0, _checkAuthDirectory.getLockDirectoryPath)(), lockFileName, _fileMutexConfig.fileDeletionTimeoutConfig);
33
25
  let loginUsingCookie = false;
34
26
  try {
35
27
  if ((0, _checkAuthCookies.verifyIfCookieFileExists)(authFile)) {
36
- console.log(`${authFileName} Cookie file exists. Loading cookies, worker index - ${process.env.TEST_WORKER_INDEX}`);
28
+ console.log(`${email} Cookie file exists. Loading cookies, worker index - ${process.env.TEST_WORKER_INDEX}`);
37
29
  loginUsingCookie = true;
38
30
  } else {
39
31
  await fileMutex.acquire();
@@ -48,7 +40,7 @@ async function performLoginSteps(testInfo, isLoggedIn, loginSteps) {
48
40
  });
49
41
  }
50
42
  } catch (error) {
51
- console.error(`Error during login for ${authFileName}:`, error);
43
+ console.error(`Error during login for ${email}:`, error);
52
44
  } finally {
53
45
  if (!loginUsingCookie) {
54
46
  await fileMutex.release();
@@ -17,10 +17,6 @@ var _Configuration = _interopRequireDefault(require("./configuration/Configurati
17
17
  var _UserArgs = _interopRequireDefault(require("./configuration/UserArgs"));
18
18
  var _ConfigurationHelper = require("./configuration/ConfigurationHelper");
19
19
  let cachedConfig = null;
20
- function getPrimaryCookiePath() {
21
- const authFileName = process.env.authFileName;
22
- return `uat/playwright/.auth/${authFileName}-cookies.json`;
23
- }
24
20
  function getDefaultConfig() {
25
21
  return {
26
22
  isTearDown: true,
@@ -37,7 +33,7 @@ function getDefaultConfig() {
37
33
  bddMode: false,
38
34
  expectTimeout: 5 * 1000,
39
35
  testTimeout: 60 * 1000,
40
- authFilePath: getPrimaryCookiePath(),
36
+ authFilePath: 'uat/playwright/.auth/user.json',
41
37
  viewport: {
42
38
  width: 1280,
43
39
  height: 720
@@ -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,