@zohodesk/testinglibrary 0.1.8-cbdd-26.4 → 0.1.8-eslint-0

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 (44) hide show
  1. package/.babelrc +18 -18
  2. package/.eslintrc.js +31 -31
  3. package/.prettierrc +5 -5
  4. package/README.md +17 -17
  5. package/bin/cli.js +2 -2
  6. package/build/Eslint-soanarQube-Config/reportConfigSonar.js +40 -0
  7. package/build/bdd-poc/config/pathConfig.js +7 -3
  8. package/build/bdd-poc/core-runner/createCallbacksMap.js +4 -3
  9. package/build/bdd-poc/core-runner/exportMethods.js +9 -7
  10. package/build/bdd-poc/core-runner/intialize.js +3 -1
  11. package/build/bdd-poc/core-runner/main.js +14 -8
  12. package/build/bdd-poc/core-runner/stepRunner.js +52 -22
  13. package/build/bdd-poc/errors/throwError.js +4 -1
  14. package/build/bdd-poc/{test/stepsDefinition/createTestCode.js → gherkin-parser/createTestTemplate.js} +14 -14
  15. package/build/bdd-poc/{test → gherkin-parser}/cucumber/cucumberSynatxParser.js +3 -2
  16. package/build/bdd-poc/{test → gherkin-parser}/cucumber/data-driven/dataSourceMap.js +3 -17
  17. package/build/bdd-poc/{test → gherkin-parser}/stepsDefinition/extractTestInputs.js +3 -0
  18. package/build/bdd-poc/{test → gherkin-parser/stepsDefinition}/generateStep.js +10 -10
  19. package/build/bdd-poc/{test/stepsDefinition/parserSteps.js → gherkin-parser/stepsDefinition/parserStepsArguments.js} +12 -12
  20. package/build/bdd-poc/index.js +4 -4
  21. package/build/bdd-poc/snippets/stepsnippets.js +12 -9
  22. package/build/core/playwright/readConfigFile.js +30 -30
  23. package/build/core/playwright/setup/config-creator.js +13 -6
  24. package/build/core/playwright/setup/config-utils.js +7 -7
  25. package/build/core/playwright/test-runner.js +3 -3
  26. package/build/index.d.ts +13 -15
  27. package/build/index.js +6 -4
  28. package/build/lib/cli.js +7 -0
  29. package/build/parser/sample.feature +34 -34
  30. package/build/parser/sample.spec.js +18 -18
  31. package/build/setup-folder-structure/reportEnhancement/addonScript.html +24 -24
  32. package/build/setup-folder-structure/samples/auth-setup-sample.js +72 -72
  33. package/build/setup-folder-structure/samples/authUsers-sample.json +8 -8
  34. package/build/setup-folder-structure/samples/env-config-sample.json +20 -20
  35. package/build/setup-folder-structure/samples/git-ignore.sample.js +36 -36
  36. package/build/setup-folder-structure/samples/uat-config-sample.js +44 -44
  37. package/build/utils/cliArgsToObject.js +25 -25
  38. package/changelog.md +131 -131
  39. package/jest.config.js +63 -63
  40. package/npm-shrinkwrap.json +6098 -5994
  41. package/package.json +57 -56
  42. package/playwright.config.js +112 -112
  43. /package/build/bdd-poc/{test → gherkin-parser}/cucumber/cucumber.js +0 -0
  44. /package/build/bdd-poc/{test → gherkin-parser}/tagsHandle.js +0 -0
package/changelog.md CHANGED
@@ -1,131 +1,131 @@
1
- # Testing Framework
2
-
3
- ## Framework that abstracts the configuration for playwright and Jest
4
- # 0.1.8
5
- **Issue Fixes**
6
- - Fix #9 Custom report generate Error on Windows
7
- - Add Tags annotations only on bddMode
8
-
9
- **Enhancements**
10
- - Added Failed steps in test summary
11
-
12
- # 0.1.7
13
- **Enhancements**
14
- - Added option to run teardown logic.
15
- - Added support for tag based filtering.
16
- - Playwright-bdd version updated to 5.6.0.
17
- - New fixture added to add tag as annotations in test report
18
-
19
- **Issue Fixes**
20
- - Edition command option. Fixed the edition tags not generated properly
21
-
22
- # 0.1.6
23
-
24
- **Enhancements**
25
- - New Command option Added `--edition`.
26
- - New Configuration Added `editionOrder`.
27
- `In uat.config.js, editionOrder: ['Free', 'Express']`
28
- - Cache Layer added
29
-
30
- **USAGE**
31
- - npm run uat --edition="Free"
32
-
33
-
34
-
35
- # 0.1.5
36
-
37
- **Enhancements**
38
-
39
- - Playwright version updated to `1.40.1`
40
- - And and But Support added
41
- - Added Code Suggestions support
42
- - Custom Reporter added. Now the report will be available in json format.
43
- - New Commands added.
44
-
45
- `- help: npx ZDTestingFramework help`
46
-
47
- - Will list down the commands available in the tool
48
-
49
- `- clearCaches: npx ZDTestingFramework clearCaches`
50
-
51
- - Will clear the exisiting cookies in the authentication setup
52
-
53
- **Issue Fixes**
54
-
55
- - Fixed Issue that occurs while quitting node process.
56
-
57
- # 0.1.4
58
-
59
- - `testIdAttribute` config added
60
- - Fixed issue while reading boolean configuration values
61
-
62
- # 0.1.3
63
-
64
- - uat config sample file updated with `bddMode` and `viewport` values
65
- - user configuration issue fix when the value is undefined
66
-
67
- # 0.1.2
68
-
69
- - Bdd version updated to `5.4.0`
70
- - Playwright version updated to `1.39.0`
71
-
72
- # 0.1.1
73
-
74
- - Fixed post install script error
75
- - Fixed error `@cucumber/gherkin` not found. Cause of this issue is updating @cucumber/cucumber to 9.5.0. Reverting this version to 9.2.0
76
- - Removed testing library exports
77
-
78
- # 0.1.0
79
-
80
- - Removed eslint as dev dependencies as it causes `npm aliases not supported error` for npm version < 6
81
-
82
- # 0.0.9
83
-
84
- - Video sized in report adjusted to viewport size
85
- - Changes in package.json scripts while setting up project
86
-
87
- # 0.0.8
88
-
89
- - Tags Support
90
- - Enable running without bddmode feature
91
- - viewport configuration
92
- - Internal Change - Code refactoring
93
-
94
- # 0.0.7
95
-
96
- - Removed react and react-dom as dependencies. Added this as peer dependency
97
-
98
- # 0.0.6
99
-
100
- ## Provided Initial Support for cucumber feature files
101
-
102
- - Playwright-bdd and cucumber added as dependencies
103
- - Added config bddMode which toggles the feature files processing
104
- - Added expect timeout and test timeout as an option
105
- - Decorators support for given, when and then. Typescript support needed to use this feature
106
-
107
- ## Internal Library change
108
-
109
- - Provided support for import/export statements
110
-
111
- # 0.0.5
112
-
113
- - Added Init command to initialize the folder structure and configuration for testing
114
- - Renamed config.json to env-config.json
115
- - Configured report file path directory and Handled Edge case in Cookies Handling
116
-
117
- # 0.0.4
118
-
119
- - Issue Fixes while loading the storage state
120
-
121
- # 0.0.3
122
-
123
- - Added Support for custom config generator based on user preferences
124
-
125
- # 0.0.2
126
-
127
- - Fix for Finding directories inside node_modules folder
128
-
129
- # 0.0.1
130
-
131
- - test and report command support
1
+ # Testing Framework
2
+
3
+ ## Framework that abstracts the configuration for playwright and Jest
4
+ # 0.1.8
5
+ **Issue Fixes**
6
+ - Fix #9 Custom report generate Error on Windows
7
+ - Add Tags annotations only on bddMode
8
+
9
+ **Enhancements**
10
+ - Added Failed steps in test summary
11
+
12
+ # 0.1.7
13
+ **Enhancements**
14
+ - Added option to run teardown logic.
15
+ - Added support for tag based filtering.
16
+ - Playwright-bdd version updated to 5.6.0.
17
+ - New fixture added to add tag as annotations in test report
18
+
19
+ **Issue Fixes**
20
+ - Edition command option. Fixed the edition tags not generated properly
21
+
22
+ # 0.1.6
23
+
24
+ **Enhancements**
25
+ - New Command option Added `--edition`.
26
+ - New Configuration Added `editionOrder`.
27
+ `In uat.config.js, editionOrder: ['Free', 'Express']`
28
+ - Cache Layer added
29
+
30
+ **USAGE**
31
+ - npm run uat --edition="Free"
32
+
33
+
34
+
35
+ # 0.1.5
36
+
37
+ **Enhancements**
38
+
39
+ - Playwright version updated to `1.40.1`
40
+ - And and But Support added
41
+ - Added Code Suggestions support
42
+ - Custom Reporter added. Now the report will be available in json format.
43
+ - New Commands added.
44
+
45
+ `- help: npx ZDTestingFramework help`
46
+
47
+ - Will list down the commands available in the tool
48
+
49
+ `- clearCaches: npx ZDTestingFramework clearCaches`
50
+
51
+ - Will clear the exisiting cookies in the authentication setup
52
+
53
+ **Issue Fixes**
54
+
55
+ - Fixed Issue that occurs while quitting node process.
56
+
57
+ # 0.1.4
58
+
59
+ - `testIdAttribute` config added
60
+ - Fixed issue while reading boolean configuration values
61
+
62
+ # 0.1.3
63
+
64
+ - uat config sample file updated with `bddMode` and `viewport` values
65
+ - user configuration issue fix when the value is undefined
66
+
67
+ # 0.1.2
68
+
69
+ - Bdd version updated to `5.4.0`
70
+ - Playwright version updated to `1.39.0`
71
+
72
+ # 0.1.1
73
+
74
+ - Fixed post install script error
75
+ - Fixed error `@cucumber/gherkin` not found. Cause of this issue is updating @cucumber/cucumber to 9.5.0. Reverting this version to 9.2.0
76
+ - Removed testing library exports
77
+
78
+ # 0.1.0
79
+
80
+ - Removed eslint as dev dependencies as it causes `npm aliases not supported error` for npm version < 6
81
+
82
+ # 0.0.9
83
+
84
+ - Video sized in report adjusted to viewport size
85
+ - Changes in package.json scripts while setting up project
86
+
87
+ # 0.0.8
88
+
89
+ - Tags Support
90
+ - Enable running without bddmode feature
91
+ - viewport configuration
92
+ - Internal Change - Code refactoring
93
+
94
+ # 0.0.7
95
+
96
+ - Removed react and react-dom as dependencies. Added this as peer dependency
97
+
98
+ # 0.0.6
99
+
100
+ ## Provided Initial Support for cucumber feature files
101
+
102
+ - Playwright-bdd and cucumber added as dependencies
103
+ - Added config bddMode which toggles the feature files processing
104
+ - Added expect timeout and test timeout as an option
105
+ - Decorators support for given, when and then. Typescript support needed to use this feature
106
+
107
+ ## Internal Library change
108
+
109
+ - Provided support for import/export statements
110
+
111
+ # 0.0.5
112
+
113
+ - Added Init command to initialize the folder structure and configuration for testing
114
+ - Renamed config.json to env-config.json
115
+ - Configured report file path directory and Handled Edge case in Cookies Handling
116
+
117
+ # 0.0.4
118
+
119
+ - Issue Fixes while loading the storage state
120
+
121
+ # 0.0.3
122
+
123
+ - Added Support for custom config generator based on user preferences
124
+
125
+ # 0.0.2
126
+
127
+ - Fix for Finding directories inside node_modules folder
128
+
129
+ # 0.0.1
130
+
131
+ - test and report command support
package/jest.config.js CHANGED
@@ -1,64 +1,64 @@
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
- rootDir: process.cwd(),
9
- testEnvironment: 'jsdom',
10
-
11
- setupFilesAfterEnv: [
12
- existsSync(appGlobals) && appGlobals,
13
- path.resolve(__dirname, 'src', 'core', 'jest', 'setup', 'index.js')
14
- ].filter(Boolean),
15
-
16
- transform: {
17
- '^.+\\.(js|jsx)$': path.resolve(
18
- __dirname,
19
- 'src',
20
- 'core',
21
- 'jest',
22
- 'preprocessor',
23
- 'jsPreprocessor.js'
24
- )
25
- },
26
-
27
- modulePathIgnorePatterns: ['/build/'],
28
-
29
- transformIgnorePatterns: [
30
- '/node_modules/(?!(@zohodesk)/)'
31
- ],
32
-
33
- testPathIgnorePatterns: [
34
- '/node_modules/',
35
- '/build/',
36
- '/uat/'
37
- ],
38
-
39
- watchPathIgnorePatterns: [
40
- '/node_modules/',
41
- '/build/'
42
- ],
43
-
44
- clearMocks: true,
45
- resetMocks: false,
46
-
47
- collectCoverage: true,
48
- collectCoverageFrom: ['src/**/*.js'],
49
- coverageDirectory: './build/cov',
50
- coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
51
- coverageThreshold: {
52
- global: {
53
- branches: 100,
54
- functions: 100,
55
- lines: 100,
56
- statements: 100
57
- }
58
- },
59
- globals: {
60
- __DEVELOPMENT__: true,
61
- __DOCS__: false,
62
- __TEST__: true
63
- }
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
+ rootDir: process.cwd(),
9
+ testEnvironment: 'jsdom',
10
+
11
+ setupFilesAfterEnv: [
12
+ existsSync(appGlobals) && appGlobals,
13
+ path.resolve(__dirname, 'src', 'core', 'jest', 'setup', 'index.js')
14
+ ].filter(Boolean),
15
+
16
+ transform: {
17
+ '^.+\\.(js|jsx)$': path.resolve(
18
+ __dirname,
19
+ 'src',
20
+ 'core',
21
+ 'jest',
22
+ 'preprocessor',
23
+ 'jsPreprocessor.js'
24
+ )
25
+ },
26
+
27
+ modulePathIgnorePatterns: ['/build/'],
28
+
29
+ transformIgnorePatterns: [
30
+ '/node_modules/(?!(@zohodesk)/)'
31
+ ],
32
+
33
+ testPathIgnorePatterns: [
34
+ '/node_modules/',
35
+ '/build/',
36
+ '/uat/'
37
+ ],
38
+
39
+ watchPathIgnorePatterns: [
40
+ '/node_modules/',
41
+ '/build/'
42
+ ],
43
+
44
+ clearMocks: true,
45
+ resetMocks: false,
46
+
47
+ collectCoverage: true,
48
+ collectCoverageFrom: ['src/**/*.js'],
49
+ coverageDirectory: './build/cov',
50
+ coverageReporters: ['lcov', 'json', 'html', 'json-summary', 'text'],
51
+ coverageThreshold: {
52
+ global: {
53
+ branches: 100,
54
+ functions: 100,
55
+ lines: 100,
56
+ statements: 100
57
+ }
58
+ },
59
+ globals: {
60
+ __DEVELOPMENT__: true,
61
+ __DOCS__: false,
62
+ __TEST__: true
63
+ }
64
64
  };