@zohodesk/testinglibrary 0.4.56-experimental → 0.4.57-n14-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/.gitlab-ci.yml +2 -2
- package/README.md +1 -54
- package/build/bdd-framework/cli/commands/env.js +42 -0
- package/build/bdd-framework/cli/commands/export.js +62 -0
- package/build/bdd-framework/cli/commands/test.js +64 -0
- package/build/bdd-framework/cli/index.js +11 -0
- package/build/bdd-framework/cli/options.js +19 -0
- package/build/bdd-framework/cli/worker.js +13 -0
- package/build/bdd-framework/config/configDir.js +35 -0
- package/build/bdd-framework/config/enrichReporterData.js +23 -0
- package/build/bdd-framework/config/env.js +50 -0
- package/build/bdd-framework/config/index.js +94 -0
- package/build/bdd-framework/config/lang.js +14 -0
- package/build/bdd-framework/cucumber/buildStepDefinition.js +43 -0
- package/build/bdd-framework/cucumber/createTestStep.js +43 -0
- package/build/bdd-framework/cucumber/formatter/EventDataCollector.js +126 -0
- package/build/bdd-framework/cucumber/formatter/GherkinDocumentParser.js +72 -0
- package/build/bdd-framework/cucumber/formatter/PickleParser.js +25 -0
- package/build/bdd-framework/cucumber/formatter/durationHelpers.js +13 -0
- package/build/bdd-framework/cucumber/formatter/getColorFns.js +57 -0
- package/build/bdd-framework/cucumber/formatter/index.js +16 -0
- package/build/bdd-framework/cucumber/formatter/locationHelpers.js +16 -0
- package/build/bdd-framework/cucumber/loadConfig.js +17 -0
- package/build/bdd-framework/cucumber/loadFeatures.js +70 -0
- package/build/bdd-framework/cucumber/loadSnippetBuilder.js +20 -0
- package/build/bdd-framework/cucumber/loadSteps.js +47 -0
- package/build/bdd-framework/cucumber/resolveFeaturePaths.js +62 -0
- package/build/bdd-framework/cucumber/stepArguments.js +21 -0
- package/build/bdd-framework/cucumber/types.js +5 -0
- package/build/bdd-framework/cucumber/valueChecker.js +23 -0
- package/build/bdd-framework/decorators.js +18 -0
- package/build/bdd-framework/gen/fixtures.js +48 -0
- package/build/bdd-framework/gen/formatter.js +167 -0
- package/build/bdd-framework/gen/i18n.js +39 -0
- package/build/bdd-framework/gen/index.js +197 -0
- package/build/bdd-framework/gen/specialTags.js +70 -0
- package/build/bdd-framework/gen/testFile.js +470 -0
- package/build/bdd-framework/gen/testMeta.js +60 -0
- package/build/bdd-framework/gen/testNode.js +35 -0
- package/build/bdd-framework/gen/testPoms.js +133 -0
- package/build/bdd-framework/hooks/scenario.js +130 -0
- package/build/bdd-framework/hooks/worker.js +89 -0
- package/build/bdd-framework/index.js +52 -0
- package/build/bdd-framework/playwright/fixtureParameterNames.js +93 -0
- package/build/bdd-framework/playwright/getLocationInFile.js +79 -0
- package/build/bdd-framework/playwright/loadConfig.js +42 -0
- package/build/bdd-framework/playwright/loadUtils.js +33 -0
- package/build/bdd-framework/playwright/testTypeImpl.js +79 -0
- package/build/bdd-framework/playwright/transform.js +88 -0
- package/build/bdd-framework/playwright/types.js +12 -0
- package/build/bdd-framework/playwright/utils.js +56 -0
- package/build/bdd-framework/reporter/cucumber/base.js +52 -0
- package/build/bdd-framework/reporter/cucumber/custom.js +73 -0
- package/build/bdd-framework/reporter/cucumber/helper.js +12 -0
- package/build/bdd-framework/reporter/cucumber/html.js +40 -0
- package/build/bdd-framework/reporter/cucumber/index.js +74 -0
- package/build/bdd-framework/reporter/cucumber/json.js +312 -0
- package/build/bdd-framework/reporter/cucumber/junit.js +205 -0
- package/build/bdd-framework/reporter/cucumber/message.js +20 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/AttachmentMapper.js +82 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Builder.js +197 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocument.js +43 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocumentClone.js +52 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/GherkinDocuments.js +105 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Hook.js +70 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Meta.js +45 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Pickles.js +27 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/Projects.js +38 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCase.js +128 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRun.js +154 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestCaseRunHooks.js +123 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepAttachments.js +67 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/TestStepRun.js +114 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/index.js +30 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/pwStepUtils.js +70 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/timing.js +35 -0
- package/build/bdd-framework/reporter/cucumber/messagesBuilder/types.js +5 -0
- package/build/bdd-framework/run/StepInvoker.js +69 -0
- package/build/bdd-framework/run/bddData/index.js +59 -0
- package/build/bdd-framework/run/bddData/types.js +5 -0
- package/build/bdd-framework/run/bddFixtures.js +192 -0
- package/build/bdd-framework/run/bddWorld.js +79 -0
- package/build/bdd-framework/run/bddWorldInternal.js +11 -0
- package/build/bdd-framework/snippets/index.js +132 -0
- package/build/bdd-framework/snippets/snippetSyntax.js +43 -0
- package/build/bdd-framework/snippets/snippetSyntaxDecorators.js +26 -0
- package/build/bdd-framework/snippets/snippetSyntaxTs.js +18 -0
- package/build/bdd-framework/stepDefinitions/createBdd.js +66 -0
- package/build/bdd-framework/stepDefinitions/decorators/class.js +68 -0
- package/build/bdd-framework/stepDefinitions/decorators/steps.js +99 -0
- package/build/bdd-framework/stepDefinitions/defineStep.js +62 -0
- package/build/bdd-framework/stepDefinitions/stepConfig.js +24 -0
- package/build/bdd-framework/steps/createBdd.js +78 -0
- package/build/bdd-framework/steps/decorators/class.js +68 -0
- package/build/bdd-framework/steps/decorators/steps.js +98 -0
- package/build/bdd-framework/steps/defineStep.js +62 -0
- package/build/bdd-framework/steps/stepConfig.js +24 -0
- package/build/bdd-framework/utils/AutofillMap.js +20 -0
- package/build/bdd-framework/utils/exit.js +62 -0
- package/build/bdd-framework/utils/index.js +93 -0
- package/build/bdd-framework/utils/jsStringWrap.js +44 -0
- package/build/bdd-framework/utils/logger.js +30 -0
- package/build/bdd-framework/utils/stripAnsiEscapes.js +20 -0
- package/build/core/playwright/clear-caches.js +0 -7
- package/build/core/playwright/helpers/auth/checkAuthCookies.js +8 -9
- package/build/core/playwright/helpers/auth/loginSteps.js +12 -3
- package/build/core/playwright/helpers/configFileNameProvider.js +1 -1
- package/build/core/playwright/helpers/fileMutex.js +14 -19
- package/build/core/playwright/index.js +23 -10
- package/build/core/playwright/runner/SpawnRunner.js +2 -2
- package/build/core/playwright/setup/config-creator.js +8 -15
- package/build/core/playwright/setup/config-utils.js +25 -8
- package/build/core/playwright/tagProcessor.js +7 -5
- package/build/core/playwright/test-runner.js +2 -2
- package/build/decorators.d.ts +1 -1
- package/build/decorators.js +1 -1
- package/build/index.js +0 -6
- package/build/setup-folder-structure/samples/auth-setup-sample.js +68 -10
- package/build/setup-folder-structure/samples/authUsers-sample.json +9 -0
- package/build/setup-folder-structure/samples/env-config-sample.json +21 -0
- package/build/setup-folder-structure/samples/uat-config-sample.js +1 -3
- package/build/setup-folder-structure/setupProject.js +5 -22
- package/build/test/core/playwright/__tests__/tagProcessor.test.js +19 -18
- package/build/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js +1 -1
- package/build/test/core/playwright/helpers/__tests__/fileMutex.test.js +2 -19
- package/npm-shrinkwrap.json +2284 -7299
- package/package.json +9 -10
- package/playwright.config.js +48 -0
- package/unit_reports/unit-report.html +260 -0
- package/build/core/playwright/fixtures.js +0 -24
- package/build/setup-folder-structure/samples/accountLogin-sample.js +0 -19
- package/build/setup-folder-structure/samples/actors-index.js +0 -2
- package/build/setup-folder-structure/samples/editions-index.js +0 -3
- package/build/setup-folder-structure/samples/free-sample.json +0 -25
- package/build/setup-folder-structure/samples/settings.json +0 -7
- package/build/setup-folder-structure/samples/testSetup-sample.js +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/testinglibrary",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.57-n14-experimental",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,9 +22,8 @@
|
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@babel/preset-react": "7.22.5",
|
|
25
|
-
"@cucumber/cucumber": "
|
|
26
|
-
"@playwright/test": "1.
|
|
27
|
-
"@reportportal/agent-js-playwright": "5.1.11",
|
|
25
|
+
"@cucumber/cucumber": "9.2.0",
|
|
26
|
+
"@playwright/test": "1.42.1",
|
|
28
27
|
"@testing-library/jest-dom": "5.11.9",
|
|
29
28
|
"@testing-library/react": "11.2.7",
|
|
30
29
|
"@testing-library/react-hooks": "7.0.2",
|
|
@@ -34,17 +33,16 @@
|
|
|
34
33
|
"jest": "29.6.2",
|
|
35
34
|
"jest-environment-jsdom": "29.6.2",
|
|
36
35
|
"msw": "1.2.3",
|
|
37
|
-
"playwright": "1.
|
|
38
|
-
"supports-color": "8.1.1"
|
|
39
|
-
"playwright-bdd": "8.0.1"
|
|
36
|
+
"playwright": "1.42.1",
|
|
37
|
+
"supports-color": "8.1.1"
|
|
40
38
|
},
|
|
41
39
|
"bin": {
|
|
42
40
|
"ZDTestingFramework": "./bin/cli.js"
|
|
43
41
|
},
|
|
44
42
|
"peerDependencies": {
|
|
45
|
-
"eslint": "*",
|
|
46
43
|
"react": "*",
|
|
47
|
-
"react-dom": "*"
|
|
44
|
+
"react-dom": "*",
|
|
45
|
+
"eslint": "*"
|
|
48
46
|
},
|
|
49
47
|
"devDependencies": {
|
|
50
48
|
"@babel/cli": "7.22.15",
|
|
@@ -55,6 +53,7 @@
|
|
|
55
53
|
"@babel/preset-env": "7.22.15",
|
|
56
54
|
"@babel/runtime": "7.22.15",
|
|
57
55
|
"commander": "11.0.0",
|
|
58
|
-
"jest-html-reporter": "3.10.2"
|
|
56
|
+
"jest-html-reporter": "3.10.2",
|
|
57
|
+
"typescript": "5.4.2"
|
|
59
58
|
}
|
|
60
59
|
}
|
package/playwright.config.js
CHANGED
|
@@ -3,23 +3,45 @@ 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
|
+
*/
|
|
6
15
|
export default defineConfig({
|
|
7
16
|
testDir: path.join(path.resolve(process.cwd()), 'uat'),
|
|
8
17
|
outputDir: path.join(process.cwd(), 'uat', 'test-results'),
|
|
18
|
+
/* Run tests in files in parallel */
|
|
9
19
|
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 */
|
|
10
23
|
retries: process.env.CI ? 2 : 0,
|
|
24
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
11
25
|
reporter: [['html', { outputFolder: path.join(process.cwd(), 'uat', 'playwright-report'), open: "always" }]],
|
|
12
26
|
timeout: 60 * 1000,
|
|
13
27
|
expect: {
|
|
14
28
|
timeout: 5 * 1000,
|
|
15
29
|
},
|
|
30
|
+
|
|
31
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
16
32
|
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 */
|
|
17
37
|
trace: 'on',
|
|
18
38
|
video: {
|
|
19
39
|
mode: 'on',
|
|
20
40
|
size: { width: 640, height: 480 }
|
|
21
41
|
}
|
|
22
42
|
},
|
|
43
|
+
|
|
44
|
+
/* Configure projects for major browsers */
|
|
23
45
|
projects: [
|
|
24
46
|
{ name: 'setup', testMatch: /.*\.setup\.js/ },
|
|
25
47
|
{
|
|
@@ -57,6 +79,32 @@ export default defineConfig({
|
|
|
57
79
|
dependencies: ['setup'],
|
|
58
80
|
},
|
|
59
81
|
|
|
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
|
+
// },
|
|
60
101
|
],
|
|
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
|
+
// },
|
|
61
109
|
});
|
|
62
110
|
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Unit Report</title><style type="text/css">html,
|
|
2
|
+
body {
|
|
3
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
4
|
+
font-size: 1rem;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
color: #333;
|
|
8
|
+
}
|
|
9
|
+
body {
|
|
10
|
+
padding: 2rem 1rem;
|
|
11
|
+
font-size: 0.85rem;
|
|
12
|
+
}
|
|
13
|
+
.jesthtml-content {
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
max-width: 70rem;
|
|
16
|
+
}
|
|
17
|
+
header {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
#title {
|
|
22
|
+
margin: 0;
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
}
|
|
25
|
+
#logo {
|
|
26
|
+
height: 4rem;
|
|
27
|
+
}
|
|
28
|
+
#timestamp {
|
|
29
|
+
color: #777;
|
|
30
|
+
margin-top: 0.5rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** SUMMARY */
|
|
34
|
+
#summary {
|
|
35
|
+
color: #333;
|
|
36
|
+
margin: 2rem 0;
|
|
37
|
+
display: flex;
|
|
38
|
+
font-family: monospace;
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
}
|
|
41
|
+
#summary > div {
|
|
42
|
+
margin-right: 2rem;
|
|
43
|
+
background: #eee;
|
|
44
|
+
padding: 1rem;
|
|
45
|
+
min-width: 15rem;
|
|
46
|
+
}
|
|
47
|
+
#summary > div:last-child {
|
|
48
|
+
margin-right: 0;
|
|
49
|
+
}
|
|
50
|
+
@media only screen and (max-width: 720px) {
|
|
51
|
+
#summary {
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
}
|
|
54
|
+
#summary > div {
|
|
55
|
+
margin-right: 0;
|
|
56
|
+
margin-top: 2rem;
|
|
57
|
+
}
|
|
58
|
+
#summary > div:first-child {
|
|
59
|
+
margin-top: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.summary-total {
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
margin-bottom: 0.5rem;
|
|
66
|
+
}
|
|
67
|
+
.summary-passed {
|
|
68
|
+
color: #4f8a10;
|
|
69
|
+
border-left: 0.4rem solid #4f8a10;
|
|
70
|
+
padding-left: 0.5rem;
|
|
71
|
+
}
|
|
72
|
+
.summary-failed,
|
|
73
|
+
.summary-obsolete-snapshots {
|
|
74
|
+
color: #d8000c;
|
|
75
|
+
border-left: 0.4rem solid #d8000c;
|
|
76
|
+
padding-left: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
.summary-pending {
|
|
79
|
+
color: #9f6000;
|
|
80
|
+
border-left: 0.4rem solid #9f6000;
|
|
81
|
+
padding-left: 0.5rem;
|
|
82
|
+
}
|
|
83
|
+
.summary-empty {
|
|
84
|
+
color: #999;
|
|
85
|
+
border-left: 0.4rem solid #999;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.test-result {
|
|
89
|
+
padding: 1rem;
|
|
90
|
+
margin-bottom: 0.25rem;
|
|
91
|
+
}
|
|
92
|
+
.test-result:last-child {
|
|
93
|
+
border: 0;
|
|
94
|
+
}
|
|
95
|
+
.test-result.passed {
|
|
96
|
+
background-color: #dff2bf;
|
|
97
|
+
color: #4f8a10;
|
|
98
|
+
}
|
|
99
|
+
.test-result.failed {
|
|
100
|
+
background-color: #ffbaba;
|
|
101
|
+
color: #d8000c;
|
|
102
|
+
}
|
|
103
|
+
.test-result.pending {
|
|
104
|
+
background-color: #ffdf61;
|
|
105
|
+
color: #9f6000;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.test-info {
|
|
109
|
+
display: flex;
|
|
110
|
+
justify-content: space-between;
|
|
111
|
+
}
|
|
112
|
+
.test-suitename {
|
|
113
|
+
width: 20%;
|
|
114
|
+
text-align: left;
|
|
115
|
+
font-weight: bold;
|
|
116
|
+
word-break: break-word;
|
|
117
|
+
}
|
|
118
|
+
.test-title {
|
|
119
|
+
width: 40%;
|
|
120
|
+
text-align: left;
|
|
121
|
+
font-style: italic;
|
|
122
|
+
}
|
|
123
|
+
.test-status {
|
|
124
|
+
width: 20%;
|
|
125
|
+
text-align: right;
|
|
126
|
+
}
|
|
127
|
+
.test-duration {
|
|
128
|
+
width: 10%;
|
|
129
|
+
text-align: right;
|
|
130
|
+
font-size: 0.75rem;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.failureMessages {
|
|
134
|
+
padding: 0 1rem;
|
|
135
|
+
margin-top: 1rem;
|
|
136
|
+
border-top: 1px dashed #d8000c;
|
|
137
|
+
}
|
|
138
|
+
.failureMessages.suiteFailure {
|
|
139
|
+
border-top: none;
|
|
140
|
+
}
|
|
141
|
+
.failureMsg {
|
|
142
|
+
white-space: pre-wrap;
|
|
143
|
+
white-space: -moz-pre-wrap;
|
|
144
|
+
white-space: -pre-wrap;
|
|
145
|
+
white-space: -o-pre-wrap;
|
|
146
|
+
word-wrap: break-word;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.suite-container {
|
|
150
|
+
margin-bottom: 2rem;
|
|
151
|
+
}
|
|
152
|
+
.suite-container > input[type="checkbox"] {
|
|
153
|
+
position: absolute;
|
|
154
|
+
left: -100vw;
|
|
155
|
+
}
|
|
156
|
+
.suite-container label {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
.suite-container .suite-tests {
|
|
160
|
+
overflow-y: hidden;
|
|
161
|
+
height: 0;
|
|
162
|
+
}
|
|
163
|
+
.suite-container > input[type="checkbox"]:checked ~ .suite-tests {
|
|
164
|
+
height: auto;
|
|
165
|
+
overflow: visible;
|
|
166
|
+
}
|
|
167
|
+
.suite-info {
|
|
168
|
+
padding: 1rem;
|
|
169
|
+
background-color: #eee;
|
|
170
|
+
color: #777;
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
margin-bottom: 0.25rem;
|
|
174
|
+
}
|
|
175
|
+
.suite-info:hover {
|
|
176
|
+
background-color: #ddd;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
}
|
|
179
|
+
.suite-info .suite-path {
|
|
180
|
+
word-break: break-all;
|
|
181
|
+
flex-grow: 1;
|
|
182
|
+
font-family: monospace;
|
|
183
|
+
font-size: 1rem;
|
|
184
|
+
}
|
|
185
|
+
.suite-info .suite-time {
|
|
186
|
+
margin-left: 0.5rem;
|
|
187
|
+
padding: 0.2rem 0.3rem;
|
|
188
|
+
font-size: 0.75rem;
|
|
189
|
+
}
|
|
190
|
+
.suite-info .suite-time.warn {
|
|
191
|
+
background-color: #d8000c;
|
|
192
|
+
color: #fff;
|
|
193
|
+
}
|
|
194
|
+
.suite-info:before {
|
|
195
|
+
content: "\2303";
|
|
196
|
+
display: inline-block;
|
|
197
|
+
margin-right: 0.5rem;
|
|
198
|
+
transform: rotate(0deg);
|
|
199
|
+
}
|
|
200
|
+
.suite-container > input[type="checkbox"]:checked ~ label .suite-info:before {
|
|
201
|
+
transform: rotate(180deg);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* CONSOLE LOGS */
|
|
205
|
+
.suite-consolelog {
|
|
206
|
+
margin-bottom: 0.25rem;
|
|
207
|
+
padding: 1rem;
|
|
208
|
+
background-color: #efefef;
|
|
209
|
+
}
|
|
210
|
+
.suite-consolelog-header {
|
|
211
|
+
font-weight: bold;
|
|
212
|
+
}
|
|
213
|
+
.suite-consolelog-item {
|
|
214
|
+
padding: 0.5rem;
|
|
215
|
+
}
|
|
216
|
+
.suite-consolelog-item pre {
|
|
217
|
+
margin: 0.5rem 0;
|
|
218
|
+
white-space: pre-wrap;
|
|
219
|
+
white-space: -moz-pre-wrap;
|
|
220
|
+
white-space: -pre-wrap;
|
|
221
|
+
white-space: -o-pre-wrap;
|
|
222
|
+
word-wrap: break-word;
|
|
223
|
+
}
|
|
224
|
+
.suite-consolelog-item-origin {
|
|
225
|
+
color: #777;
|
|
226
|
+
font-weight: bold;
|
|
227
|
+
}
|
|
228
|
+
.suite-consolelog-item-message {
|
|
229
|
+
color: #000;
|
|
230
|
+
font-size: 1rem;
|
|
231
|
+
padding: 0 0.5rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* OBSOLETE SNAPSHOTS */
|
|
235
|
+
.suite-obsolete-snapshots {
|
|
236
|
+
margin-bottom: 0.25rem;
|
|
237
|
+
padding: 1rem;
|
|
238
|
+
background-color: #ffbaba;
|
|
239
|
+
color: #d8000c;
|
|
240
|
+
}
|
|
241
|
+
.suite-obsolete-snapshots-header {
|
|
242
|
+
font-weight: bold;
|
|
243
|
+
}
|
|
244
|
+
.suite-obsolete-snapshots-item {
|
|
245
|
+
padding: 0.5rem;
|
|
246
|
+
}
|
|
247
|
+
.suite-obsolete-snapshots-item pre {
|
|
248
|
+
margin: 0.5rem 0;
|
|
249
|
+
white-space: pre-wrap;
|
|
250
|
+
white-space: -moz-pre-wrap;
|
|
251
|
+
white-space: -pre-wrap;
|
|
252
|
+
white-space: -o-pre-wrap;
|
|
253
|
+
word-wrap: break-word;
|
|
254
|
+
}
|
|
255
|
+
.suite-obsolete-snapshots-item-message {
|
|
256
|
+
color: #000;
|
|
257
|
+
font-size: 1rem;
|
|
258
|
+
padding: 0 0.5rem;
|
|
259
|
+
}
|
|
260
|
+
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Unit Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2025-02-21 13:58:46</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (10)</div><div class="summary-passed ">10 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (35)</div><div class="summary-passed ">35 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><input id="collapsible-0" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-0"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/configuration/__tests__/Configuration.test.js</div><div class="suite-time">2.12s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should add new key-value pair to the configuration</div><div class="test-status">passed</div><div class="test-duration">0.017s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should combine configurations correctly using addAll</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Configuration Class</div><div class="test-title">should return correct value for a given key</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-2" class="suite-container"><input id="collapsible-1" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-1"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/getUsers_ListOfActors.test.js</div><div class="suite-time">2.324s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">throws an error when config file cannot be loaded</div><div class="test-status">passed</div><div class="test-duration">0.063s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">throws an error when beta feature config does not exist</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">loads main configuration when betaFeature is not provided and main config file exists</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">falls back to default configuration if main config file does not exist</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getListOfActors</div><div class="test-title">loads beta feature configuration when betaFeature is provided</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-3" class="suite-container"><input id="collapsible-2" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-2"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/__tests__/tagProcessor.test.js</div><div class="suite-time">2.342s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should return tagArgs if no edition is provided</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with <= operator</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with >= operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with < operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with > operator</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle a single edition with no operator</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should log a message if edition is not found</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should handle multiple editions</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">TagProcessor</div><div class="test-title">should build tags correctly when tags are empty</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div></div></div><div id="suite-4" class="suite-container"><input id="collapsible-3" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-3"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/examples/src/__tests__/App.test.js</div><div class="suite-time">2.318s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">example functions</div><div class="test-title">add function adds two numbers correctly</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">example functions</div><div class="test-title">greet function greets a person with their name</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div></div></div><div id="suite-5" class="suite-container"><input id="collapsible-4" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-4"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/configFileNameProvider.test.js</div><div class="suite-time">2.445s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUATFileName</div><div class="test-title">return the pipeline matched config files for pipeline matched files exists</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUATFileName</div><div class="test-title">return the default config files for pipeline matched files not exists</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-6" class="suite-container"><input id="collapsible-5" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-5"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/buildInFixtures/__tests__/executionContext.test.js</div><div class="suite-time">2.487s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">executionContext</div><div class="test-title">should pass actorInfo with details from getCustomAccountDetails to use</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div></div></div><div id="suite-7" class="suite-container"><input id="collapsible-6" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-6"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/runner/__tests__/RunnerHelper.test.js</div><div class="suite-time">0.663s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">RunnerHelper > createRunner</div><div class="test-title">should throw error on invalid runner type</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">RunnerHelper > createRunner</div><div class="test-title">should create a valid runner class</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div></div></div><div id="suite-8" class="suite-container"><input id="collapsible-7" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-7"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/runner/__tests__/SpawnRunner.test.js</div><div class="suite-time">0.728s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">SpawnRunner > run</div><div class="test-title">should call runPreprocessing when bddMode is true</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></div><div id="suite-9" class="suite-container"><input id="collapsible-8" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-8"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/__tests__/validateFeature.test.js</div><div class="suite-time">0.657s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">runPreprocessing with correct arguments and log success</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">runPreprocessing with playwright conf</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateFeatureFiles</div><div class="test-title">error when runPreprocessing fails</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div></div></div><div id="suite-10" class="suite-container"><input id="collapsible-9" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-9"><div class="suite-info"><div class="suite-path">/Users/maha-19788/office-work/application/repository/gitlab/zoho-apps/zohodesk/testing-framework/src/test/core/playwright/helpers/__tests__/fileMutex.test.js</div><div class="suite-time">3.452s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should create the lock file if it does not exist</div><div class="test-status">passed</div><div class="test-duration">0.042s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should wait for lock file deletion if it exists</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > acquire</div><div class="test-title">should reject if watch timeout exceeds</div><div class="test-status">passed</div><div class="test-duration">1.027s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should delete the lock file if it exists</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should release lock by deleting lock file</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should not attempt to delete the lock file if it does not exist</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FileMutex > release</div><div class="test-title">should log an error if deleting the lock file fails</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div></div></div></div></body></html>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _test = require("@playwright/test");
|
|
5
|
-
var _playwrightBdd = require("playwright-bdd");
|
|
6
|
-
var _readConfigFile = require("./readConfigFile");
|
|
7
|
-
var _builtInFixtures = _interopRequireDefault(require("./builtInFixtures"));
|
|
8
|
-
var _getUserFixtures = _interopRequireDefault(require("./helpers/getUserFixtures"));
|
|
9
|
-
const {
|
|
10
|
-
bddMode
|
|
11
|
-
} = (0, _readConfigFile.generateConfigFromFile)();
|
|
12
|
-
let base = bddMode ? _playwrightBdd.test : _test.test;
|
|
13
|
-
const buildInFixtures = (0, _builtInFixtures.default)(bddMode);
|
|
14
|
-
const buildInFixturesTest = base.extend({
|
|
15
|
-
...buildInFixtures
|
|
16
|
-
});
|
|
17
|
-
const userFixtures = (0, _getUserFixtures.default)();
|
|
18
|
-
const userFixturesTest = base.extend({
|
|
19
|
-
...userFixtures
|
|
20
|
-
});
|
|
21
|
-
const test = (0, _test.mergeTests)(buildInFixturesTest, userFixturesTest);
|
|
22
|
-
module.exports = {
|
|
23
|
-
test
|
|
24
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// This is the sample file generated by testing framework. You can change as per the respective project login
|
|
2
|
-
|
|
3
|
-
const getUrlOrigin = require('../shared/url-helpers/getUrlOrigin');
|
|
4
|
-
|
|
5
|
-
async function accountLogin( { page, email, password } ) {
|
|
6
|
-
await page.locator('#login_id').fill(email);
|
|
7
|
-
await page.locator('#nextbtn').click();
|
|
8
|
-
await page.locator('#password').fill(password);
|
|
9
|
-
await page.locator('#nextbtn').click();
|
|
10
|
-
|
|
11
|
-
const domainUrlOrigin = getUrlOrigin(process.env.domain);
|
|
12
|
-
await page.waitForNavigation();
|
|
13
|
-
await Promise.race([
|
|
14
|
-
page.waitForURL(`${domainUrlOrigin}/**`),
|
|
15
|
-
page.waitForURL('**/announcement/**')
|
|
16
|
-
]);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
module.exports = accountLogin;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "1",
|
|
4
|
-
"edition": "free",
|
|
5
|
-
"orgName": "orgFree",
|
|
6
|
-
"profiles": [
|
|
7
|
-
{
|
|
8
|
-
"profile": "admin",
|
|
9
|
-
"email": "admin+free@zohotest.com",
|
|
10
|
-
"password": "password@0987"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"profile": "agent",
|
|
14
|
-
"email": "agent@zohotest.com",
|
|
15
|
-
"password": "password@12345"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"profile": "lightagent",
|
|
19
|
-
"email": "lightagent@zohotest.com",
|
|
20
|
-
"password": "password@12345"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/* eslint-disable global-require */
|
|
2
|
-
const accountLogin = require('./accountLogin');
|
|
3
|
-
|
|
4
|
-
async function verifyPageIsLoaded({page}) {
|
|
5
|
-
|
|
6
|
-
//Implement your validation logic here
|
|
7
|
-
//Refer deskclientapp testSetup.js
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
loginSteps:accountLogin,
|
|
12
|
-
validateLogin:verifyPageIsLoaded,
|
|
13
|
-
page:()=>{}
|
|
14
|
-
};
|