-
Notifications
You must be signed in to change notification settings - Fork 3
/
test-report.html
260 lines (252 loc) · 23.8 KB
/
test-report.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<html><head><meta charset="utf-8"/><title>Next.js Test Report</title><style type="text/css">html,
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 1rem;
margin: 0;
padding: 0;
color: #333;
}
body {
padding: 2rem 1rem;
font-size: 0.85rem;
}
.jesthtml-content {
margin: 0 auto;
max-width: 70rem;
}
header {
display: flex;
align-items: center;
}
#title {
margin: 0;
flex-grow: 1;
}
#logo {
height: 4rem;
}
#timestamp {
color: #777;
margin-top: 0.5rem;
}
/** SUMMARY */
#summary {
color: #333;
margin: 2rem 0;
display: flex;
font-family: monospace;
font-size: 1rem;
}
#summary > div {
margin-right: 2rem;
background: #eee;
padding: 1rem;
min-width: 15rem;
}
#summary > div:last-child {
margin-right: 0;
}
@media only screen and (max-width: 720px) {
#summary {
flex-direction: column;
}
#summary > div {
margin-right: 0;
margin-top: 2rem;
}
#summary > div:first-child {
margin-top: 0;
}
}
.summary-total {
font-weight: bold;
margin-bottom: 0.5rem;
}
.summary-passed {
color: #4f8a10;
border-left: 0.4rem solid #4f8a10;
padding-left: 0.5rem;
}
.summary-failed,
.summary-obsolete-snapshots {
color: #d8000c;
border-left: 0.4rem solid #d8000c;
padding-left: 0.5rem;
}
.summary-pending {
color: #9f6000;
border-left: 0.4rem solid #9f6000;
padding-left: 0.5rem;
}
.summary-empty {
color: #999;
border-left: 0.4rem solid #999;
}
.test-result {
padding: 1rem;
margin-bottom: 0.25rem;
}
.test-result:last-child {
border: 0;
}
.test-result.passed {
background-color: #dff2bf;
color: #4f8a10;
}
.test-result.failed {
background-color: #ffbaba;
color: #d8000c;
}
.test-result.pending {
background-color: #ffdf61;
color: #9f6000;
}
.test-info {
display: flex;
justify-content: space-between;
}
.test-suitename {
width: 20%;
text-align: left;
font-weight: bold;
word-break: break-word;
}
.test-title {
width: 40%;
text-align: left;
font-style: italic;
}
.test-status {
width: 20%;
text-align: right;
}
.test-duration {
width: 10%;
text-align: right;
font-size: 0.75rem;
}
.failureMessages {
padding: 0 1rem;
margin-top: 1rem;
border-top: 1px dashed #d8000c;
}
.failureMessages.suiteFailure {
border-top: none;
}
.failureMsg {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-container {
margin-bottom: 2rem;
}
.suite-container > input[type="checkbox"] {
position: absolute;
left: -100vw;
}
.suite-container label {
display: block;
}
.suite-container .suite-tests {
overflow-y: hidden;
height: 0;
}
.suite-container > input[type="checkbox"]:checked ~ .suite-tests {
height: auto;
overflow: visible;
}
.suite-info {
padding: 1rem;
background-color: #eee;
color: #777;
display: flex;
align-items: center;
margin-bottom: 0.25rem;
}
.suite-info:hover {
background-color: #ddd;
cursor: pointer;
}
.suite-info .suite-path {
word-break: break-all;
flex-grow: 1;
font-family: monospace;
font-size: 1rem;
}
.suite-info .suite-time {
margin-left: 0.5rem;
padding: 0.2rem 0.3rem;
font-size: 0.75rem;
}
.suite-info .suite-time.warn {
background-color: #d8000c;
color: #fff;
}
.suite-info:before {
content: "\2303";
display: inline-block;
margin-right: 0.5rem;
transform: rotate(0deg);
}
.suite-container > input[type="checkbox"]:checked ~ label .suite-info:before {
transform: rotate(180deg);
}
/* CONSOLE LOGS */
.suite-consolelog {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #efefef;
}
.suite-consolelog-header {
font-weight: bold;
}
.suite-consolelog-item {
padding: 0.5rem;
}
.suite-consolelog-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-consolelog-item-origin {
color: #777;
font-weight: bold;
}
.suite-consolelog-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}
/* OBSOLETE SNAPSHOTS */
.suite-obsolete-snapshots {
margin-bottom: 0.25rem;
padding: 1rem;
background-color: #ffbaba;
color: #d8000c;
}
.suite-obsolete-snapshots-header {
font-weight: bold;
}
.suite-obsolete-snapshots-item {
padding: 0.5rem;
}
.suite-obsolete-snapshots-item pre {
margin: 0.5rem 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}
.suite-obsolete-snapshots-item-message {
color: #000;
font-size: 1rem;
padding: 0 0.5rem;
}
</style></head><body><div class="jesthtml-content"><header><h1 id="title">Next.js Test Report</h1></header><div id="metadata-container"><div id="timestamp">Started: 2024-05-19 22:44:03</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (19)</div><div class="summary-passed ">16 passed</div><div class="summary-failed ">3 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (44)</div><div class="summary-passed ">39 passed</div><div class="summary-failed ">5 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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\api\api.test.js</div><div class="suite-time">3.718s</div></div></label><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename">API status code</div><div class="test-title">should make a successful GET request to localhost</div><div class="test-status">failed</div><div class="test-duration">0.03s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API status code</div><div class="test-title">should make a not-found GET request to localhost</div><div class="test-status">passed</div><div class="test-duration">0.058s</div></div></div><div class="test-result failed"><div class="test-info"><div class="test-suitename">API status code</div><div class="test-title">should make a unauthorized GET request to localhost</div><div class="test-status">failed</div><div class="test-duration">0.007s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API status code</div><div class="test-title">should make a forbiden GET request to localhost</div><div class="test-status">passed</div><div class="test-duration">0.013s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API status code</div><div class="test-title">should make a server-error GET request to localhost</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">API status code</div><div class="test-title">should make a bad-gateway GET request to localhost</div><div class="test-status">passed</div><div class="test-duration">0.008s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Test performance localhost</div><div class="test-title">should simulate some load on localhost</div><div class="test-status">passed</div><div class="test-duration">0.083s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Test performance localhost</div><div class="test-title">should not have significant memory increase during load</div><div class="test-status">passed</div><div class="test-duration">0.056s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\api\auth\route.test.js</div><div class="suite-time warn">6.428s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">API Authentication</div><div class="test-title">should return a data json from API auth routes</div><div class="test-status">passed</div><div class="test-duration">0.988s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API Authentication</div><div class="test-title">should return a status 200 from API auth routes</div><div class="test-status">passed</div><div class="test-duration">0.12s</div></div></div><div class="test-result failed"><div class="test-info"><div class="test-suitename">API Authentication</div><div class="test-title">should [GET] from get API Route /api/auth/providers</div><div class="test-status">failed</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\Feed.test.jsx</div><div class="suite-time">4.961s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">FeedComponent</div><div class="test-title">should render the Search Field Text</div><div class="test-status">passed</div><div class="test-duration">0.149s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">FeedComponent</div><div class="test-title">should render the FeedComponent</div><div class="test-status">passed</div><div class="test-duration">0.01s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\Home.test.jsx</div><div class="suite-time warn">5.093s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">HomePage</div><div class="test-title">should render a HomePage Header text</div><div class="test-status">passed</div><div class="test-duration">0.09s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">HomePage</div><div class="test-title">should render the description text</div><div class="test-status">passed</div><div class="test-duration">0.014s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">HomePage</div><div class="test-title">should match the snapshot</div><div class="test-status">passed</div><div class="test-duration">0.024s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">HomePage</div><div class="test-title">should render the Feed Component</div><div class="test-status">passed</div><div class="test-duration">0.021s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\NavBar.test.jsx</div><div class="suite-time warn">5.203s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">NavbarComponent</div><div class="test-title">Should render NavbarComponents</div><div class="test-status">passed</div><div class="test-duration">0.039s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\Profile.test.jsx</div><div class="suite-time warn">5.349s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Profile Page</div><div class="test-title">should render MyProfile Page Component</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">Profile Page</div><div class="test-title">should render UserProfile Page Component</div><div class="test-status">passed</div><div class="test-duration">0.001s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\RootLayout.test.jsx</div><div class="suite-time warn">5.445s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">MainLayout</div><div class="test-title">should render RootLayout component</div><div class="test-status">passed</div><div class="test-duration">0.02s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\CreatePrompt.test.jsx</div><div class="suite-time warn">5.517s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">CreatePromptPage</div><div class="test-title">should render the prompt form (authenticated)</div><div class="test-status">passed</div><div class="test-duration">0.197s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">CreatePromptPage</div><div class="test-title">should redirect to login (unauthenticated)</div><div class="test-status">passed</div><div class="test-duration">0.019s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">CreatePromptPage</div><div class="test-title">should render CreatePromptPage Component</div><div class="test-status">passed</div><div class="test-duration">0.004s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\libs\database.test.js</div><div class="suite-time">0.643s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Database Connection</div><div class="test-title">should render connection mongoDB</div><div class="test-status">passed</div><div class="test-duration">0.001s</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">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\Profile.test.jsx</div><div class="suite-time">1.319s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">ProfileComponent</div><div class="test-title">should render Profile Component</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div></div></div><div id="suite-11" class="suite-container"><input id="collapsible-10" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-10"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\index.test.js</div><div class="suite-time">0.823s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Component Imports</div><div class="test-title">should import all components without errors</div><div class="test-status">passed</div><div class="test-duration">0.016s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Component Imports</div><div class="test-title">should import all components without errors snapShot</div><div class="test-status">passed</div><div class="test-duration">0.01s</div></div></div></div></div><div id="suite-12" class="suite-container"><input id="collapsible-11" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-11"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\Provider.test.jsx</div><div class="suite-time">1.437s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">ProviderComponent</div><div class="test-title">should render Provider Components</div><div class="test-status">passed</div><div class="test-duration">0.006s</div></div></div></div></div><div id="suite-13" class="suite-container"><input id="collapsible-12" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-12"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\index.test.js</div><div class="suite-time">1.148s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Page Imports</div><div class="test-title">should import all Pages without errors</div><div class="test-status">passed</div><div class="test-duration">0.009s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Page Imports</div><div class="test-title">should import all Pages without errors by snapShot</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div></div></div><div id="suite-14" class="suite-container"><input id="collapsible-13" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-13"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\Form.test.jsx</div><div class="suite-time">1.291s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Form Components</div><div class="test-title">should render Form Component</div><div class="test-status">passed</div><div class="test-duration">0.007s</div></div></div></div></div><div id="suite-15" class="suite-container"><input id="collapsible-14" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-14"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\components\PromptCard.test.jsx</div><div class="suite-time">2.753s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">PromptCardComponent</div><div class="test-title">should render a PromptCard Component</div><div class="test-status">passed</div><div class="test-duration">0.015s</div></div></div></div></div><div id="suite-16" class="suite-container"><input id="collapsible-15" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-15"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\api\prompt\id\route.test.js</div><div class="suite-time warn">9.358s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">API prompt ID</div><div class="test-title">should return data json from API route Prompt ID</div><div class="test-status">passed</div><div class="test-duration">4.394s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API prompt ID</div><div class="test-title">should return status 200 from API route Prompt ID</div><div class="test-status">passed</div><div class="test-duration">0.608s</div></div></div></div></div><div id="suite-17" class="suite-container"><input id="collapsible-16" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-16"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\api\users\[id]\post\route.test.js</div><div class="suite-time warn">9.561s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">API User Prompt</div><div class="test-title">should be return data json from /api/users/[id]/post</div><div class="test-status">passed</div><div class="test-duration">4.408s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API User Prompt</div><div class="test-title">should be return status from /api/users/[id]/post</div><div class="test-status">passed</div><div class="test-duration">0.684s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API User Prompt</div><div class="test-title">shoud be [GET} reuturn status code from API /api/users/[id]/posts/route</div><div class="test-status">passed</div><div class="test-duration">0s</div></div></div></div></div><div id="suite-18" class="suite-container"><input id="collapsible-17" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-17"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\pages\UpdatePrompt.test.jsx</div><div class="suite-time">1.324s</div></div></label><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">UpdatePrompt</div><div class="test-title">should render UpdatePrompt Page</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div></div></div><div id="suite-19" class="suite-container"><input id="collapsible-18" type="checkbox" class="toggle" checked="checked"/><label for="collapsible-18"><div class="suite-info"><div class="suite-path">D:\2-bai tap cua dev\Project training web\Share_prompt\share-prompt-ai\__tests__\api\prompt\route.test.js</div><div class="suite-time warn">12.857s</div></div></label><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename">API Prompt</div><div class="test-title">should return data json from API Prompt</div><div class="test-status">failed</div><div class="test-duration">2.369s</div></div></div><div class="test-result failed"><div class="test-info"><div class="test-suitename">API Prompt</div><div class="test-title">should [GET]: response data as JSON from API Route</div><div class="test-status">failed</div><div class="test-duration">4.521s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API Prompt</div><div class="test-title">should [GET]: a fail response data as JSON from API Route</div><div class="test-status">passed</div><div class="test-duration">0.299s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API Prompt</div><div class="test-title">should Response status code is 200</div><div class="test-status">passed</div><div class="test-duration">0.601s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">API Prompt</div><div class="test-title">should Response has the required fields</div><div class="test-status">passed</div><div class="test-duration">0.571s</div></div></div></div></div></div></body></html>