@zohodesk/testinglibrary 0.0.50-n20-experimental → 0.0.52-n20-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.
- package/.claude/worktrees/thirsty-yalow/.babelrc +24 -0
- package/.claude/worktrees/thirsty-yalow/.eslintrc.js +31 -0
- package/.claude/worktrees/thirsty-yalow/.gitlab-ci.yml +208 -0
- package/.claude/worktrees/thirsty-yalow/.prettierrc +6 -0
- package/.claude/worktrees/thirsty-yalow/README.md +234 -0
- package/.claude/worktrees/thirsty-yalow/bin/cli.js +3 -0
- package/.claude/worktrees/thirsty-yalow/bin/postinstall.js +1 -0
- package/.claude/worktrees/thirsty-yalow/changelog.md +167 -0
- package/.claude/worktrees/thirsty-yalow/jest.config.js +82 -0
- package/.claude/worktrees/thirsty-yalow/package.json +62 -0
- package/.claude/worktrees/thirsty-yalow/playwright.config.js +62 -0
- package/npm-shrinkwrap.json +248 -211
- package/package.json +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { existsSync } = require('fs');
|
|
3
|
+
const appPath = process.cwd();
|
|
4
|
+
|
|
5
|
+
const appGlobals = path.resolve(appPath, '__testUtils__', 'globals.js');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
reporters: [
|
|
9
|
+
"default",
|
|
10
|
+
[
|
|
11
|
+
"jest-html-reporter",
|
|
12
|
+
{
|
|
13
|
+
outputPath: "unit_reports/unit-report.html",
|
|
14
|
+
pageTitle: "Unit Report"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
],
|
|
18
|
+
rootDir: process.cwd(),
|
|
19
|
+
testEnvironment: 'node',
|
|
20
|
+
|
|
21
|
+
setupFilesAfterEnv: [
|
|
22
|
+
existsSync(appGlobals) && appGlobals,
|
|
23
|
+
path.resolve(__dirname, 'src', 'core', 'jest', 'setup', 'index.js')
|
|
24
|
+
].filter(Boolean),
|
|
25
|
+
|
|
26
|
+
transform: {
|
|
27
|
+
'^.+\\.(js|jsx)$': path.resolve(
|
|
28
|
+
__dirname,
|
|
29
|
+
'src',
|
|
30
|
+
'core',
|
|
31
|
+
'jest',
|
|
32
|
+
'preprocessor',
|
|
33
|
+
'jsPreprocessor.js'
|
|
34
|
+
),
|
|
35
|
+
'^.+\\.jsx?$': 'babel-jest'
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
testMatch: ['**/__tests__/**/*.test.js'],
|
|
39
|
+
|
|
40
|
+
modulePathIgnorePatterns: ['/build/'],
|
|
41
|
+
|
|
42
|
+
transformIgnorePatterns: [
|
|
43
|
+
'/node_modules/',
|
|
44
|
+
'/src/setup-folder-structure/samples/'
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
coveragePathIgnorePatterns:[
|
|
48
|
+
'/src/setup-folder-structure/samples/'
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
testPathIgnorePatterns: [
|
|
52
|
+
'/node_modules/',
|
|
53
|
+
'/build/',
|
|
54
|
+
'/uat/'
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
watchPathIgnorePatterns: [
|
|
58
|
+
'/node_modules/',
|
|
59
|
+
'/build/'
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
clearMocks: true,
|
|
63
|
+
resetMocks: false,
|
|
64
|
+
|
|
65
|
+
collectCoverage: true,
|
|
66
|
+
collectCoverageFrom: ['src/**/*.js'],
|
|
67
|
+
coverageDirectory: './build/cov',
|
|
68
|
+
coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
|
|
69
|
+
// coverageThreshold: {
|
|
70
|
+
// global: {
|
|
71
|
+
// branches: 100,
|
|
72
|
+
// functions: 100,
|
|
73
|
+
// lines: 100,
|
|
74
|
+
// statements: 100
|
|
75
|
+
// }
|
|
76
|
+
// },
|
|
77
|
+
globals: {
|
|
78
|
+
__DEVELOPMENT__: true,
|
|
79
|
+
__DOCS__: false,
|
|
80
|
+
__TEST__: true
|
|
81
|
+
}
|
|
82
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zohodesk/testinglibrary",
|
|
3
|
+
"version": "3.2.21",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./build/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node bin/postinstall.js",
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"clean": "rm -rf build && mkdir build",
|
|
10
|
+
"build-babel": "babel -d ./build ./src --copy-files",
|
|
11
|
+
"build": "npm run clean && npm run build-babel",
|
|
12
|
+
"prepare": "npm run build",
|
|
13
|
+
"lint": "eslint src/* --fix"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": "./build/index.js",
|
|
17
|
+
"./helpers": "./build/core/playwright/helpers/auth/index.js",
|
|
18
|
+
"./DataGenerator": "./build/core/dataGenerator/DataGenerator.js",
|
|
19
|
+
"./thirdPartyHelper": "./build/core/playwright/helpers/thirdPartyLib.js"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [],
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@babel/code-frame": "7.27.1",
|
|
26
|
+
"@babel/preset-react": "7.22.5",
|
|
27
|
+
"@cucumber/cucumber": "11.3.0",
|
|
28
|
+
"@playwright/test": "1.53.2",
|
|
29
|
+
"@reportportal/agent-js-playwright": "5.1.11",
|
|
30
|
+
"@testing-library/jest-dom": "5.11.9",
|
|
31
|
+
"babel-jest": "29.6.2",
|
|
32
|
+
"babel-plugin-transform-dynamic-import": "2.1.0",
|
|
33
|
+
"fast-glob": "3.3.1",
|
|
34
|
+
"jest": "29.6.2",
|
|
35
|
+
"jest-environment-jsdom": "29.6.2",
|
|
36
|
+
"msw": "1.2.3",
|
|
37
|
+
"playwright": "1.53.2",
|
|
38
|
+
"playwright-bdd": "8.3.1",
|
|
39
|
+
"properties-reader": "2.3.0",
|
|
40
|
+
"supports-color": "8.1.1",
|
|
41
|
+
"jsonpath": "^1.1.1"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"ZDTestingFramework": "./bin/cli.js"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"eslint": "*",
|
|
48
|
+
"react": "*",
|
|
49
|
+
"react-dom": "*"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/cli": "7.22.15",
|
|
53
|
+
"@babel/core": "7.22.17",
|
|
54
|
+
"@babel/node": "7.22.15",
|
|
55
|
+
"@babel/plugin-transform-runtime": "7.22.15",
|
|
56
|
+
"@babel/polyfill": "7.12.1",
|
|
57
|
+
"@babel/preset-env": "7.22.15",
|
|
58
|
+
"@babel/runtime": "7.22.15",
|
|
59
|
+
"commander": "11.0.0",
|
|
60
|
+
"jest-html-reporter": "3.10.2"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
const { defineConfig, devices } = require('@playwright/test');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const numCPUs = require('os').cpus().length;
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
testDir: path.join(path.resolve(process.cwd()), 'uat'),
|
|
8
|
+
outputDir: path.join(process.cwd(), 'uat', 'test-results'),
|
|
9
|
+
fullyParallel: true,
|
|
10
|
+
retries: process.env.CI ? 2 : 0,
|
|
11
|
+
reporter: [['html', { outputFolder: path.join(process.cwd(), 'uat', 'playwright-report'), open: "always" }]],
|
|
12
|
+
timeout: 60 * 1000,
|
|
13
|
+
expect: {
|
|
14
|
+
timeout: 5 * 1000,
|
|
15
|
+
},
|
|
16
|
+
use: {
|
|
17
|
+
trace: 'on',
|
|
18
|
+
video: {
|
|
19
|
+
mode: 'on',
|
|
20
|
+
size: { width: 640, height: 480 }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
projects: [
|
|
24
|
+
{ name: 'setup', testMatch: /.*\.setup\.js/ },
|
|
25
|
+
{
|
|
26
|
+
name: 'chromium',
|
|
27
|
+
use: {
|
|
28
|
+
...devices['Desktop Chrome'],
|
|
29
|
+
storageState: path.resolve(process.cwd(), 'uat', 'playwright/.auth/user.json')
|
|
30
|
+
},
|
|
31
|
+
dependencies: ['setup'],
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
{
|
|
35
|
+
name: 'firefox',
|
|
36
|
+
timeout: 4 * 60 * 1000,
|
|
37
|
+
expect: {
|
|
38
|
+
timeout: 80 * 1000,
|
|
39
|
+
},
|
|
40
|
+
use: {
|
|
41
|
+
...devices['Desktop Firefox'],
|
|
42
|
+
storageState: path.resolve(process.cwd(), 'uat', 'playwright/.auth/user.json')
|
|
43
|
+
},
|
|
44
|
+
dependencies: ['setup'],
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
name: 'webkit',
|
|
49
|
+
timeout: 2 * 60 * 1000,
|
|
50
|
+
expect: {
|
|
51
|
+
timeout: 80 * 1000,
|
|
52
|
+
},
|
|
53
|
+
use: {
|
|
54
|
+
...devices['Desktop Safari'],
|
|
55
|
+
storageState: path.resolve(process.cwd(), 'uat', 'playwright/.auth/user.json')
|
|
56
|
+
},
|
|
57
|
+
dependencies: ['setup'],
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
],
|
|
61
|
+
});
|
|
62
|
+
|