@zohodesk/testinglibrary 0.0.3 → 0.0.5

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/README.md CHANGED
@@ -1,18 +1,18 @@
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
- ### Generate Report
16
-
17
- - npm run report
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
+ ### Generate Report
16
+
17
+ - npm run report
18
18
 
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
-
2
+
3
3
  require('../src/lib/cli');
@@ -1,16 +1,16 @@
1
- const path = require('path');
2
- const { spawn } = require('child_process');
3
- const { Logger } = require('../src/utils/logger');
4
- const getFilePathWithExtension = require('../src/utils/getFilePath');
5
-
6
- const playwrightPath = path.resolve('node_modules', '.bin', getFilePathWithExtension('playwright'));
7
- const command = playwrightPath;
8
- const args = ['install'];
9
-
10
- Logger.log(Logger.INFO_TYPE, 'Downloading browsers for running tests');
11
-
12
- const childProcess = spawn(command, args, { stdio: 'inherit' });
13
-
14
- childProcess.on('error', (error) => {
15
- Logger.log(Logger.FAILURE_TYPE, error);
1
+ const path = require('path');
2
+ const { spawn } = require('child_process');
3
+ const { Logger } = require('../src/utils/logger');
4
+ const getFilePathWithExtension = require('../src/utils/getFilePath');
5
+
6
+ const playwrightPath = path.resolve('node_modules', '.bin', getFilePathWithExtension('playwright'));
7
+ const command = playwrightPath;
8
+ const args = ['install'];
9
+
10
+ Logger.log(Logger.INFO_TYPE, 'Downloading browsers for running tests');
11
+
12
+ const childProcess = spawn(command, args, { stdio: 'inherit' });
13
+
14
+ childProcess.on('error', (error) => {
15
+ Logger.log(Logger.FAILURE_TYPE, error);
16
16
  });
package/changelog.md CHANGED
@@ -1,15 +1,25 @@
1
- # Testing Framework
2
-
3
- ## Framework that abstracts the configuration for playwright and Jest
4
-
5
- # 0.0.2
6
-
7
- - Added Support for custom config generator based on user preferences
8
-
9
- # 0.0.2
10
-
11
- - Fix for Finding directories inside node_modules folder
12
-
13
- # 0.0.1
14
-
15
- - test and report command support
1
+ # Testing Framework
2
+
3
+ ## Framework that abstracts the configuration for playwright and Jest
4
+
5
+ # 0.0.5
6
+
7
+ - Added Init command to initialize the folder structure and configuration for testing
8
+ - Renamed config.json to env-config.json
9
+ - Configured report file path directory and Handled Edge case in Cookies Handling
10
+
11
+ # 0.0.4
12
+
13
+ - Issue Fixes while loading the storage state
14
+
15
+ # 0.0.3
16
+
17
+ - Added Support for custom config generator based on user preferences
18
+
19
+ # 0.0.2
20
+
21
+ - Fix for Finding directories inside node_modules folder
22
+
23
+ # 0.0.1
24
+
25
+ - 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
  };