dceky 1.0.5-beta.ky-declarations.12 → 1.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 +45 -29
- package/lib/commands/assertDoesNotHaveClass.d.ts +18 -0
- package/lib/commands/assertDoesNotHaveClass.js +17 -0
- package/lib/commands/assertDoesNotHaveClass.js.map +1 -0
- package/lib/commands/assertHasClass.d.ts +18 -0
- package/lib/commands/assertHasClass.js +17 -0
- package/lib/commands/assertHasClass.js.map +1 -0
- package/lib/commands/assertNumElements.d.ts +18 -0
- package/lib/commands/assertNumElements.js +17 -0
- package/lib/commands/assertNumElements.js.map +1 -0
- package/lib/commands/clickWithRetry.d.ts +19 -0
- package/lib/commands/clickWithRetry.js +29 -0
- package/lib/commands/clickWithRetry.js.map +1 -0
- package/lib/commands/genTextOfLength.d.ts +20 -0
- package/lib/commands/genTextOfLength.js +20 -0
- package/lib/commands/genTextOfLength.js.map +1 -0
- package/lib/commands/getAttribute.d.ts +20 -0
- package/lib/commands/getAttribute.js +22 -0
- package/lib/commands/getAttribute.js.map +1 -0
- package/lib/commands/getClassName.d.ts +15 -0
- package/lib/commands/getClassName.js +21 -0
- package/lib/commands/getClassName.js.map +1 -0
- package/lib/commands/getCurrentDateInfo.d.ts +21 -0
- package/lib/commands/getCurrentDateInfo.js +25 -0
- package/lib/commands/getCurrentDateInfo.js.map +1 -0
- package/lib/commands/getId.d.ts +15 -0
- package/lib/commands/getId.js +21 -0
- package/lib/commands/getId.js.map +1 -0
- package/lib/commands/getNumElements.d.ts +14 -0
- package/lib/commands/getNumElements.js +19 -0
- package/lib/commands/getNumElements.js.map +1 -0
- package/lib/commands/getSpecialChars.d.ts +14 -0
- package/lib/commands/getSpecialChars.js +16 -0
- package/lib/commands/getSpecialChars.js.map +1 -0
- package/lib/commands/getTitle.d.ts +13 -0
- package/lib/commands/getTitle.js +20 -0
- package/lib/commands/getTitle.js.map +1 -0
- package/lib/commands/handleHarvardKey.d.ts +18 -0
- package/lib/commands/handleHarvardKey.js +56 -0
- package/lib/commands/handleHarvardKey.js.map +1 -0
- package/lib/commands/handleHarvardKey2.d.ts +14 -0
- package/lib/commands/handleHarvardKey2.js +88 -0
- package/lib/commands/handleHarvardKey2.js.map +1 -0
- package/lib/commands/launchAs.d.ts +20 -0
- package/lib/commands/launchAs.js +60 -0
- package/lib/commands/launchAs.js.map +1 -0
- package/lib/commands/launchLTIUsingToken.d.ts +19 -0
- package/lib/commands/launchLTIUsingToken.js +74 -0
- package/lib/commands/launchLTIUsingToken.js.map +1 -0
- package/lib/commands/listSelectLabels.d.ts +15 -0
- package/lib/commands/listSelectLabels.js +24 -0
- package/lib/commands/listSelectLabels.js.map +1 -0
- package/lib/commands/listSelectValues.d.ts +15 -0
- package/lib/commands/listSelectValues.js +26 -0
- package/lib/commands/listSelectValues.js.map +1 -0
- package/lib/commands/navigateToHref.d.ts +19 -0
- package/lib/commands/navigateToHref.js +23 -0
- package/lib/commands/navigateToHref.js.map +1 -0
- package/lib/commands/padWithZeros.d.ts +20 -0
- package/lib/commands/padWithZeros.js +24 -0
- package/lib/commands/padWithZeros.js.map +1 -0
- package/lib/commands/runScript.d.ts +16 -0
- package/lib/commands/runScript.js +25 -0
- package/lib/commands/runScript.js.map +1 -0
- package/lib/commands/typeInto.d.ts +20 -0
- package/lib/commands/typeInto.js +28 -0
- package/lib/commands/typeInto.js.map +1 -0
- package/lib/commands/uniquify.d.ts +15 -0
- package/lib/commands/uniquify.js +25 -0
- package/lib/commands/uniquify.js.map +1 -0
- package/lib/commands/visitCanvasEndpoint.d.ts +27 -0
- package/lib/commands/visitCanvasEndpoint.js +35 -0
- package/lib/commands/visitCanvasEndpoint.js.map +1 -0
- package/lib/commands/visitCanvasGETEndpoint.d.ts +20 -0
- package/lib/commands/visitCanvasGETEndpoint.js +26 -0
- package/lib/commands/visitCanvasGETEndpoint.js.map +1 -0
- package/lib/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
- package/lib/commands/waitForAtLeastOneElementPresent.js +27 -0
- package/lib/commands/waitForAtLeastOneElementPresent.js.map +1 -0
- package/lib/commands/waitForElementVisible.d.ts +14 -0
- package/lib/commands/waitForElementVisible.js +20 -0
- package/lib/commands/waitForElementVisible.js.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/init.d.ts +6 -0
- package/lib/init.js +69 -0
- package/lib/init.js.map +1 -0
- package/lib/setup/genCommandImportFile.js +5 -0
- package/lib/setup/genCommandImportFile.js.map +1 -1
- package/lib/setup/genE2ELaunchFile.js +5 -0
- package/lib/setup/genE2ELaunchFile.js.map +1 -1
- package/lib/src/commands/extractDataFromClass.d.ts +7 -4
- package/lib/src/commands/extractDataFromClass.js +2 -1
- package/lib/src/commands/extractDataFromClass.js.map +1 -1
- package/lib/src/commands/extractDataFromClassByContents.d.ts +9 -5
- package/lib/src/commands/extractDataFromClassByContents.js +2 -1
- package/lib/src/commands/extractDataFromClassByContents.js.map +1 -1
- package/lib/src/commands/genTextOfLength.d.ts +20 -0
- package/lib/src/commands/genTextOfLength.js +20 -0
- package/lib/src/commands/genTextOfLength.js.map +1 -0
- package/lib/src/commands/getAttribute.d.ts +20 -0
- package/lib/src/commands/getAttribute.js +22 -0
- package/lib/src/commands/getAttribute.js.map +1 -0
- package/lib/src/commands/getClassName.d.ts +15 -0
- package/lib/src/commands/getClassName.js +21 -0
- package/lib/src/commands/getClassName.js.map +1 -0
- package/lib/src/commands/getCurrentDateInfo.d.ts +21 -0
- package/lib/src/commands/getCurrentDateInfo.js +25 -0
- package/lib/src/commands/getCurrentDateInfo.js.map +1 -0
- package/lib/src/commands/getId.d.ts +15 -0
- package/lib/src/commands/getId.js +21 -0
- package/lib/src/commands/getId.js.map +1 -0
- package/lib/src/commands/getJSON.d.ts +0 -1
- package/lib/src/commands/getJSON.js +1 -4
- package/lib/src/commands/getJSON.js.map +1 -1
- package/lib/src/commands/getSpecialChars.d.ts +14 -0
- package/lib/src/commands/getSpecialChars.js +16 -0
- package/lib/src/commands/getSpecialChars.js.map +1 -0
- package/lib/src/commands/getTitle.d.ts +13 -0
- package/lib/src/commands/getTitle.js +20 -0
- package/lib/src/commands/getTitle.js.map +1 -0
- package/lib/src/commands/index.js +29 -5
- package/lib/src/commands/index.js.map +1 -1
- package/lib/src/commands/launchLTIUsingToken.js +12 -4
- package/lib/src/commands/launchLTIUsingToken.js.map +1 -1
- package/lib/src/commands/listSelectLabels.d.ts +15 -0
- package/lib/src/commands/listSelectLabels.js +24 -0
- package/lib/src/commands/listSelectLabels.js.map +1 -0
- package/lib/src/commands/listSelectValues.d.ts +15 -0
- package/lib/src/commands/listSelectValues.js +27 -0
- package/lib/src/commands/listSelectValues.js.map +1 -0
- package/lib/src/commands/padWithZeros.d.ts +20 -0
- package/lib/src/commands/padWithZeros.js +24 -0
- package/lib/src/commands/padWithZeros.js.map +1 -0
- package/lib/src/commands/uniquify.d.ts +15 -0
- package/lib/src/commands/uniquify.js +26 -0
- package/lib/src/commands/uniquify.js.map +1 -0
- package/lib/src/commands/visitCanvasEndpoint.d.ts +26 -0
- package/lib/src/commands/visitCanvasEndpoint.js +36 -0
- package/lib/src/commands/visitCanvasEndpoint.js.map +1 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.d.ts +23 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.js +28 -0
- package/lib/src/commands/waitForAtLeastOneElementPresent.js.map +1 -0
- package/lib/src/init.js +28 -2
- package/lib/src/init.js.map +1 -1
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.d.ts +6 -0
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js +9 -0
- package/lib/start/constants/DEFAULT_THREADS_PER_COMBO.js.map +1 -0
- package/lib/start/helpers/collectPngFiles.d.ts +9 -0
- package/lib/start/helpers/collectPngFiles.js +31 -0
- package/lib/start/helpers/collectPngFiles.js.map +1 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.d.ts +15 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.js +116 -0
- package/lib/start/helpers/executeAllHeadlessCombinations.js.map +1 -0
- package/lib/start/helpers/executeCypress.d.ts +17 -0
- package/lib/start/helpers/executeCypress.js +103 -0
- package/lib/start/helpers/executeCypress.js.map +1 -0
- package/lib/start/helpers/generateHtmlReport.d.ts +14 -0
- package/lib/start/helpers/generateHtmlReport.js +54 -0
- package/lib/start/helpers/generateHtmlReport.js.map +1 -0
- package/lib/start/helpers/generateReportHomepage.d.ts +9 -0
- package/lib/start/helpers/generateReportHomepage.js +142 -0
- package/lib/start/helpers/generateReportHomepage.js.map +1 -0
- package/lib/start/helpers/generateReporterConfig.d.ts +17 -0
- package/lib/start/helpers/generateReporterConfig.js +32 -0
- package/lib/start/helpers/generateReporterConfig.js.map +1 -0
- package/lib/start/helpers/getDateLabeledDir.d.ts +7 -0
- package/lib/start/helpers/getDateLabeledDir.js +38 -0
- package/lib/start/helpers/getDateLabeledDir.js.map +1 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.d.ts +11 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js +121 -0
- package/lib/start/helpers/mergeAllReportsAndGenerateHtml.js.map +1 -0
- package/lib/start/helpers/mergeReports.d.ts +14 -0
- package/lib/start/helpers/mergeReports.js +63 -0
- package/lib/start/helpers/mergeReports.js.map +1 -0
- package/lib/start/helpers/reportHomepage.ejs +272 -0
- package/lib/start/helpers/runCypressHeadless.d.ts +18 -0
- package/lib/start/helpers/runCypressHeadless.js +138 -0
- package/lib/start/helpers/runCypressHeadless.js.map +1 -0
- package/lib/start/helpers/runCypressVisible.d.ts +8 -0
- package/lib/start/helpers/runCypressVisible.js +53 -0
- package/lib/start/helpers/runCypressVisible.js.map +1 -0
- package/lib/start/index.js +23 -5
- package/lib/start/index.js.map +1 -1
- package/lib/start/types/MochawesomeReporterConfig.d.ts +15 -0
- package/lib/start/types/MochawesomeReporterConfig.js +3 -0
- package/lib/start/types/MochawesomeReporterConfig.js.map +1 -0
- package/lib/start/types/Profile.d.ts +9 -0
- package/lib/start/types/Profile.js +3 -0
- package/lib/start/types/Profile.js.map +1 -0
- package/lib/start/types/ReportInfo.d.ts +14 -0
- package/lib/start/types/ReportInfo.js +3 -0
- package/lib/start/types/ReportInfo.js.map +1 -0
- package/lib/start/types/RunResult.d.ts +12 -0
- package/lib/start/types/RunResult.js +3 -0
- package/lib/start/types/RunResult.js.map +1 -0
- package/lib/start/types/ScreenshotInfo.d.ts +10 -0
- package/lib/start/types/ScreenshotInfo.js +3 -0
- package/lib/start/types/ScreenshotInfo.js.map +1 -0
- package/lib/start/types/TemplateReportInfo.d.ts +12 -0
- package/lib/start/types/TemplateReportInfo.js +3 -0
- package/lib/start/types/TemplateReportInfo.js.map +1 -0
- package/package.json +10 -8
- package/setup/genCommandImportFile.ts +6 -0
- package/setup/genE2ELaunchFile.ts +6 -0
- package/src/commands/extractDataFromClass.ts +17 -6
- package/src/commands/extractDataFromClassByContents.ts +21 -8
- package/src/commands/genTextOfLength.ts +54 -0
- package/src/commands/getAttribute.ts +58 -0
- package/src/commands/getClassName.ts +44 -0
- package/src/commands/getCurrentDateInfo.ts +57 -0
- package/src/commands/getId.ts +44 -0
- package/src/commands/getJSON.ts +0 -4
- package/src/commands/getSpecialChars.ts +34 -0
- package/src/commands/getTitle.ts +39 -0
- package/src/commands/index.ts +29 -5
- package/src/commands/launchLTIUsingToken.ts +12 -4
- package/src/commands/listSelectLabels.ts +47 -0
- package/src/commands/listSelectValues.ts +50 -0
- package/src/commands/padWithZeros.ts +53 -0
- package/src/commands/uniquify.ts +49 -0
- package/src/commands/visitCanvasEndpoint.ts +75 -0
- package/src/commands/waitForAtLeastOneElementPresent.ts +64 -0
- package/start/constants/DEFAULT_THREADS_PER_COMBO.ts +7 -0
- package/start/helpers/collectPngFiles.ts +25 -0
- package/start/helpers/executeAllHeadlessCombinations.ts +92 -0
- package/start/helpers/executeCypress.ts +66 -0
- package/start/helpers/generateHtmlReport.ts +71 -0
- package/start/helpers/generateReportHomepage.ts +148 -0
- package/start/helpers/generateReporterConfig.ts +39 -0
- package/start/helpers/getDateLabeledDir.ts +43 -0
- package/start/helpers/mergeAllReportsAndGenerateHtml.ts +150 -0
- package/start/helpers/mergeReports.ts +82 -0
- package/start/helpers/reportHomepage.ejs +272 -0
- package/start/helpers/runCypressHeadless.ts +164 -0
- package/start/helpers/runCypressVisible.ts +45 -0
- package/start/index.ts +23 -5
- package/start/types/MochawesomeReporterConfig.ts +23 -0
- package/start/types/Profile.ts +12 -0
- package/start/types/ReportInfo.ts +22 -0
- package/start/types/RunResult.ts +18 -0
- package/start/types/ScreenshotInfo.ts +13 -0
- package/start/types/TemplateReportInfo.ts +16 -0
- package/src/commands/visitCanvasGETEndpoint.ts +0 -61
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Cypress Test Reports</title>
|
|
7
|
+
<style>
|
|
8
|
+
* {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
15
|
+
background: #f5f5f5;
|
|
16
|
+
padding: 2rem 1rem;
|
|
17
|
+
color: #222;
|
|
18
|
+
}
|
|
19
|
+
.container {
|
|
20
|
+
max-width: 75rem;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
background: #ffffff;
|
|
23
|
+
border-radius: 0.5rem;
|
|
24
|
+
border: 0.0625rem solid #e0e0e0;
|
|
25
|
+
box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.04);
|
|
26
|
+
}
|
|
27
|
+
header {
|
|
28
|
+
border-bottom: 0.0625rem solid #e0e0e0;
|
|
29
|
+
padding: 1.25rem 1.5rem;
|
|
30
|
+
text-align: center;
|
|
31
|
+
}
|
|
32
|
+
h1 {
|
|
33
|
+
font-size: 1.75rem;
|
|
34
|
+
margin-bottom: 0.625rem;
|
|
35
|
+
}
|
|
36
|
+
.subtitle {
|
|
37
|
+
font-size: 0.95rem;
|
|
38
|
+
color: #666666;
|
|
39
|
+
}
|
|
40
|
+
.content {
|
|
41
|
+
padding: 1.5rem;
|
|
42
|
+
}
|
|
43
|
+
.profile-section {
|
|
44
|
+
margin-bottom: 2.5rem;
|
|
45
|
+
}
|
|
46
|
+
.profile-title {
|
|
47
|
+
font-size: 1.1rem;
|
|
48
|
+
color: #111111;
|
|
49
|
+
margin-bottom: 0.75rem;
|
|
50
|
+
border-bottom: 0.0625rem solid #e0e0e0;
|
|
51
|
+
padding-bottom: 0.375rem;
|
|
52
|
+
}
|
|
53
|
+
.report-grid {
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: repeat(auto-fill, minmax(15.625rem, 1fr));
|
|
56
|
+
gap: 1.25rem;
|
|
57
|
+
margin-bottom: 1.875rem;
|
|
58
|
+
}
|
|
59
|
+
.report-card {
|
|
60
|
+
border: 0.0625rem solid #e0e0e0;
|
|
61
|
+
border-radius: 0.5rem;
|
|
62
|
+
padding: 1rem;
|
|
63
|
+
background: #fafafa;
|
|
64
|
+
}
|
|
65
|
+
.report-card.success {
|
|
66
|
+
border-color: #c8e6c9;
|
|
67
|
+
background: #f4f9f4;
|
|
68
|
+
}
|
|
69
|
+
.report-card.failed {
|
|
70
|
+
border-color: #ffcdd2;
|
|
71
|
+
background: #fdf5f6;
|
|
72
|
+
}
|
|
73
|
+
.browser-name {
|
|
74
|
+
font-size: 1rem;
|
|
75
|
+
font-weight: bold;
|
|
76
|
+
color: #222222;
|
|
77
|
+
margin-bottom: 0.625rem;
|
|
78
|
+
text-transform: capitalize;
|
|
79
|
+
}
|
|
80
|
+
.status {
|
|
81
|
+
display: inline-block;
|
|
82
|
+
padding: 0.25rem 0.75rem;
|
|
83
|
+
border-radius: 0.75rem;
|
|
84
|
+
font-size: 0.85em;
|
|
85
|
+
font-weight: bold;
|
|
86
|
+
margin-bottom: 0.625rem;
|
|
87
|
+
}
|
|
88
|
+
.status.success {
|
|
89
|
+
background: #2e7d32;
|
|
90
|
+
color: white;
|
|
91
|
+
}
|
|
92
|
+
.status.failed {
|
|
93
|
+
background: #c62828;
|
|
94
|
+
color: white;
|
|
95
|
+
}
|
|
96
|
+
.report-link {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
margin-top: 0.625rem;
|
|
99
|
+
padding: 0.5rem 1rem;
|
|
100
|
+
background: #1976d2;
|
|
101
|
+
color: white;
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
border-radius: 0.375rem;
|
|
104
|
+
transition: background 0.3s ease;
|
|
105
|
+
}
|
|
106
|
+
.report-link:hover {
|
|
107
|
+
background: #115293;
|
|
108
|
+
}
|
|
109
|
+
.timestamp {
|
|
110
|
+
font-size: 0.85em;
|
|
111
|
+
color: #777777;
|
|
112
|
+
margin-top: 0.5rem;
|
|
113
|
+
}
|
|
114
|
+
.summary {
|
|
115
|
+
background: #fafafa;
|
|
116
|
+
padding: 1rem 1.125rem;
|
|
117
|
+
border-radius: 0.375rem;
|
|
118
|
+
margin-bottom: 1.875rem;
|
|
119
|
+
border: 0.0625rem solid #e0e0e0;
|
|
120
|
+
}
|
|
121
|
+
.summary h2 {
|
|
122
|
+
color: #111111;
|
|
123
|
+
margin-bottom: 0.625rem;
|
|
124
|
+
font-size: 1rem;
|
|
125
|
+
}
|
|
126
|
+
.summary-stats {
|
|
127
|
+
display: flex;
|
|
128
|
+
gap: 1.25rem;
|
|
129
|
+
flex-wrap: wrap;
|
|
130
|
+
}
|
|
131
|
+
.stat {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
}
|
|
135
|
+
.stat-value {
|
|
136
|
+
font-size: 1.4rem;
|
|
137
|
+
font-weight: bold;
|
|
138
|
+
color: #1976d2;
|
|
139
|
+
}
|
|
140
|
+
.stat-label {
|
|
141
|
+
font-size: 0.9em;
|
|
142
|
+
color: #777777;
|
|
143
|
+
text-transform: uppercase;
|
|
144
|
+
letter-spacing: 0.0625rem;
|
|
145
|
+
}
|
|
146
|
+
.combined-report {
|
|
147
|
+
margin-bottom: 1.5rem;
|
|
148
|
+
padding: 0.875rem 1rem;
|
|
149
|
+
border-radius: 0.375rem;
|
|
150
|
+
border: 0.0625rem solid #d0d0d0;
|
|
151
|
+
background: #f9fafb;
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: space-between;
|
|
155
|
+
gap: 0.75rem;
|
|
156
|
+
}
|
|
157
|
+
.combined-report-title {
|
|
158
|
+
font-size: 0.95rem;
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
color: #111111;
|
|
161
|
+
}
|
|
162
|
+
.combined-report-subtitle {
|
|
163
|
+
font-size: 0.85rem;
|
|
164
|
+
color: #777777;
|
|
165
|
+
margin-top: 0.125rem;
|
|
166
|
+
}
|
|
167
|
+
.combined-report-button {
|
|
168
|
+
padding: 0.5rem 1rem;
|
|
169
|
+
border-radius: 0.25rem;
|
|
170
|
+
border: 0.0625rem solid #1976d2;
|
|
171
|
+
background: #1976d2;
|
|
172
|
+
color: #ffffff;
|
|
173
|
+
text-decoration: none;
|
|
174
|
+
font-size: 0.9rem;
|
|
175
|
+
font-weight: 500;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
}
|
|
178
|
+
.combined-report-button:hover {
|
|
179
|
+
background: #115293;
|
|
180
|
+
border-color: #115293;
|
|
181
|
+
}
|
|
182
|
+
.screenshot-list {
|
|
183
|
+
list-style: none;
|
|
184
|
+
padding-left: 0;
|
|
185
|
+
margin-top: 0.5rem;
|
|
186
|
+
}
|
|
187
|
+
.no-report {
|
|
188
|
+
color: #999;
|
|
189
|
+
font-size: 0.9em;
|
|
190
|
+
}
|
|
191
|
+
</style>
|
|
192
|
+
</head>
|
|
193
|
+
<body>
|
|
194
|
+
<div class="container">
|
|
195
|
+
<header>
|
|
196
|
+
<h1>Cypress Test Reports</h1>
|
|
197
|
+
<p class="subtitle">Profile and browser run summary</p>
|
|
198
|
+
</header>
|
|
199
|
+
<div class="content">
|
|
200
|
+
<% if (hasCombinedReport) { %>
|
|
201
|
+
<div class="combined-report">
|
|
202
|
+
<div>
|
|
203
|
+
<div class="combined-report-title">Combined report for all profiles and browsers</div>
|
|
204
|
+
<div class="combined-report-subtitle">
|
|
205
|
+
<% if (combinedTotalTests !== null && combinedPassedTests !== null) { %>
|
|
206
|
+
<%= combinedPassedTests %>/<%= combinedTotalTests %> tests passing in this run.
|
|
207
|
+
<% } else { %>
|
|
208
|
+
View a single consolidated Mochawesome report for this run.
|
|
209
|
+
<% } %>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<a href="all-runs.html" class="combined-report-button" target="_blank">Open combined report</a>
|
|
213
|
+
</div>
|
|
214
|
+
<% } %>
|
|
215
|
+
|
|
216
|
+
<div class="summary">
|
|
217
|
+
<h2>Summary</h2>
|
|
218
|
+
<div class="summary-stats">
|
|
219
|
+
<div class="stat">
|
|
220
|
+
<div class="stat-value"><%= totalRuns %></div>
|
|
221
|
+
<div class="stat-label">Total Runs</div>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="stat">
|
|
224
|
+
<div class="stat-value"><%= passedRuns %></div>
|
|
225
|
+
<div class="stat-label">Passed</div>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="stat">
|
|
228
|
+
<div class="stat-value"><%= failedRuns %></div>
|
|
229
|
+
<div class="stat-label">Failed</div>
|
|
230
|
+
</div>
|
|
231
|
+
<div class="stat">
|
|
232
|
+
<div class="stat-value"><%= profileCount %></div>
|
|
233
|
+
<div class="stat-label">Profiles</div>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<% Object.entries(reportsByProfile).forEach(([profileName, profileReports]) => { %>
|
|
239
|
+
<div class="profile-section">
|
|
240
|
+
<h2 class="profile-title">📋 Profile: <%= profileName %></h2>
|
|
241
|
+
<div class="report-grid">
|
|
242
|
+
<% profileReports.forEach((report) => { %>
|
|
243
|
+
<div class="report-card <%= report.success ? 'success' : 'failed' %>">
|
|
244
|
+
<div class="browser-name">🌐 <%= report.browser %></div>
|
|
245
|
+
<span class="status <%= report.success ? 'success' : 'failed' %>">
|
|
246
|
+
<%= report.success ? '✅ Passed' : '❌ Failed' %>
|
|
247
|
+
</span>
|
|
248
|
+
<% if (report.totalTests !== undefined && report.passedTests !== undefined) { %>
|
|
249
|
+
<div class="timestamp"><%= report.passedTests %>/<%= report.totalTests %> tests passing</div>
|
|
250
|
+
<% } %>
|
|
251
|
+
<div class="timestamp"><%= report.timestamp %></div>
|
|
252
|
+
<% if (report.relativeReportPath) { %>
|
|
253
|
+
<a href="<%= report.relativeReportPath %>" class="report-link" target="_blank">View Report</a>
|
|
254
|
+
<% } else { %>
|
|
255
|
+
<p class="no-report">Report not available</p>
|
|
256
|
+
<% } %>
|
|
257
|
+
<% if (report.screenshots && report.screenshots.length > 0) { %>
|
|
258
|
+
<ul class="screenshot-list">
|
|
259
|
+
<% report.screenshots.forEach((screenshot) => { %>
|
|
260
|
+
<li><a href="<%= screenshot.href %>" class="report-link" target="_blank"><%= screenshot.name %></a></li>
|
|
261
|
+
<% }) %>
|
|
262
|
+
</ul>
|
|
263
|
+
<% } %>
|
|
264
|
+
</div>
|
|
265
|
+
<% }) %>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
<% }) %>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
</body>
|
|
272
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import RunResult from '../types/RunResult';
|
|
2
|
+
/**
|
|
3
|
+
* Run Cypress in headless mode for a single profile and browser using cypress-parallel
|
|
4
|
+
* @author Yuen Ler Chow
|
|
5
|
+
* @param opts - object of arguments
|
|
6
|
+
* @param opts.profileName - The profile name to use
|
|
7
|
+
* @param opts.browser - The browser to use
|
|
8
|
+
* @param opts.outputDir - The output directory for results
|
|
9
|
+
* @param [opts.numThreads] - The number of parallel threads to use (default: 2)
|
|
10
|
+
* @returns Promise that resolves with run result
|
|
11
|
+
*/
|
|
12
|
+
declare const runCypressHeadless: (opts: {
|
|
13
|
+
profileName: string;
|
|
14
|
+
browser: string;
|
|
15
|
+
outputDir: string;
|
|
16
|
+
numThreads?: number;
|
|
17
|
+
}) => Promise<RunResult>;
|
|
18
|
+
export default runCypressHeadless;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
var __assign = (this && this.__assign) || function () {
|
|
4
|
+
__assign = Object.assign || function(t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
+
t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
return __assign.apply(this, arguments);
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
// Import libs
|
|
19
|
+
var child_process_1 = require("child_process");
|
|
20
|
+
var path_1 = __importDefault(require("path"));
|
|
21
|
+
var fs_1 = __importDefault(require("fs"));
|
|
22
|
+
// Import helpers
|
|
23
|
+
var getRootPath_1 = __importDefault(require("./getRootPath"));
|
|
24
|
+
var generateReporterConfig_1 = __importDefault(require("./generateReporterConfig"));
|
|
25
|
+
var mergeReports_1 = __importDefault(require("./mergeReports"));
|
|
26
|
+
var generateHtmlReport_1 = __importDefault(require("./generateHtmlReport"));
|
|
27
|
+
// Import constants
|
|
28
|
+
var DEFAULT_THREADS_PER_COMBO_1 = __importDefault(require("../constants/DEFAULT_THREADS_PER_COMBO"));
|
|
29
|
+
/**
|
|
30
|
+
* Run Cypress in headless mode for a single profile and browser using cypress-parallel
|
|
31
|
+
* @author Yuen Ler Chow
|
|
32
|
+
* @param opts - object of arguments
|
|
33
|
+
* @param opts.profileName - The profile name to use
|
|
34
|
+
* @param opts.browser - The browser to use
|
|
35
|
+
* @param opts.outputDir - The output directory for results
|
|
36
|
+
* @param [opts.numThreads] - The number of parallel threads to use (default: 2)
|
|
37
|
+
* @returns Promise that resolves with run result
|
|
38
|
+
*/
|
|
39
|
+
var runCypressHeadless = function (opts) {
|
|
40
|
+
var profileName = opts.profileName, browser = opts.browser, outputDir = opts.outputDir, _a = opts.numThreads, numThreads = _a === void 0 ? DEFAULT_THREADS_PER_COMBO_1.default : _a;
|
|
41
|
+
return new Promise(function (resolve, reject) {
|
|
42
|
+
var root = (0, getRootPath_1.default)();
|
|
43
|
+
// Ensure output directory exists
|
|
44
|
+
if (!fs_1.default.existsSync(outputDir)) {
|
|
45
|
+
fs_1.default.mkdirSync(outputDir, { recursive: true });
|
|
46
|
+
}
|
|
47
|
+
// Create subdirectory for this profile+browser combination
|
|
48
|
+
var comboDir = path_1.default.join(outputDir, "".concat(profileName, "-").concat(browser));
|
|
49
|
+
if (!fs_1.default.existsSync(comboDir)) {
|
|
50
|
+
fs_1.default.mkdirSync(comboDir, { recursive: true });
|
|
51
|
+
}
|
|
52
|
+
// Create per-combo screenshots directory
|
|
53
|
+
var comboScreenshotsDir = path_1.default.join(comboDir, 'screenshots');
|
|
54
|
+
if (!fs_1.default.existsSync(comboScreenshotsDir)) {
|
|
55
|
+
fs_1.default.mkdirSync(comboScreenshotsDir, { recursive: true });
|
|
56
|
+
}
|
|
57
|
+
var env = __assign(__assign({}, process.env), { CYPRESS_PROFILE: profileName, BROWSER: browser });
|
|
58
|
+
console.log("\n\uD83D\uDE80 Starting Cypress headless: ".concat(profileName, " + ").concat(browser));
|
|
59
|
+
console.log("Output: ".concat(comboDir, "\n"));
|
|
60
|
+
// Create reporter config for cypress-multi-reporters
|
|
61
|
+
var reporterConfigPath = path_1.default.join(comboDir, 'reporter-config.json');
|
|
62
|
+
var reporterConfig = (0, generateReporterConfig_1.default)({
|
|
63
|
+
resultsDir: outputDir,
|
|
64
|
+
profileName: profileName,
|
|
65
|
+
browserName: browser,
|
|
66
|
+
});
|
|
67
|
+
fs_1.default.writeFileSync(reporterConfigPath, JSON.stringify(reporterConfig, null, 2));
|
|
68
|
+
// Cypress parallel run command with browser, threads, and reporter config
|
|
69
|
+
var cypressArgsString = "--headless --browser ".concat(browser, " --config screenshotsFolder=").concat(comboScreenshotsDir, " --reporter cypress-multi-reporters --reporter-options configFile=").concat(reporterConfigPath);
|
|
70
|
+
console.log("Reporter config path: ".concat(reporterConfigPath));
|
|
71
|
+
console.log("Granular results dir: ".concat(path_1.default.join(comboDir, 'granular-results')));
|
|
72
|
+
var args = [
|
|
73
|
+
'cypress-parallel',
|
|
74
|
+
'-s',
|
|
75
|
+
'cy:run',
|
|
76
|
+
'--threads',
|
|
77
|
+
numThreads.toString(),
|
|
78
|
+
'-d',
|
|
79
|
+
'cypress/e2e/**/*',
|
|
80
|
+
'-a',
|
|
81
|
+
// eslint-disable-next-line quotes
|
|
82
|
+
"'\"".concat(cypressArgsString, "\"'"),
|
|
83
|
+
];
|
|
84
|
+
var cypressProcess = (0, child_process_1.spawn)('npx', args, {
|
|
85
|
+
cwd: root,
|
|
86
|
+
env: env,
|
|
87
|
+
stdio: 'inherit',
|
|
88
|
+
shell: true,
|
|
89
|
+
});
|
|
90
|
+
cypressProcess.on('close', function (code) {
|
|
91
|
+
var success = code === 0;
|
|
92
|
+
// Merge granular mochawesome JSON and generate a single HTML report
|
|
93
|
+
var reportGenerated = true;
|
|
94
|
+
try {
|
|
95
|
+
// Merge all json test suites (test files) into one report
|
|
96
|
+
(0, mergeReports_1.default)({
|
|
97
|
+
resultsDir: outputDir,
|
|
98
|
+
profileName: profileName,
|
|
99
|
+
browserName: browser,
|
|
100
|
+
});
|
|
101
|
+
// Generate combined HTML report for all test suites for this single browser+profile combo
|
|
102
|
+
(0, generateHtmlReport_1.default)({
|
|
103
|
+
resultsDir: outputDir,
|
|
104
|
+
profileName: profileName,
|
|
105
|
+
browserName: browser,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
catch (reportError) {
|
|
109
|
+
console.error("\n\u26A0\uFE0F Report generation failed for ".concat(profileName, " + ").concat(browser, ":"), reportError);
|
|
110
|
+
reportGenerated = false;
|
|
111
|
+
}
|
|
112
|
+
// By default, marge names the HTML after the JSON basename: report-data.html
|
|
113
|
+
var reportPath = path_1.default.join(outputDir, "".concat(profileName, "-").concat(browser), 'report', 'report-data.html');
|
|
114
|
+
var result = {
|
|
115
|
+
profileName: profileName,
|
|
116
|
+
browser: browser,
|
|
117
|
+
success: success && reportGenerated,
|
|
118
|
+
outputDir: comboDir,
|
|
119
|
+
reportPath: reportGenerated ? reportPath : undefined,
|
|
120
|
+
};
|
|
121
|
+
if (success && reportGenerated) {
|
|
122
|
+
console.log("\n\u2705 Completed: ".concat(profileName, " + ").concat(browser));
|
|
123
|
+
}
|
|
124
|
+
else if (!reportGenerated) {
|
|
125
|
+
console.log("\n\u26A0\uFE0F Tests ran but report generation failed: ".concat(profileName, " + ").concat(browser));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
console.log("\n\u274C Failed: ".concat(profileName, " + ").concat(browser, " (exit code: ").concat(code, ")"));
|
|
129
|
+
}
|
|
130
|
+
resolve(result);
|
|
131
|
+
});
|
|
132
|
+
cypressProcess.on('error', function (error) {
|
|
133
|
+
reject(error);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
exports.default = runCypressHeadless;
|
|
138
|
+
//# sourceMappingURL=runCypressHeadless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AO,CAAC,GAAG,CAAC,iEAAgD,WAAW,gBAAM,OAAO,CAAE,CAAC,CAAC;YAC1F,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,2BAAe,WAAW,gBAAM,OAAO,0BAAgB,IAAI,MAAG,CAAC,CAAC;YAC9E,CAAC;YAED,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,KAAK;YAC/B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run Cypress in visible/interactive mode with a profile
|
|
3
|
+
* @author Yuen Ler Chow
|
|
4
|
+
* @param profileName - The profile name to use
|
|
5
|
+
* @returns Promise that resolves when Cypress closes
|
|
6
|
+
*/
|
|
7
|
+
declare const runCypressVisible: (profileName: string) => Promise<void>;
|
|
8
|
+
export default runCypressVisible;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* eslint-disable no-console */
|
|
18
|
+
var child_process_1 = require("child_process");
|
|
19
|
+
// Import helpers
|
|
20
|
+
var getRootPath_1 = __importDefault(require("./getRootPath"));
|
|
21
|
+
/**
|
|
22
|
+
* Run Cypress in visible/interactive mode with a profile
|
|
23
|
+
* @author Yuen Ler Chow
|
|
24
|
+
* @param profileName - The profile name to use
|
|
25
|
+
* @returns Promise that resolves when Cypress closes
|
|
26
|
+
*/
|
|
27
|
+
var runCypressVisible = function (profileName) {
|
|
28
|
+
return new Promise(function (resolve, reject) {
|
|
29
|
+
var root = (0, getRootPath_1.default)();
|
|
30
|
+
var env = __assign(__assign({}, process.env), { CYPRESS_PROFILE: profileName });
|
|
31
|
+
console.log("\n\uD83D\uDE80 Launching Cypress in interactive mode with profile: ".concat(profileName));
|
|
32
|
+
console.log(" CYPRESS_PROFILE=".concat(profileName, "\n"));
|
|
33
|
+
var cypressProcess = (0, child_process_1.spawn)('npx', ['cypress', 'open'], {
|
|
34
|
+
cwd: root,
|
|
35
|
+
env: env,
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
shell: true,
|
|
38
|
+
});
|
|
39
|
+
cypressProcess.on('close', function (code) {
|
|
40
|
+
if (code === 0) {
|
|
41
|
+
resolve();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
reject(new Error("Cypress exited with code ".concat(code)));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
cypressProcess.on('error', function (error) {
|
|
48
|
+
reject(error);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
exports.default = runCypressVisible;
|
|
53
|
+
//# sourceMappingURL=runCypressVisible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runCypressVisible.js","sourceRoot":"","sources":["../../../start/helpers/runCypressVisible.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+BAA+B;AAC/B,+CAAsC;AAEtC,iBAAiB;AACjB,8DAAwC;AAExC;;;;;GAKG;AACH,IAAM,iBAAiB,GAAG,UAAC,WAAmB;IAC5C,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;QACjC,IAAM,IAAI,GAAG,IAAA,qBAAW,GAAE,CAAC;QAC3B,IAAM,GAAG,yBACJ,OAAO,CAAC,GAAG,KACd,eAAe,EAAE,WAAW,GAC7B,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,6EAA4D,WAAW,CAAE,CAAC,CAAC;QACvF,OAAO,CAAC,GAAG,CAAC,4BAAqB,WAAW,OAAI,CAAC,CAAC;QAElD,IAAM,cAAc,GAAG,IAAA,qBAAK,EAAC,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE;YACvD,GAAG,EAAE,IAAI;YACT,GAAG,KAAA;YACH,KAAK,EAAE,SAAS;YAChB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,IAAI;YAC9B,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACf,OAAO,EAAE,CAAC;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,KAAK,CAAC,mCAA4B,IAAI,CAAE,CAAC,CAAC,CAAC;YACxD,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,KAAK;YAC/B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
package/lib/start/index.js
CHANGED
|
@@ -20,8 +20,10 @@ var findProfilesByNames_1 = __importDefault(require("./helpers/findProfilesByNam
|
|
|
20
20
|
var validateBrowsers_1 = __importDefault(require("./helpers/validateBrowsers"));
|
|
21
21
|
var extractArgValue_1 = __importDefault(require("./helpers/extractArgValue"));
|
|
22
22
|
var getRootPath_1 = __importDefault(require("./helpers/getRootPath"));
|
|
23
|
+
var executeCypress_1 = __importDefault(require("./helpers/executeCypress"));
|
|
23
24
|
// Import constants
|
|
24
25
|
var AVAILABLE_BROWSERS_1 = __importDefault(require("./constants/AVAILABLE_BROWSERS"));
|
|
26
|
+
var DEFAULT_THREADS_PER_COMBO_1 = __importDefault(require("./constants/DEFAULT_THREADS_PER_COMBO"));
|
|
25
27
|
// Get the project directory
|
|
26
28
|
var pwd = (0, getRootPath_1.default)();
|
|
27
29
|
// Find available profiles under /cypress/profiles
|
|
@@ -73,6 +75,20 @@ var envHeadlessRaw = process.env.HEADLESS;
|
|
|
73
75
|
var headlessFlagValue = (0, extractArgValue_1.default)(args, '--headless');
|
|
74
76
|
var hasHeadlessFlag = headlessFlagValue !== undefined;
|
|
75
77
|
isHeadless = !!(envHeadlessRaw && envHeadlessRaw.toLowerCase() !== 'false') || hasHeadlessFlag;
|
|
78
|
+
// Check for THREADS_PER_COMBO (env var or CLI arg)
|
|
79
|
+
var envThreadsRaw = process.env.THREADS_PER_COMBO;
|
|
80
|
+
var argThreadsRaw = (0, extractArgValue_1.default)(args, '--threadsPerCombo');
|
|
81
|
+
var threadsRaw = envThreadsRaw || argThreadsRaw;
|
|
82
|
+
var threadsPerCombo;
|
|
83
|
+
if (threadsRaw) {
|
|
84
|
+
var parsed = Number.parseInt(threadsRaw, 10);
|
|
85
|
+
if (!Number.isNaN(parsed) && parsed > 0) {
|
|
86
|
+
threadsPerCombo = parsed;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
console.warn("\u26A0\uFE0F Invalid THREADS_PER_COMBO value: \"".concat(threadsRaw, "\". Using default (").concat(DEFAULT_THREADS_PER_COMBO_1.default, ")."));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
76
92
|
// If headless wasn't specified, ask the user to choose
|
|
77
93
|
if (!envHeadlessRaw && !hasHeadlessFlag) {
|
|
78
94
|
var choices = (0, showChooser_1.default)({
|
|
@@ -132,9 +148,11 @@ if (selectedProfiles.length === 0
|
|
|
132
148
|
});
|
|
133
149
|
selectedProfiles = choices.map(function (choice) { return profiles[choice.index]; });
|
|
134
150
|
}
|
|
135
|
-
// Execute
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
151
|
+
// Execute Cypress with selected configuration
|
|
152
|
+
(0, executeCypress_1.default)({
|
|
153
|
+
selectedProfiles: selectedProfiles,
|
|
154
|
+
selectedBrowsers: selectedBrowsers,
|
|
155
|
+
isHeadless: isHeadless,
|
|
156
|
+
threadsPerCombo: threadsPerCombo,
|
|
157
|
+
});
|
|
140
158
|
//# sourceMappingURL=index.js.map
|
package/lib/start/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../start/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;;;GAKG;;;;;AAEH,cAAc;AACd,0CAAoB;AACpB,8CAAwB;AAExB,iBAAiB;AACjB,sEAAgD;AAChD,sFAAgE;AAChE,sFAAgE;AAChE,gFAA0D;AAC1D,8EAAwD;AACxD,sEAAgD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../start/index.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;;;GAKG;;;;;AAEH,cAAc;AACd,0CAAoB;AACpB,8CAAwB;AAExB,iBAAiB;AACjB,sEAAgD;AAChD,sFAAgE;AAChE,sFAAgE;AAChE,gFAA0D;AAC1D,8EAAwD;AACxD,sEAAgD;AAChD,4EAAsD;AAEtD,mBAAmB;AACnB,sFAAgE;AAChE,oGAA8E;AAE9E,4BAA4B;AAC5B,IAAM,GAAG,GAAG,IAAA,qBAAW,GAAE,CAAC;AAE1B,kDAAkD;AAClD,IAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AACvD,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;IAChC,OAAO,CAAC,IAAI,CAAC,mDAA4C,WAAW,MA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;AACxD,2DAA2D;AAC3D,qHAAqH;AACrH,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;OAC1B,CAAC,CAAC,UAAU,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,EAC/C,CAAC;IACD,IAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,GAAG;QAClC,OAAO;YACL,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC;YACpB,WAAW,EAAE,CAAC,CAAC,WAAW;SAC3B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAM,OAAO,GAAG,IAAA,qBAAW,EAAC;QAC1B,QAAQ,EAAE,CACR,UAAU;YACR,CAAC,CAAC,+CAA+C;YACjD,CAAC,CAAC,iBAAiB,CACtB;QACD,OAAO,SAAA;QACP,KAAK,EAAE,wBAAiB,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAE;QAC/C,UAAU,EAAE,UAAU;KACvB,CAAC,CAAC;IAEH,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAO,OAAO,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,8CAA8C;AAC9C,IAAA,wBAAc,EAAC;IACb,gBAAgB,kBAAA;IAChB,gBAAgB,kBAAA;IAChB,UAAU,YAAA;IACV,eAAe,iBAAA;CAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mochawesome reporter configuration
|
|
3
|
+
* @author Yuen Ler Chow
|
|
4
|
+
*/
|
|
5
|
+
type MochawesomeReporterConfig = {
|
|
6
|
+
reporterEnabled: string;
|
|
7
|
+
mochawesomeReporterOptions: {
|
|
8
|
+
reportDir: string;
|
|
9
|
+
reportFilename: string;
|
|
10
|
+
overwrite: boolean;
|
|
11
|
+
html: boolean;
|
|
12
|
+
json: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default MochawesomeReporterConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MochawesomeReporterConfig.js","sourceRoot":"","sources":["../../../start/types/MochawesomeReporterConfig.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../../start/types/Profile.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Information about a generated report
|
|
3
|
+
* @author Yuen Ler Chow
|
|
4
|
+
*/
|
|
5
|
+
type ReportInfo = {
|
|
6
|
+
profileName: string;
|
|
7
|
+
browser: string;
|
|
8
|
+
reportPath: string;
|
|
9
|
+
success: boolean;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
totalTests?: number;
|
|
12
|
+
passedTests?: number;
|
|
13
|
+
};
|
|
14
|
+
export default ReportInfo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportInfo.js","sourceRoot":"","sources":["../../../start/types/ReportInfo.ts"],"names":[],"mappings":""}
|