@zohodesk/testinglibrary 0.0.58-n20-experimental → 0.0.60-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.
Files changed (35) hide show
  1. package/README.md +0 -8
  2. package/build/common/data-generator/steps/DataGenerator.spec.js +1 -1
  3. package/build/common/data-generator/steps/DataGeneratorStepsHelper.js +4 -19
  4. package/build/core/dataGenerator/DataGenerator.js +25 -104
  5. package/build/core/dataGenerator/DataGeneratorHelper.js +4 -52
  6. package/build/core/playwright/builtInFixtures/cacheLayer.js +2 -197
  7. package/build/core/playwright/constants/reporterConstants.js +1 -0
  8. package/build/core/playwright/helpers/auth/getUsers.js +2 -2
  9. package/build/core/playwright/readConfigFile.js +1 -3
  10. package/build/core/playwright/reporter/PlaywrightReporter.js +44 -0
  11. package/build/core/playwright/reporter/UnitReporter.js +27 -0
  12. package/build/core/playwright/validateFeature.js +0 -11
  13. package/build/lib/cli.js +30 -7
  14. package/build/utils/commonUtils.js +9 -0
  15. package/build/utils/logger.js +1 -3
  16. package/changelog.md +0 -27
  17. package/npm-shrinkwrap.json +7843 -3408
  18. package/package.json +15 -11
  19. package/.claude/worktrees/thirsty-yalow/.babelrc +0 -24
  20. package/.claude/worktrees/thirsty-yalow/.eslintrc.js +0 -31
  21. package/.claude/worktrees/thirsty-yalow/.gitlab-ci.yml +0 -208
  22. package/.claude/worktrees/thirsty-yalow/.prettierrc +0 -6
  23. package/.claude/worktrees/thirsty-yalow/README.md +0 -234
  24. package/.claude/worktrees/thirsty-yalow/bin/cli.js +0 -3
  25. package/.claude/worktrees/thirsty-yalow/bin/postinstall.js +0 -1
  26. package/.claude/worktrees/thirsty-yalow/changelog.md +0 -167
  27. package/.claude/worktrees/thirsty-yalow/jest.config.js +0 -82
  28. package/.claude/worktrees/thirsty-yalow/package.json +0 -62
  29. package/.claude/worktrees/thirsty-yalow/playwright.config.js +0 -62
  30. package/AUTO_CLEANUP_PLAN.md +0 -171
  31. package/build/core/dataGenerator/validateGenerators.js +0 -82
  32. package/build/core/playwright/report-generator.js +0 -42
  33. package/build/utils/datePlaceholders.js +0 -170
  34. package/build/utils/timeFormat.js +0 -41
  35. package/unit_reports/unit-report.html +0 -277
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/testinglibrary",
3
- "version": "0.0.58-n20-experimental",
3
+ "version": "0.0.60-n20-experimental",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node bin/postinstall.js",
@@ -23,14 +23,17 @@
23
23
  "dependencies": {
24
24
  "@babel/code-frame": "7.27.1",
25
25
  "@babel/preset-react": "7.28.5",
26
+ "@babel/runtime": "7.28.6",
26
27
  "@playwright/test": "1.56.1",
27
28
  "@reportportal/agent-js-playwright": "5.2.2",
28
29
  "@testing-library/jest-dom": "6.9.1",
29
- "babel-jest": "30.2.0",
30
+ "@zohodesk/unit-testing-framework": "0.0.30-experimental",
31
+ "babel-jest": "29.7.0",
30
32
  "babel-plugin-transform-dynamic-import": "2.1.0",
33
+ "commander": "14.0.2",
31
34
  "fast-glob": "3.3.3",
32
- "jest": "30.2.0",
33
- "jest-environment-jsdom": "30.2.0",
35
+ "jest": "29.7.0",
36
+ "jest-environment-jsdom": "29.7.0",
34
37
  "jsonpath": "1.1.1",
35
38
  "msw": "2.11.6",
36
39
  "playwright": "1.56.1",
@@ -47,13 +50,14 @@
47
50
  "react-dom": "*"
48
51
  },
49
52
  "devDependencies": {
50
- "@babel/cli": "7.28.3",
51
- "@babel/core": "7.28.4",
52
- "@babel/node": "7.28.0",
53
+ "@babel/cli": "7.28.6",
54
+ "@babel/core": "7.29.0",
55
+ "@babel/node": "7.29.0",
53
56
  "@babel/plugin-transform-runtime": "7.28.3",
54
- "@babel/preset-env": "7.28.3",
55
- "@babel/runtime": "7.28.4",
56
- "commander": "14.0.2",
57
- "jest-html-reporter": "4.3.0"
57
+ "@babel/preset-env": "7.29.0",
58
+ "@babel/preset-react": "7.26.3",
59
+ "jest-html-reporter": "4.3.0",
60
+ "ts-jest": "29.3.2",
61
+ "@babel/preset-typescript": "7.26.0"
58
62
  }
59
63
  }
@@ -1,24 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/preset-env",
5
- {
6
- "targets": {
7
- "node": "14"
8
- },
9
- // We are adding plugin @babel/plugin-transform-destructuring to ensure babel does not transform the destructing
10
- // as playwright does not allow parameters without destrucring
11
- "exclude": ["@babel/plugin-transform-destructuring"]
12
- }
13
- ]
14
- ],
15
- "plugins": [
16
- ["@babel/plugin-transform-runtime"],
17
- ["@babel/plugin-transform-modules-commonjs"]
18
- ],
19
- // Ignored as these are setup files needed during init script. Files inside that folder are copied not transformed
20
- "ignore": [
21
- "./src/setup-folder-structure/samples",
22
- "./src/common/**"
23
- ]
24
- }
@@ -1,31 +0,0 @@
1
- module.exports = {
2
- "env": {
3
- "node": true,
4
- "es2021": true
5
- },
6
- "extends": "eslint:recommended",
7
- "overrides": [
8
- {
9
- "env": {
10
- "node": true
11
- },
12
- "files": [
13
- ".eslintrc.{js,cjs}"
14
- ],
15
- "parserOptions": {
16
- "sourceType": "script"
17
- }
18
- }
19
- ],
20
- "parserOptions": {
21
- "ecmaVersion": "latest",
22
- "sourceType": "module"
23
- },
24
- "rules": {
25
- "indent": ["error", 2, { "SwitchCase": 1 }],
26
- "no-empty-pattern": "off",
27
- "comma-dangle": ["error", "never"],
28
- "curly": ["error"],
29
- "brace-style": "error"
30
- }
31
- }
@@ -1,208 +0,0 @@
1
- image: zdesk-auto13.csez.zohocorpin.com/long-term-storage/node18-npm10:v2
2
-
3
- workflow:
4
- rules:
5
- - if: $CI_PIPELINE_SOURCE == "merge_request_event"
6
- when: always
7
- - if: $CI_PIPELINE_SOURCE == "web"
8
- when: always
9
-
10
- stages:
11
- - build
12
- - unit
13
- - uat
14
-
15
- default:
16
- cache:
17
- key: build-cache
18
- paths:
19
- - node_modules
20
- - build
21
- - npm-shrinkwrap.json
22
-
23
- # Install dependencies stage
24
- build:
25
- stage: build
26
- script:
27
- - npm -v
28
- - node -v
29
- - npm install --ignore-scripts
30
- - npm run build
31
- - npm install
32
- - npm shrinkwrap
33
- - npm run build
34
-
35
- # Unit tests stage
36
- unit:
37
- stage: unit
38
- script:
39
- - npm run test
40
- artifacts:
41
- when: always
42
- paths:
43
- - unit_reports
44
-
45
- # UAT tests stage
46
- uat-auth:
47
- stage: uat
48
- script:
49
- - cd examples
50
- - npm install $(npm pack ../../testing-framework | tail -1)
51
- - output=$(npm run uatauth)
52
- - echo "$output"
53
- - node ../ValidateUATReport.js examples
54
-
55
- artifacts:
56
- when: always
57
- paths:
58
- - examples/uat/playwright-report
59
-
60
- uat-noauth:
61
- stage: uat
62
- script:
63
- - cd examples
64
- - npm install $(npm pack ../../testing-framework | tail -1)
65
- - output=$(npm run uatnoauth)
66
- - echo "$output"
67
- - node ../ValidateUATReport.js examples
68
-
69
- artifacts:
70
- when: always
71
- paths:
72
- - examples/uat/playwright-report
73
-
74
- uat-profile:
75
- stage: uat
76
- script:
77
- - cd examples
78
- - npm install $(npm pack ../../testing-framework | tail -1)
79
- - output=$(npm run uatprofile)
80
- - echo "$output"
81
- - node ../ValidateUATReport.js examples
82
-
83
- artifacts:
84
- when: always
85
- paths:
86
- - examples/uat/playwright-report
87
-
88
-
89
- uat-unauth:
90
- stage: uat
91
- script:
92
- - cd examples
93
- - npm install $(npm pack ../../testing-framework | tail -1)
94
- - output=$(npm run uatunauth)
95
- - echo "$output"
96
- - node ../ValidateUATReport.js examples
97
-
98
-
99
- artifacts:
100
- when: always
101
- paths:
102
- - examples/uat/playwright-report
103
-
104
- uat-nobdd:
105
- stage: uat
106
- script:
107
- - cd nobdd
108
- - npm install $(npm pack ../../testing-framework | tail -1)
109
- - output=$(npm run uatnobdd -- --headless)
110
- - echo "$output"
111
- - node ../ValidateUATReport.js nobdd
112
-
113
-
114
- artifacts:
115
- when: always
116
- paths:
117
- - nobdd/uat/playwright-report
118
-
119
-
120
- uatmodule:
121
- stage: uat
122
- script:
123
- - cd examples
124
- - npm install $(npm pack ../../testing-framework | tail -1)
125
- - output=$(npm run uatmodule)
126
- - echo "$output"
127
- - node ../ValidateUATReport.js examples
128
-
129
-
130
- artifacts:
131
- when: always
132
- paths:
133
- - examples/uat/playwright-report
134
-
135
- uatconfigmodule:
136
- stage: uat
137
- script:
138
- - cd examples
139
- - npm install $(npm pack ../../testing-framework | tail -1)
140
- - output=$(npm run uatconfigmodule)
141
- - echo "$output"
142
- - node ../ValidateUATReport.js examples
143
-
144
- artifacts:
145
- when: always
146
- paths:
147
- - examples/uat/playwright-report
148
-
149
- uat-smoketest:
150
- stage: uat
151
- script:
152
- - cd examples
153
- - npm install $(npm pack ../../testing-framework | tail -1)
154
- - output=$(npm run uat-smoketest)
155
- - echo "$output"
156
- - node ../ValidateUATReport.js examples
157
-
158
- artifacts:
159
- when: always
160
- paths:
161
- - examples/uat/playwright-report
162
-
163
- uat-multiactor:
164
- stage: uat
165
- script:
166
- - cd examples
167
- - npm install $(npm pack ../../testing-framework | tail -1)
168
- - output=$(npm run uat-multiactor)
169
- - echo "$output"
170
- - node ../ValidateUATReport.js examples
171
-
172
- artifacts:
173
- when: always
174
- paths:
175
- - examples/uat/playwright-report
176
-
177
- uat-data_generator:
178
- stage: uat
179
- script:
180
- - cd examples
181
- - npm install $(npm pack ../../testing-framework | tail -1)
182
- - output=$(npm run uat-data_generator)
183
- - echo "$output"
184
- - node ../ValidateUATReport.js examples
185
-
186
- artifacts:
187
- when: always
188
- paths:
189
- - examples/uat/playwright-report
190
-
191
- uat-search_indexing:
192
- stage: uat
193
- script:
194
- - cd examples
195
- - npm install $(npm pack ../../testing-framework | tail -1)
196
- - echo "Removing jsonpath from examples/node_modules to avoid conflicts"
197
- - rm -rf node_modules/jsonpath || true
198
- - output=$(npm run uat-search_indexing)
199
- - echo "$output"
200
- - node ../ValidateUATReport.js examples
201
-
202
- artifacts:
203
- when: always
204
- paths:
205
- - examples/uat/playwright-report
206
-
207
-
208
-
@@ -1,6 +0,0 @@
1
- {
2
- "trailingComma": "none",
3
- "singleQuote": true,
4
- "arrowParens": "avoid",
5
- "jsxSingleQuote": true
6
- }
@@ -1,234 +0,0 @@
1
- # Testing Framework
2
-
3
- ## Framework that abstracts the configuration for playwright and Jest
4
-
5
- - Playwright
6
- - Jest
7
-
8
- ## Cli
9
-
10
- ## Feature Supported
11
-
12
- ### Run TestCase
13
-
14
- - npm run test
15
-
16
- ### Generate Report
17
-
18
- - npm run report
19
-
20
- ### v4.0.6/v3.2.21 - 22-01-2026
21
-
22
- #### Bug fix
23
- - Retry added for Missing Step Definitions Issue in the Feature Files
24
-
25
- ### v4.0.4/v3.2.20 - 19-12-2025
26
-
27
- #### Enhancement
28
- - New common step provided for search index with the data generated entity
29
-
30
- ### v4.0.3/v3.2.19 - 17-12-2025
31
-
32
- #### Enhancement
33
- - Cookie storage prefix support is provided in this version.
34
-
35
-
36
- ### v4.0.2 - 16-12-2025
37
-
38
- #### Bug Fixes
39
-
40
- - Deprecated the react and react hooks from dependencies
41
- - @cucumber/cucumber - 10.9.0 version downgraded due to Missing Step Definition Issue
42
-
43
-
44
- ### v4.0.0 - 04-12-2025
45
-
46
- #### Features
47
- - Supported node 20 for the testing-framework
48
-
49
- - Below package versions are updated in this release.
50
- - playwright - 1.56.1,
51
- - playwright-bdd - 8.4.2,
52
- - @playwright/test - 1.56.1,
53
- - @cucumber/cucumber - 12.2.0
54
-
55
- ### v3.2.15 - 14-11-2025
56
-
57
- #### Enhancement
58
-
59
- - Aborted test results are now merged into the `.last-run.json` file.
60
- This ensures that any timed-out tests are included in the next retry cycle.
61
-
62
- ### v3.2.13 - 30-10-2025
63
-
64
- #### Enhancement
65
-
66
- - A teardown option has been introduced in the configuration to manage and clean up login sessions stored in the NFS environment.
67
-
68
- ### Issue fix
69
-
70
- - Custom teardown comment provided
71
-
72
- ### v3.2.11 - 13-10-2025
73
-
74
- ### Feature
75
-
76
- - New step a search entity using {string} provided for search indexing, This step will use run time data generation response as input for the indexing
77
-
78
-
79
- ### v3.2.9 - 26-09-2025
80
-
81
- ### Enhancement
82
-
83
- - Authentication deatils for data generation can be configured in org level
84
- - reference link : https://learn.zoho.in/portal/zohocorp/knowledge/manual/client-uat/article/data-generation#_Tocpd3n7yt9ngeg
85
-
86
-
87
- ### v3.2.8 - 18-09-2025
88
-
89
- ### Bug fix
90
-
91
- - Default profile switching handled in Multi actor – Improved handling of default profile switching to ensure smoother execution flow.
92
-
93
- - QC Report tags issue fixed – Resolved an issue where QC Report tags were not displaying correctly in reports.
94
-
95
- ### v3.2.7 - 10-09-2025
96
-
97
- ### Bug fix
98
- - Fixed a bug where the default profile page was not being handled properly in `this`.
99
-
100
- ### v3.2.6 - 05-09-2025
101
-
102
- #### Feature
103
-
104
- - Multi-actor execution support – now possible to switch between multiple profile agents within scenarios using the predefined step: - `access the {string} profile page`
105
-
106
- ### Bug fix
107
-
108
- - Fixed the issue where localapp and hcapp UAT were not running properly.
109
-
110
- ### v3.2.5 - 28-08-2025
111
-
112
- #### Enhancement
113
-
114
- - Removed the searchFake dependency from the project level and adopted it inside the framework, reducing project-side maintenance. use this predefined step: - `Given (a search entity)`
115
-
116
- ### v3.2.4 - 29-07-2025
117
-
118
- #### Feature
119
- - Data Generator steps are now supported directly via the framework.
120
-
121
- ### Bug fix
122
- - Feature File Root Directory not found issue fixed
123
-
124
- ### v3.2.3 - 29-07-2025
125
-
126
- #### Feature
127
- - Added support for running Smoke Tests in the UAT stage.
128
-
129
- ### v3.2.0 - 22-06-2025
130
-
131
- #### Feature
132
- - Default required spec files are now auto-imported from the library into the project.
133
-
134
- ### v3.1.13 - 02-07-2025
135
-
136
- #### Enhancement
137
- - Below package versions are updated in this release.
138
- - @cucumber/Cucumber - 11.3.0
139
- - Playwright/test - 1.53.2
140
- - Playwright - 1.53.2
141
- - Playwright-bdd - 8.3.1
142
- - QC custom reporter changes have been adopted into the framework.
143
-
144
- ### v3.1.5 - 22-05-2025
145
-
146
- #### Feature
147
- - Added support for Module Based Execution UAT stage.
148
-
149
- ### v3.1.4 - 12-05-2025
150
-
151
- #### Enhancement
152
- - Playwright version 1.52.0 adopted in testing framework
153
-
154
- ### v3.1.3 - 25-04-2025
155
-
156
- #### Enhancement
157
- - Playwright version 1.51.0 adopted in testing framework
158
-
159
- ### v0.2.8 - 26-09-2024
160
-
161
- #### Feature
162
- - Added support for writing unitcases for framework implementations
163
-
164
- ### Bug fix
165
- - Updated the custom-reported to include the errors in tests during the executions. It will help us avoid the stage passed without the actual test execution.
166
-
167
-
168
- ### v3.0.8 - 25-12-2024
169
-
170
- #### Enhancement
171
- - Added support to disable headless mode using command line arguments
172
- - Proper validation added for node 14 build process
173
- - Removed unwanted uat.config.js files in test projects (examples / nobdd)
174
-
175
- ### v0.2.9.2 - 22-11-2024
176
-
177
- #### BugFix
178
- - Implemented synchronization for the login process. This fix will help avoid login session-related failures in UAT.
179
-
180
- ### v0.3.1 - 13-11-2024
181
-
182
- #### Issue Fix
183
- - Adding bddmode to get the fixtures.
184
-
185
- ### v0.2.9.1 - 14-11-2024
186
-
187
- #### Enhancement
188
- - Beta feature Actors and edition configurations are unified
189
-
190
- ### v0.2.9 - 25-10-2024
191
-
192
- #### Feature
193
- - Added support for scenario level tag support
194
- - Added a new cli optin like uat-validate to validate the feature files using playwright-bdd
195
- - Mode based configuration implementations
196
- - @only option enabled in dev pipeline
197
- - Latest setup related configuration changed for init option
198
-
199
- ### v0.3.0 - 25-10-2024
200
-
201
- #### Features
202
- - Added support for scenario level tag support
203
- - Updated the configuration for `video` and `trace` to accept Playwright-specific values instead of boolean values.
204
- - Below package versions are updated in this release.
205
- - playwright - 1.48.0,
206
- - playwright-bdd - 7.5.0,
207
- - @playwright/test - 1.48.0,
208
- - @cucumber/cucumber - 11.0.1
209
- - From this version, We adopt the playwright-bdd as library instead of modified source
210
- - Published on 11-11-2024
211
-
212
- #### Deprecations
213
- - **Deprecated**: Passing `video` and `trace` as boolean (`true`/`false`) in project configuration.
214
- - **New Approach**: Use Playwright values for `video` and `trace` options, such as `'on'`, `'retain-on-failure'`, or `'off'`.
215
-
216
- ### v0.3.1 - 13-11-2024
217
-
218
- #### Issue Fix
219
- - Adding bddmode to get the fixtures.
220
-
221
- ### v0.3.3 - 27-11-2024
222
-
223
- #### Feature
224
- - Custom report integration support (ReportPortal)
225
-
226
- ### v0.2.9.1 - 14-11-2024
227
-
228
- #### Enhancement
229
- - Beta feature Actors and edition configurations are unified
230
-
231
- ### v0.2.9.2 - 22-11-2024
232
-
233
- #### BugFix
234
- - Implemented synchronization for the login process. This fix will help avoid login session-related failures in UAT.
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('../build/lib/cli');
@@ -1 +0,0 @@
1
- require('../build/lib/post-install');