@zohodesk/testinglibrary 3.0.4 → 3.0.8
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/.gitlab-ci.yml +26 -13
- package/README.md +27 -0
- package/build/core/playwright/builtInFixtures/page.js +44 -39
- package/build/core/playwright/constants/fileMutexConfig.js +7 -3
- package/build/core/playwright/custom-commands.js +1 -1
- package/build/core/playwright/helpers/auth/loginSteps.js +15 -14
- package/build/core/playwright/helpers/checkAuthDirectory.js +10 -0
- package/build/core/playwright/helpers/fileMutex.js +20 -23
- package/build/core/playwright/runner/Runner.js +22 -0
- package/build/core/playwright/runner/RunnerHelper.js +43 -0
- package/build/core/playwright/runner/RunnerTypes.js +17 -0
- package/build/core/playwright/runner/SpawnRunner.js +110 -0
- package/build/core/playwright/setup/config-creator.js +10 -5
- package/build/core/playwright/test-runner.js +8 -34
- package/build/setup-folder-structure/samples/accountLogin-sample.js +19 -0
- package/build/setup-folder-structure/samples/auth-setup-sample.js +4 -10
- package/build/setup-folder-structure/samples/testSetup-sample.js +14 -0
- package/build/setup-folder-structure/samples/uat-config-sample.js +3 -1
- package/build/setup-folder-structure/setupProject.js +4 -0
- package/build/test/core/playwright/helpers/__tests__/fileMutex.test.js +45 -68
- package/build/test/core/playwright/runner/__tests__/RunnerHelper.test.js +16 -0
- package/build/test/core/playwright/runner/__tests__/SpawnRunner.test.js +27 -0
- package/npm-shrinkwrap.json +817 -494
- package/package.json +8 -7
- package/playwright.config.js +0 -48
- package/zohodesk-testinglibrary-3.0.4.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@babel/preset-react": "7.22.5",
|
|
25
25
|
"@cucumber/cucumber": "11.0.1",
|
|
26
26
|
"@playwright/test": "1.48.0",
|
|
27
|
+
"@reportportal/agent-js-playwright": "5.1.11",
|
|
27
28
|
"@testing-library/jest-dom": "5.11.9",
|
|
28
29
|
"@testing-library/react": "11.2.7",
|
|
29
30
|
"@testing-library/react-hooks": "7.0.2",
|
|
@@ -32,19 +33,19 @@
|
|
|
32
33
|
"fast-glob": "3.3.1",
|
|
33
34
|
"jest": "29.6.2",
|
|
34
35
|
"jest-environment-jsdom": "29.6.2",
|
|
35
|
-
"lockfile": "^1.0.4",
|
|
36
36
|
"msw": "1.2.3",
|
|
37
37
|
"playwright": "1.48.0",
|
|
38
38
|
"supports-color": "8.1.1",
|
|
39
|
-
"playwright-bdd": "7.5.0"
|
|
39
|
+
"playwright-bdd": "7.5.0",
|
|
40
|
+
"proper-lockfile": "4.1.2"
|
|
40
41
|
},
|
|
41
42
|
"bin": {
|
|
42
43
|
"ZDTestingFramework": "./bin/cli.js"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
46
|
+
"eslint": "*",
|
|
45
47
|
"react": "*",
|
|
46
|
-
"react-dom": "*"
|
|
47
|
-
"eslint": "*"
|
|
48
|
+
"react-dom": "*"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@babel/cli": "7.22.15",
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"@babel/polyfill": "7.12.1",
|
|
55
56
|
"@babel/preset-env": "7.22.15",
|
|
56
57
|
"@babel/runtime": "7.22.15",
|
|
57
|
-
"commander": "
|
|
58
|
-
"jest-html-reporter": "
|
|
58
|
+
"commander": "11.0.0",
|
|
59
|
+
"jest-html-reporter": "3.10.2"
|
|
59
60
|
}
|
|
60
61
|
}
|
package/playwright.config.js
CHANGED
|
@@ -3,45 +3,23 @@ const { defineConfig, devices } = require('@playwright/test');
|
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const numCPUs = require('os').cpus().length;
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Read environment variables from file.
|
|
8
|
-
* https://github.com/motdotla/dotenv
|
|
9
|
-
*/
|
|
10
|
-
// require('dotenv').config();
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @see https://playwright.dev/docs/test-configuration
|
|
14
|
-
*/
|
|
15
6
|
export default defineConfig({
|
|
16
7
|
testDir: path.join(path.resolve(process.cwd()), 'uat'),
|
|
17
8
|
outputDir: path.join(process.cwd(), 'uat', 'test-results'),
|
|
18
|
-
/* Run tests in files in parallel */
|
|
19
9
|
fullyParallel: true,
|
|
20
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
21
|
-
//forbidOnly: !!process.env.CI,
|
|
22
|
-
/* Retry on CI only */
|
|
23
10
|
retries: process.env.CI ? 2 : 0,
|
|
24
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
25
11
|
reporter: [['html', { outputFolder: path.join(process.cwd(), 'uat', 'playwright-report'), open: "always" }]],
|
|
26
12
|
timeout: 60 * 1000,
|
|
27
13
|
expect: {
|
|
28
14
|
timeout: 5 * 1000,
|
|
29
15
|
},
|
|
30
|
-
|
|
31
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
32
16
|
use: {
|
|
33
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
34
|
-
//baseURL: process.env.domain,
|
|
35
|
-
|
|
36
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
37
17
|
trace: 'on',
|
|
38
18
|
video: {
|
|
39
19
|
mode: 'on',
|
|
40
20
|
size: { width: 640, height: 480 }
|
|
41
21
|
}
|
|
42
22
|
},
|
|
43
|
-
|
|
44
|
-
/* Configure projects for major browsers */
|
|
45
23
|
projects: [
|
|
46
24
|
{ name: 'setup', testMatch: /.*\.setup\.js/ },
|
|
47
25
|
{
|
|
@@ -79,32 +57,6 @@ export default defineConfig({
|
|
|
79
57
|
dependencies: ['setup'],
|
|
80
58
|
},
|
|
81
59
|
|
|
82
|
-
/* Test against mobile viewports. */
|
|
83
|
-
// {
|
|
84
|
-
// name: 'Mobile Chrome',
|
|
85
|
-
// use: { ...devices['Pixel 5'] },
|
|
86
|
-
// },
|
|
87
|
-
// {
|
|
88
|
-
// name: 'Mobile Safari',
|
|
89
|
-
// use: { ...devices['iPhone 12'] },
|
|
90
|
-
// },
|
|
91
|
-
|
|
92
|
-
/* Test against branded browsers. */
|
|
93
|
-
// {
|
|
94
|
-
// name: 'Microsoft Edge',
|
|
95
|
-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
96
|
-
// },
|
|
97
|
-
// {
|
|
98
|
-
// name: 'Google Chrome',
|
|
99
|
-
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
100
|
-
// },
|
|
101
60
|
],
|
|
102
|
-
|
|
103
|
-
/* Run your local dev server before starting the tests */
|
|
104
|
-
// webServer: {
|
|
105
|
-
// command: 'npm run start',
|
|
106
|
-
// url: 'http://127.0.0.1:3000',
|
|
107
|
-
// reuseExistingServer: !process.env.CI,
|
|
108
|
-
// },
|
|
109
61
|
});
|
|
110
62
|
|
|
Binary file
|