@zohodesk/testinglibrary 0.0.5-exp.24 → 0.0.5-exp.26
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/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@playwright/test/types/test';
|
|
@@ -27,8 +27,8 @@ if (!existsSync(authDirectory)) {
|
|
|
27
27
|
mkdirSync(authDirectory, { recursive: true });
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
userdata.
|
|
31
|
-
|
|
30
|
+
userdata.forEach((data) => {
|
|
31
|
+
const authFile = path.resolve(path.join(authDirectory, `${data.filename}`));
|
|
32
32
|
if (!existsSync(authFile)) {
|
|
33
33
|
console.log('creating auth file..');
|
|
34
34
|
writeFileSync(authFile, JSON.stringify(authContent, null, 2))
|
|
@@ -38,7 +38,7 @@ userdata.map((data) => {
|
|
|
38
38
|
try {
|
|
39
39
|
const cookies = readFileSync(authFile);
|
|
40
40
|
const parsedCookies = convertCookiesToParse(cookies, authFile);
|
|
41
|
-
await page.context().addCookies(parsedCookies.cookies
|
|
41
|
+
await page.context().addCookies(parsedCookies.cookies === undefined ? [] : parsedCookies.cookies)
|
|
42
42
|
await page.goto(page.getBaseUrl());
|
|
43
43
|
await page.waitForLoadState();
|
|
44
44
|
if (await page.url().includes(process.env.domain)) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"useremail": "/ user name /",
|
|
4
4
|
"password": "/ password /",
|
|
5
5
|
"description": "/ description/",
|
|
6
|
-
"filename": "/ filename/",
|
|
7
|
-
"locator": "/
|
|
6
|
+
"filename": "/ filename in json format/",
|
|
7
|
+
"locator": "/ selector to identify page has been loaded completely /"
|
|
8
8
|
}
|
|
9
9
|
]
|
|
@@ -69,7 +69,7 @@ function createAuthenticationFile() {
|
|
|
69
69
|
recursive: true
|
|
70
70
|
});
|
|
71
71
|
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'auth.setup.js'), getSetupFileAsString('auth-setup-sample.js'), null, 2);
|
|
72
|
-
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', '
|
|
72
|
+
(0, _fs.writeFileSync)(_path.default.resolve(process.cwd(), 'uat', 'fixtures', 'authUsers.json'), getSetupFileAsString('authUsers-sample.json'), null, 2);
|
|
73
73
|
} catch (err) {
|
|
74
74
|
_logger.Logger.log(_logger.Logger.FAILURE_TYPE, 'Something went wrong ! Folder not Created. Please re-initialize npm init-uat');
|
|
75
75
|
}
|
package/changelog.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Framework that abstracts the configuration for playwright and Jest
|
|
4
4
|
|
|
5
|
+
# 0.0.5-exp.26
|
|
6
|
+
|
|
7
|
+
- Type definitions for playwright added
|
|
8
|
+
|
|
9
|
+
# 0.0.5-exp.25
|
|
10
|
+
|
|
11
|
+
- Minor fixes while settting up/initializing project
|
|
12
|
+
|
|
5
13
|
# 0.0.5-exp.24
|
|
6
14
|
|
|
7
15
|
- Exclude sample files from babel compilation
|