@zohodesk/testinglibrary 0.4.13-experimental → 0.4.14-experimental

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.
@@ -23,14 +23,13 @@ async function performLoginSteps({
23
23
  const fileMutex = new _fileMutex.default((0, _checkAuthCookies.getAuthFileDirectory)(), lockFileName, _fileMutexConfig.LOGIN_MUTEX_TIMEOUT);
24
24
  try {
25
25
  const cookiesExist = await (0, _checkAuthCookies.loadCookiesIfPresent)(page, authFile);
26
+ await page.goto(process.env.domain);
27
+ await Promise.race([page.waitForNavigation(), page.waitForLoadState('networkidle'), page.waitForTimeout(5000)]);
28
+ const isAlreadyLoggedIn = await isLoggedIn(page);
26
29
  if (cookiesExist && isAlreadyLoggedIn) {
27
30
  console.log('Account is already logged in. Skipping lock.');
28
31
  } else {
29
32
  await fileMutex.acquire();
30
- await (0, _checkAuthCookies.loadCookiesIfPresent)(page, authFile);
31
- await page.goto(process.env.domain);
32
- await Promise.race([page.waitForNavigation(), page.waitForLoadState('networkidle'), page.waitForTimeout(5000)]);
33
- const isAlreadyLoggedIn = await isLoggedIn(page);
34
33
  try {
35
34
  if (!isAlreadyLoggedIn) {
36
35
  await (0, _accountLogin.default)(page, useremail, password);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.4.13-experimental",
3
+ "version": "0.4.14-experimental",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.4.13-experimental",
3
+ "version": "0.4.14-experimental",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {