@simpright/portal 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +48 -2
- package/dist/bugs.d.ts +3 -0
- package/dist/bugs.js +112 -0
- package/dist/build-pages.d.ts +3 -0
- package/dist/build-pages.js +28 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +145 -0
- package/dist/preview.d.ts +13 -0
- package/dist/preview.js +85 -0
- package/dist/publish-run.d.ts +19 -0
- package/dist/publish-run.js +78 -0
- package/dist/run-summaries.d.ts +8 -0
- package/dist/run-summaries.js +91 -0
- package/dist/site.d.ts +34 -0
- package/dist/site.js +63 -0
- package/dist/test-cases.d.ts +3 -0
- package/dist/test-cases.js +155 -0
- package/package.json +44 -4
- package/pages/bugs.html +1240 -0
- package/pages/dashboard.html +1230 -0
- package/pages/test-cases.html +1287 -0
- package/sample/.nojekyll +0 -0
- package/sample/api-regression/run-1/index.html +10 -0
- package/sample/api-regression/run-1/run-summary.json +1 -0
- package/sample/api-regression/run-10/index.html +10 -0
- package/sample/api-regression/run-10/run-summary.json +1 -0
- package/sample/api-regression/run-2/index.html +10 -0
- package/sample/api-regression/run-2/run-summary.json +1 -0
- package/sample/api-regression/run-3/index.html +10 -0
- package/sample/api-regression/run-3/run-summary.json +1 -0
- package/sample/api-regression/run-4/index.html +10 -0
- package/sample/api-regression/run-4/run-summary.json +1 -0
- package/sample/api-regression/run-5/index.html +10 -0
- package/sample/api-regression/run-5/run-summary.json +1 -0
- package/sample/api-regression/run-6/index.html +10 -0
- package/sample/api-regression/run-6/run-summary.json +1 -0
- package/sample/api-regression/run-7/index.html +10 -0
- package/sample/api-regression/run-7/run-summary.json +1 -0
- package/sample/api-regression/run-8/index.html +10 -0
- package/sample/api-regression/run-8/run-summary.json +1 -0
- package/sample/api-regression/run-9/index.html +10 -0
- package/sample/api-regression/run-9/run-summary.json +1 -0
- package/sample/api-regression-history.json +1 -0
- package/sample/api-regression-manifest.json +12 -0
- package/sample/bugs/bugs-data.js +130 -0
- package/sample/custom-ui/run-1/index.html +10 -0
- package/sample/custom-ui/run-1/run-summary.json +1 -0
- package/sample/custom-ui/run-2/index.html +10 -0
- package/sample/custom-ui/run-2/run-summary.json +1 -0
- package/sample/custom-ui-history.json +1 -0
- package/sample/custom-ui-manifest.json +4 -0
- package/sample/latest/api-regression/index.html +10 -0
- package/sample/latest/api-regression/run-summary.json +1 -0
- package/sample/latest/custom-ui/index.html +10 -0
- package/sample/latest/custom-ui/run-summary.json +1 -0
- package/sample/latest/smoke/index.html +10 -0
- package/sample/latest/smoke/run-summary.json +1 -0
- package/sample/latest/ui-regression/index.html +10 -0
- package/sample/latest/ui-regression/run-summary.json +1 -0
- package/sample/portal.json +37 -0
- package/sample/site.json +3 -0
- package/sample/smoke/run-1/index.html +10 -0
- package/sample/smoke/run-1/run-summary.json +1 -0
- package/sample/smoke/run-2/index.html +10 -0
- package/sample/smoke/run-2/run-summary.json +1 -0
- package/sample/smoke/run-3/index.html +10 -0
- package/sample/smoke/run-3/run-summary.json +1 -0
- package/sample/smoke/run-4/index.html +10 -0
- package/sample/smoke/run-4/run-summary.json +1 -0
- package/sample/smoke-history.json +1 -0
- package/sample/smoke-manifest.json +6 -0
- package/sample/test-cases/api/scenarios-data.js +169 -0
- package/sample/test-cases/ui/scenarios-data.js +191 -0
- package/sample/ui-regression/run-1/index.html +10 -0
- package/sample/ui-regression/run-1/run-summary.json +1 -0
- package/sample/ui-regression/run-10/index.html +10 -0
- package/sample/ui-regression/run-10/run-summary.json +1 -0
- package/sample/ui-regression/run-2/index.html +10 -0
- package/sample/ui-regression/run-2/run-summary.json +1 -0
- package/sample/ui-regression/run-3/index.html +10 -0
- package/sample/ui-regression/run-3/run-summary.json +1 -0
- package/sample/ui-regression/run-4/index.html +10 -0
- package/sample/ui-regression/run-4/run-summary.json +1 -0
- package/sample/ui-regression/run-5/index.html +10 -0
- package/sample/ui-regression/run-5/run-summary.json +1 -0
- package/sample/ui-regression/run-6/index.html +10 -0
- package/sample/ui-regression/run-6/run-summary.json +1 -0
- package/sample/ui-regression/run-7/index.html +10 -0
- package/sample/ui-regression/run-7/run-summary.json +1 -0
- package/sample/ui-regression/run-8/index.html +10 -0
- package/sample/ui-regression/run-8/run-summary.json +1 -0
- package/sample/ui-regression/run-9/index.html +10 -0
- package/sample/ui-regression/run-9/run-summary.json +1 -0
- package/sample/ui-regression-history.json +1 -0
- package/sample/ui-regression-manifest.json +12 -0
package/pages/bugs.html
ADDED
|
@@ -0,0 +1,1240 @@
|
|
|
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
|
+
<!-- The Bugs page: simpright-portal build-bugs copies it to bugs/ next to bugs-data.js (window.BUG_CATALOG).
|
|
7
|
+
It reads the latest regression results itself to flag bugs whose tests started passing. -->
|
|
8
|
+
<title>Bugs</title>
|
|
9
|
+
<!-- The portal's icon (the README banner's logo), inline like on the dashboard. -->
|
|
10
|
+
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Crect width='44' height='44' rx='10' fill='%233fb950'/%3E%3Cpath d='M11 23l8 8l15-17' fill='none' stroke='%23fff' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E">
|
|
11
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
12
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
13
|
+
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
14
|
+
<style>
|
|
15
|
+
/* The portal's palette (index.html), from the README banner: GitHub's dark greys and greens. */
|
|
16
|
+
:root {
|
|
17
|
+
--bg: #0d1117;
|
|
18
|
+
--bg-end: #0e1813;
|
|
19
|
+
--inset: #010409;
|
|
20
|
+
--surface: #161b22;
|
|
21
|
+
--surface-2: #21262d;
|
|
22
|
+
--line: #30363d;
|
|
23
|
+
--line-soft: #21262d;
|
|
24
|
+
--line-bright: #8b949e;
|
|
25
|
+
--text: #e6edf3;
|
|
26
|
+
--text-strong: #f0f6fc;
|
|
27
|
+
--muted: #9198a1;
|
|
28
|
+
--green: #3fb950;
|
|
29
|
+
--green-hover: #56d364;
|
|
30
|
+
--green-bg: rgba(63, 185, 80, 0.12);
|
|
31
|
+
--green-line: rgba(63, 185, 80, 0.4);
|
|
32
|
+
--red: #f85149;
|
|
33
|
+
--red-text: #ffa198;
|
|
34
|
+
--red-bg: rgba(248, 81, 73, 0.1);
|
|
35
|
+
--red-line: rgba(248, 81, 73, 0.4);
|
|
36
|
+
--amber: #d29922;
|
|
37
|
+
--amber-text: #e3b341;
|
|
38
|
+
--amber-bg: rgba(210, 153, 34, 0.12);
|
|
39
|
+
--amber-line: rgba(210, 153, 34, 0.4);
|
|
40
|
+
--blue: #58a6ff;
|
|
41
|
+
--blue-text: #79c0ff;
|
|
42
|
+
--blue-bg: rgba(88, 166, 255, 0.1);
|
|
43
|
+
--blue-line: rgba(88, 166, 255, 0.35);
|
|
44
|
+
--mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
* { box-sizing: border-box; }
|
|
48
|
+
|
|
49
|
+
[hidden] { display: none !important; }
|
|
50
|
+
|
|
51
|
+
body {
|
|
52
|
+
margin: 0;
|
|
53
|
+
font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
54
|
+
background-color: var(--bg);
|
|
55
|
+
background-image: linear-gradient(180deg, var(--bg) 0%, var(--bg-end) 100%);
|
|
56
|
+
color: var(--text);
|
|
57
|
+
min-height: 100vh;
|
|
58
|
+
overflow-x: hidden;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
a { color: var(--green); text-decoration: none; }
|
|
62
|
+
a:hover { color: var(--green-hover); }
|
|
63
|
+
button { font-family: inherit; }
|
|
64
|
+
|
|
65
|
+
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
|
|
66
|
+
|
|
67
|
+
/* Layout */
|
|
68
|
+
.app-layout {
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: 420px minmax(0, 1fr);
|
|
71
|
+
height: 100vh;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Sidebar: header, filters, tree */
|
|
76
|
+
.sidebar-pane {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
height: 100vh;
|
|
80
|
+
min-width: 0;
|
|
81
|
+
background: rgba(13, 17, 23, 0.85);
|
|
82
|
+
border-right: 1px solid var(--line-soft);
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.sidebar-header {
|
|
87
|
+
padding: 24px 20px 18px;
|
|
88
|
+
border-bottom: 1px solid var(--line-soft);
|
|
89
|
+
flex-shrink: 0;
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: 16px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* The portal's logo, linking back to it. */
|
|
96
|
+
.brand {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
gap: 12px;
|
|
100
|
+
align-self: flex-start;
|
|
101
|
+
}
|
|
102
|
+
.brand svg { flex: none; }
|
|
103
|
+
.brand-name {
|
|
104
|
+
display: block;
|
|
105
|
+
font-size: 20px;
|
|
106
|
+
font-weight: 700;
|
|
107
|
+
line-height: 1.1;
|
|
108
|
+
letter-spacing: -0.01em;
|
|
109
|
+
color: var(--text-strong);
|
|
110
|
+
}
|
|
111
|
+
.brand-name span { color: var(--green); }
|
|
112
|
+
.brand-sub {
|
|
113
|
+
display: block;
|
|
114
|
+
margin-top: 4px;
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
line-height: 1.1;
|
|
117
|
+
color: var(--muted);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.page-head { display: flex; flex-direction: column; gap: 4px; }
|
|
121
|
+
|
|
122
|
+
.back-link {
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: 6px;
|
|
126
|
+
align-self: flex-start;
|
|
127
|
+
font-size: 13px;
|
|
128
|
+
font-weight: 500;
|
|
129
|
+
color: var(--muted);
|
|
130
|
+
}
|
|
131
|
+
.back-link:hover { color: var(--text); }
|
|
132
|
+
|
|
133
|
+
.brand-title {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
gap: 8px;
|
|
138
|
+
}
|
|
139
|
+
.brand-title h1 {
|
|
140
|
+
font-size: 26px;
|
|
141
|
+
font-weight: 700;
|
|
142
|
+
letter-spacing: -0.02em;
|
|
143
|
+
line-height: 1.2;
|
|
144
|
+
color: var(--text-strong);
|
|
145
|
+
margin: 0;
|
|
146
|
+
}
|
|
147
|
+
.brand-tag {
|
|
148
|
+
font-size: 11px;
|
|
149
|
+
font-weight: 600;
|
|
150
|
+
letter-spacing: 0.06em;
|
|
151
|
+
text-transform: uppercase;
|
|
152
|
+
padding: 2px 8px;
|
|
153
|
+
border-radius: 999px;
|
|
154
|
+
border: 1px solid var(--line);
|
|
155
|
+
color: var(--muted);
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.kpi-row {
|
|
160
|
+
display: grid;
|
|
161
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
162
|
+
gap: 8px;
|
|
163
|
+
}
|
|
164
|
+
.kpi-card {
|
|
165
|
+
background: var(--surface);
|
|
166
|
+
border: 1px solid var(--line);
|
|
167
|
+
border-radius: 10px;
|
|
168
|
+
padding: 10px 6px;
|
|
169
|
+
text-align: center;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
color: var(--text-strong);
|
|
172
|
+
transition: border-color 0.15s ease, background 0.15s ease;
|
|
173
|
+
}
|
|
174
|
+
.kpi-card:hover { border-color: var(--line-bright); }
|
|
175
|
+
.kpi-card.active { border-color: var(--green-line); background: var(--green-bg); }
|
|
176
|
+
.kpi-card .num { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; }
|
|
177
|
+
.kpi-card .lbl {
|
|
178
|
+
display: block;
|
|
179
|
+
font-size: 11px;
|
|
180
|
+
text-transform: uppercase;
|
|
181
|
+
letter-spacing: 0.05em;
|
|
182
|
+
color: var(--muted);
|
|
183
|
+
margin-top: 2px;
|
|
184
|
+
}
|
|
185
|
+
.num-auto { color: var(--green); }
|
|
186
|
+
.num-manual { color: var(--blue); }
|
|
187
|
+
.num-known { color: var(--amber); }
|
|
188
|
+
|
|
189
|
+
.filter-box {
|
|
190
|
+
padding: 14px 20px;
|
|
191
|
+
border-bottom: 1px solid var(--line-soft);
|
|
192
|
+
flex-shrink: 0;
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: 10px;
|
|
196
|
+
}
|
|
197
|
+
.search-input-wrap { position: relative; }
|
|
198
|
+
.search-input {
|
|
199
|
+
width: 100%;
|
|
200
|
+
min-height: 40px;
|
|
201
|
+
background: var(--bg);
|
|
202
|
+
border: 1px solid var(--line);
|
|
203
|
+
border-radius: 8px;
|
|
204
|
+
color: var(--text);
|
|
205
|
+
font-family: inherit;
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
padding: 0 36px 0 36px;
|
|
208
|
+
outline: none;
|
|
209
|
+
}
|
|
210
|
+
.search-input::placeholder { color: var(--muted); }
|
|
211
|
+
.search-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
|
|
212
|
+
.search-icon {
|
|
213
|
+
position: absolute;
|
|
214
|
+
left: 12px;
|
|
215
|
+
top: 50%;
|
|
216
|
+
transform: translateY(-50%);
|
|
217
|
+
color: var(--muted);
|
|
218
|
+
pointer-events: none;
|
|
219
|
+
}
|
|
220
|
+
.clear-search-btn {
|
|
221
|
+
position: absolute;
|
|
222
|
+
right: 6px;
|
|
223
|
+
top: 50%;
|
|
224
|
+
transform: translateY(-50%);
|
|
225
|
+
background: none;
|
|
226
|
+
border: none;
|
|
227
|
+
color: var(--muted);
|
|
228
|
+
font-size: 14px;
|
|
229
|
+
cursor: pointer;
|
|
230
|
+
padding: 4px 8px;
|
|
231
|
+
}
|
|
232
|
+
.clear-search-btn:hover { color: var(--text); }
|
|
233
|
+
|
|
234
|
+
.filter-pills-row {
|
|
235
|
+
display: flex;
|
|
236
|
+
gap: 6px;
|
|
237
|
+
align-items: center;
|
|
238
|
+
justify-content: space-between;
|
|
239
|
+
flex-wrap: wrap;
|
|
240
|
+
}
|
|
241
|
+
.filter-pills-container { display: flex; gap: 6px; flex-wrap: wrap; }
|
|
242
|
+
.filter-pill {
|
|
243
|
+
min-height: 30px;
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
font-weight: 600;
|
|
246
|
+
padding: 0 12px;
|
|
247
|
+
border-radius: 999px;
|
|
248
|
+
border: 1px solid var(--line);
|
|
249
|
+
background: transparent;
|
|
250
|
+
color: var(--muted);
|
|
251
|
+
cursor: pointer;
|
|
252
|
+
display: inline-flex;
|
|
253
|
+
align-items: center;
|
|
254
|
+
gap: 6px;
|
|
255
|
+
transition: color 0.15s ease, border-color 0.15s ease;
|
|
256
|
+
}
|
|
257
|
+
.filter-pill:hover { color: var(--text); border-color: var(--line-bright); }
|
|
258
|
+
.filter-pill.active { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
|
|
259
|
+
.filter-pill.active[data-status="manual"] { background: var(--blue-bg); border-color: var(--blue-line); color: var(--blue-text); }
|
|
260
|
+
.filter-pill.active[data-status="known"] { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-text); }
|
|
261
|
+
|
|
262
|
+
.status-dot {
|
|
263
|
+
width: 7px;
|
|
264
|
+
height: 7px;
|
|
265
|
+
border-radius: 50%;
|
|
266
|
+
background: currentColor;
|
|
267
|
+
flex-shrink: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Tree */
|
|
271
|
+
.scenarios-list {
|
|
272
|
+
flex: 1;
|
|
273
|
+
overflow-y: auto;
|
|
274
|
+
padding: 8px 12px 12px;
|
|
275
|
+
}
|
|
276
|
+
.scenarios-list::-webkit-scrollbar { width: 6px; }
|
|
277
|
+
.scenarios-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
|
|
278
|
+
|
|
279
|
+
.tree-root-label {
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: 6px;
|
|
283
|
+
font-size: 12px;
|
|
284
|
+
font-weight: 700;
|
|
285
|
+
color: var(--muted);
|
|
286
|
+
padding: 6px 8px;
|
|
287
|
+
text-transform: uppercase;
|
|
288
|
+
letter-spacing: 0.06em;
|
|
289
|
+
}
|
|
290
|
+
.tree-root-label .label-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
291
|
+
.tree-action {
|
|
292
|
+
min-height: 26px;
|
|
293
|
+
padding: 0 8px;
|
|
294
|
+
border: 1px solid var(--line);
|
|
295
|
+
border-radius: 6px;
|
|
296
|
+
background: none;
|
|
297
|
+
color: var(--muted);
|
|
298
|
+
font: inherit;
|
|
299
|
+
font-size: 12px;
|
|
300
|
+
font-weight: 600;
|
|
301
|
+
text-transform: none;
|
|
302
|
+
letter-spacing: 0;
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
white-space: nowrap;
|
|
305
|
+
transition: color 0.15s ease, border-color 0.15s ease;
|
|
306
|
+
}
|
|
307
|
+
.tree-action:hover { color: var(--text); border-color: var(--line-bright); }
|
|
308
|
+
.tree-group.collapsed > .tree-children { display: none; }
|
|
309
|
+
.tree-label {
|
|
310
|
+
display: flex;
|
|
311
|
+
align-items: center;
|
|
312
|
+
gap: 6px;
|
|
313
|
+
width: 100%;
|
|
314
|
+
min-height: 36px;
|
|
315
|
+
padding: 0 8px;
|
|
316
|
+
border: none;
|
|
317
|
+
border-radius: 6px;
|
|
318
|
+
background: none;
|
|
319
|
+
cursor: pointer;
|
|
320
|
+
text-align: left;
|
|
321
|
+
color: var(--text-strong);
|
|
322
|
+
transition: background 0.15s ease;
|
|
323
|
+
}
|
|
324
|
+
.tree-label:hover { background: rgba(240, 246, 252, 0.04); }
|
|
325
|
+
.tree-label.area { font-size: 14px; font-weight: 700; }
|
|
326
|
+
.tree-label.file { font-size: 13px; font-weight: 500; color: var(--text); padding-left: 28px; }
|
|
327
|
+
.tree-label .label-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
328
|
+
.tree-label.file .label-text.endpoint { font-family: var(--mono); font-size: 12px; }
|
|
329
|
+
.tree-count {
|
|
330
|
+
font-size: 11px;
|
|
331
|
+
font-weight: 600;
|
|
332
|
+
color: var(--muted);
|
|
333
|
+
padding: 0 8px;
|
|
334
|
+
border-radius: 999px;
|
|
335
|
+
border: 1px solid var(--line);
|
|
336
|
+
}
|
|
337
|
+
.tree-toggle {
|
|
338
|
+
display: inline-flex;
|
|
339
|
+
width: 16px;
|
|
340
|
+
height: 16px;
|
|
341
|
+
color: var(--muted);
|
|
342
|
+
transition: transform 0.2s ease;
|
|
343
|
+
flex-shrink: 0;
|
|
344
|
+
}
|
|
345
|
+
.tree-group.collapsed > .tree-label .tree-toggle { transform: rotate(-90deg); }
|
|
346
|
+
|
|
347
|
+
.tree-leaf {
|
|
348
|
+
display: flex;
|
|
349
|
+
align-items: baseline;
|
|
350
|
+
gap: 8px;
|
|
351
|
+
width: 100%;
|
|
352
|
+
min-height: 40px;
|
|
353
|
+
padding: 9px 8px 9px 52px;
|
|
354
|
+
border: 1px solid transparent;
|
|
355
|
+
border-radius: 8px;
|
|
356
|
+
background: none;
|
|
357
|
+
cursor: pointer;
|
|
358
|
+
text-align: left;
|
|
359
|
+
font-size: 13px;
|
|
360
|
+
color: var(--text);
|
|
361
|
+
}
|
|
362
|
+
.tree-leaf:hover { background: rgba(240, 246, 252, 0.04); }
|
|
363
|
+
.tree-leaf.active { background: var(--green-bg); border-color: var(--green-line); color: var(--text-strong); }
|
|
364
|
+
/* Level with the first line of a wrapped name. */
|
|
365
|
+
.tree-leaf .status-dot { align-self: flex-start; margin-top: 6px; }
|
|
366
|
+
.tree-leaf .status-dot.automated { color: var(--green); }
|
|
367
|
+
.tree-leaf .status-dot.manual { color: var(--blue); }
|
|
368
|
+
.tree-leaf .leaf-id { font-family: var(--mono); font-size: 12px; color: var(--muted); flex-shrink: 0; }
|
|
369
|
+
.tree-leaf.active .leaf-id { color: var(--green); }
|
|
370
|
+
.tree-leaf .leaf-name { flex: 1; min-width: 0; line-height: 1.4; }
|
|
371
|
+
.tree-leaf .leaf-known { color: var(--amber); font-size: 12px; flex-shrink: 0; }
|
|
372
|
+
|
|
373
|
+
.list-empty { padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; }
|
|
374
|
+
|
|
375
|
+
.list-footer {
|
|
376
|
+
padding: 10px 20px;
|
|
377
|
+
border-top: 1px solid var(--line-soft);
|
|
378
|
+
font-size: 12px;
|
|
379
|
+
color: var(--muted);
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
justify-content: space-between;
|
|
383
|
+
gap: 8px;
|
|
384
|
+
flex-shrink: 0;
|
|
385
|
+
flex-wrap: wrap;
|
|
386
|
+
}
|
|
387
|
+
.list-footer code { font-family: var(--mono); }
|
|
388
|
+
|
|
389
|
+
/* Detail pane */
|
|
390
|
+
.detail-pane {
|
|
391
|
+
height: 100vh;
|
|
392
|
+
overflow-y: auto;
|
|
393
|
+
min-width: 0;
|
|
394
|
+
}
|
|
395
|
+
.detail-pane::-webkit-scrollbar { width: 8px; }
|
|
396
|
+
.detail-pane::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
|
|
397
|
+
|
|
398
|
+
.detail-header {
|
|
399
|
+
padding: 28px 40px 0;
|
|
400
|
+
max-width: 1080px;
|
|
401
|
+
}
|
|
402
|
+
.detail-breadcrumbs {
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
gap: 8px;
|
|
406
|
+
font-size: 13px;
|
|
407
|
+
color: var(--muted);
|
|
408
|
+
margin-bottom: 10px;
|
|
409
|
+
flex-wrap: wrap;
|
|
410
|
+
}
|
|
411
|
+
.detail-breadcrumbs .sep { color: var(--line-bright); }
|
|
412
|
+
.detail-breadcrumbs strong { color: var(--text-strong); font-weight: 600; }
|
|
413
|
+
.detail-title-row {
|
|
414
|
+
display: flex;
|
|
415
|
+
align-items: flex-start;
|
|
416
|
+
justify-content: space-between;
|
|
417
|
+
gap: 16px;
|
|
418
|
+
margin-bottom: 12px;
|
|
419
|
+
}
|
|
420
|
+
.detail-title {
|
|
421
|
+
font-size: 28px;
|
|
422
|
+
font-weight: 700;
|
|
423
|
+
letter-spacing: -0.02em;
|
|
424
|
+
line-height: 1.2;
|
|
425
|
+
color: var(--text-strong);
|
|
426
|
+
margin: 0;
|
|
427
|
+
}
|
|
428
|
+
.header-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
|
|
429
|
+
|
|
430
|
+
.btn-action {
|
|
431
|
+
background: var(--surface-2);
|
|
432
|
+
border: 1px solid var(--line);
|
|
433
|
+
color: var(--text-strong);
|
|
434
|
+
font-size: 13px;
|
|
435
|
+
font-weight: 600;
|
|
436
|
+
min-height: 36px;
|
|
437
|
+
padding: 0 14px;
|
|
438
|
+
border-radius: 8px;
|
|
439
|
+
cursor: pointer;
|
|
440
|
+
display: inline-flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
gap: 6px;
|
|
443
|
+
white-space: nowrap;
|
|
444
|
+
transition: background 0.15s ease, border-color 0.15s ease;
|
|
445
|
+
}
|
|
446
|
+
.btn-action:hover { background: #292e36; border-color: var(--line-bright); }
|
|
447
|
+
.btn-action.copied { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
|
|
448
|
+
.btn-action.active { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
|
|
449
|
+
|
|
450
|
+
.meta-tags-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
451
|
+
.chip {
|
|
452
|
+
font-size: 12px;
|
|
453
|
+
font-weight: 600;
|
|
454
|
+
padding: 2px 10px;
|
|
455
|
+
border-radius: 999px;
|
|
456
|
+
border: 1px solid var(--line);
|
|
457
|
+
color: var(--muted);
|
|
458
|
+
background: transparent;
|
|
459
|
+
display: inline-flex;
|
|
460
|
+
align-items: center;
|
|
461
|
+
gap: 6px;
|
|
462
|
+
}
|
|
463
|
+
.chip.id { font-family: var(--mono); font-weight: 500; color: var(--text-strong); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; }
|
|
464
|
+
.chip.automated { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
|
|
465
|
+
.chip.manual { color: var(--blue-text); background: var(--blue-bg); border-color: var(--blue-line); }
|
|
466
|
+
.chip.known { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber-line); }
|
|
467
|
+
.chip.role { color: var(--muted); }
|
|
468
|
+
.chip.tag { font-family: var(--mono); font-weight: 500; color: var(--blue-text); background: rgba(88, 166, 255, 0.08); border-color: rgba(88, 166, 255, 0.25); border-radius: 6px; padding: 2px 8px; }
|
|
469
|
+
|
|
470
|
+
/* The banners sit side by side and wrap; a known issue or a re-check takes the whole row. */
|
|
471
|
+
#detail-banners {
|
|
472
|
+
display: flex;
|
|
473
|
+
flex-wrap: wrap;
|
|
474
|
+
gap: 14px;
|
|
475
|
+
margin: 20px 40px 0;
|
|
476
|
+
max-width: 1000px;
|
|
477
|
+
}
|
|
478
|
+
#detail-banners:empty { display: none; }
|
|
479
|
+
.banner {
|
|
480
|
+
flex: 1 1 360px;
|
|
481
|
+
min-width: 0;
|
|
482
|
+
padding: 16px 18px;
|
|
483
|
+
border-radius: 12px;
|
|
484
|
+
background: var(--surface);
|
|
485
|
+
border: 1px solid var(--line);
|
|
486
|
+
display: flex;
|
|
487
|
+
flex-direction: column;
|
|
488
|
+
gap: 12px;
|
|
489
|
+
}
|
|
490
|
+
.banner.known { flex-basis: 100%; border-color: var(--amber-line); }
|
|
491
|
+
.banner.auto { border-color: var(--green-line); }
|
|
492
|
+
.banner.manual { border-color: var(--blue-line); }
|
|
493
|
+
.banner-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
|
|
494
|
+
.banner-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text-strong); }
|
|
495
|
+
.banner.auto .banner-title { color: var(--green); }
|
|
496
|
+
.banner.manual .banner-title { color: var(--blue-text); }
|
|
497
|
+
.banner.known .banner-title { color: var(--amber-text); }
|
|
498
|
+
.banner-desc { font-size: 13px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
|
|
499
|
+
.banner-desc a:hover { text-decoration: underline; }
|
|
500
|
+
.banner-desc strong { color: var(--text); }
|
|
501
|
+
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
|
502
|
+
.code {
|
|
503
|
+
font-family: var(--mono);
|
|
504
|
+
font-size: 12px;
|
|
505
|
+
color: var(--text);
|
|
506
|
+
background: var(--bg);
|
|
507
|
+
padding: 1px 6px;
|
|
508
|
+
border-radius: 6px;
|
|
509
|
+
border: 1px solid var(--line);
|
|
510
|
+
}
|
|
511
|
+
a .code { color: var(--green); }
|
|
512
|
+
|
|
513
|
+
.detail-tabs-bar {
|
|
514
|
+
margin: 20px 40px 0;
|
|
515
|
+
max-width: 1000px;
|
|
516
|
+
display: flex;
|
|
517
|
+
align-items: center;
|
|
518
|
+
gap: 4px;
|
|
519
|
+
border-bottom: 1px solid var(--line-soft);
|
|
520
|
+
padding-bottom: 8px;
|
|
521
|
+
}
|
|
522
|
+
.detail-tab {
|
|
523
|
+
background: none;
|
|
524
|
+
border: none;
|
|
525
|
+
color: var(--muted);
|
|
526
|
+
font-size: 14px;
|
|
527
|
+
font-weight: 600;
|
|
528
|
+
min-height: 36px;
|
|
529
|
+
padding: 0 14px;
|
|
530
|
+
border-radius: 7px;
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
}
|
|
533
|
+
.detail-tab:hover { color: var(--text); background: rgba(240, 246, 252, 0.04); }
|
|
534
|
+
.detail-tab.active { color: var(--green); background: var(--green-bg); }
|
|
535
|
+
.detail-tabs-bar .btn-action { margin-left: auto; }
|
|
536
|
+
|
|
537
|
+
.detail-content-area { padding: 20px 40px 48px; max-width: 1080px; }
|
|
538
|
+
|
|
539
|
+
.steps-container { display: flex; flex-direction: column; gap: 8px; }
|
|
540
|
+
.step-card {
|
|
541
|
+
display: flex;
|
|
542
|
+
align-items: flex-start;
|
|
543
|
+
gap: 14px;
|
|
544
|
+
padding: 12px 16px;
|
|
545
|
+
border-radius: 10px;
|
|
546
|
+
background: var(--surface);
|
|
547
|
+
border: 1px solid var(--line);
|
|
548
|
+
}
|
|
549
|
+
.step-card:hover { border-color: var(--line-bright); }
|
|
550
|
+
.step-number {
|
|
551
|
+
font-family: var(--mono);
|
|
552
|
+
font-size: 12px;
|
|
553
|
+
font-weight: 600;
|
|
554
|
+
width: 28px;
|
|
555
|
+
height: 28px;
|
|
556
|
+
border-radius: 8px;
|
|
557
|
+
background: var(--green-bg);
|
|
558
|
+
border: 1px solid rgba(63, 185, 80, 0.3);
|
|
559
|
+
color: var(--green);
|
|
560
|
+
display: flex;
|
|
561
|
+
align-items: center;
|
|
562
|
+
justify-content: center;
|
|
563
|
+
flex-shrink: 0;
|
|
564
|
+
}
|
|
565
|
+
.step-text { font-size: 15px; line-height: 1.55; flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 2px; }
|
|
566
|
+
.step-kw-action { color: var(--blue-text); font-weight: 600; }
|
|
567
|
+
.step-kw-verify { color: var(--green); font-weight: 600; }
|
|
568
|
+
.step-token-quote {
|
|
569
|
+
color: var(--amber-text);
|
|
570
|
+
background: rgba(210, 153, 34, 0.1);
|
|
571
|
+
padding: 1px 5px;
|
|
572
|
+
border-radius: 4px;
|
|
573
|
+
font-family: var(--mono);
|
|
574
|
+
font-size: 0.87em;
|
|
575
|
+
}
|
|
576
|
+
.step-token-endpoint { color: var(--blue-text); font-family: var(--mono); font-size: 0.87em; }
|
|
577
|
+
|
|
578
|
+
.yaml-container {
|
|
579
|
+
background: var(--inset);
|
|
580
|
+
border: 1px solid var(--line);
|
|
581
|
+
border-radius: 10px;
|
|
582
|
+
padding: 16px 18px;
|
|
583
|
+
overflow-x: auto;
|
|
584
|
+
}
|
|
585
|
+
.yaml-pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre; }
|
|
586
|
+
.yaml-key { color: var(--blue-text); }
|
|
587
|
+
|
|
588
|
+
.empty-state {
|
|
589
|
+
display: flex;
|
|
590
|
+
flex-direction: column;
|
|
591
|
+
align-items: center;
|
|
592
|
+
justify-content: center;
|
|
593
|
+
min-height: 100%;
|
|
594
|
+
padding: 48px 24px;
|
|
595
|
+
text-align: center;
|
|
596
|
+
color: var(--muted);
|
|
597
|
+
}
|
|
598
|
+
.empty-state svg { width: 64px; height: 64px; stroke: var(--line-bright); margin-bottom: 20px; }
|
|
599
|
+
.empty-state h3 { font-size: 18px; color: var(--text-strong); margin: 0 0 8px; }
|
|
600
|
+
.empty-state p { font-size: 14px; max-width: 440px; line-height: 1.5; margin: 0; }
|
|
601
|
+
|
|
602
|
+
/* The list moves above the detail. */
|
|
603
|
+
@media (max-width: 1100px) {
|
|
604
|
+
.app-layout { display: flex; flex-direction: column; height: auto; overflow: visible; }
|
|
605
|
+
.sidebar-pane { height: auto; border-right: none; border-bottom: 1px solid var(--line-soft); }
|
|
606
|
+
.scenarios-list { max-height: 420px; }
|
|
607
|
+
.detail-pane { height: auto; overflow: visible; }
|
|
608
|
+
.empty-state { min-height: 260px; }
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@media (max-width: 640px) {
|
|
612
|
+
.sidebar-header, .filter-box, .list-footer { padding-left: 16px; padding-right: 16px; }
|
|
613
|
+
.scenarios-list { padding-left: 8px; padding-right: 8px; }
|
|
614
|
+
.tree-leaf { padding-left: 36px; }
|
|
615
|
+
.detail-header { padding: 20px 16px 0; }
|
|
616
|
+
#detail-banners, .detail-tabs-bar { margin-left: 16px; margin-right: 16px; }
|
|
617
|
+
.banner { flex-basis: 100%; }
|
|
618
|
+
.detail-content-area { padding: 16px 16px 32px; }
|
|
619
|
+
.detail-title-row { flex-direction: column; gap: 12px; }
|
|
620
|
+
.detail-title { font-size: 22px; }
|
|
621
|
+
.kpi-card .lbl { font-size: 10px; }
|
|
622
|
+
.step-card { gap: 10px; padding: 10px 12px; }
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/* Bugs page */
|
|
626
|
+
.num-open { color: var(--red); }
|
|
627
|
+
.num-recheck { color: var(--amber); }
|
|
628
|
+
.num-fixed { color: var(--green); }
|
|
629
|
+
.filter-pill.active[data-status="open"] { background: var(--red-bg); border-color: var(--red-line); color: var(--red-text); }
|
|
630
|
+
.filter-pill.active[data-status="recheck"] { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-text); }
|
|
631
|
+
.filter-pill.active[data-status="fixed"] { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
|
|
632
|
+
|
|
633
|
+
.filter-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
|
|
634
|
+
.filter-select {
|
|
635
|
+
width: 100%;
|
|
636
|
+
min-height: 36px;
|
|
637
|
+
background: var(--bg);
|
|
638
|
+
border: 1px solid var(--line);
|
|
639
|
+
border-radius: 8px;
|
|
640
|
+
color: var(--text);
|
|
641
|
+
font-family: inherit;
|
|
642
|
+
font-size: 13px;
|
|
643
|
+
padding: 0 8px;
|
|
644
|
+
outline: none;
|
|
645
|
+
}
|
|
646
|
+
.filter-select:focus { border-color: var(--green); }
|
|
647
|
+
|
|
648
|
+
/* Severity: red critical, amber major, blue minor, grey trivial. */
|
|
649
|
+
.sev-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; align-self: center; }
|
|
650
|
+
.tree-leaf .sev-dot { align-self: flex-start; margin-top: 6px; }
|
|
651
|
+
.sev-critical { color: var(--red); }
|
|
652
|
+
.sev-major { color: var(--amber); }
|
|
653
|
+
.sev-minor { color: var(--blue); }
|
|
654
|
+
.sev-trivial { color: var(--muted); }
|
|
655
|
+
.tree-leaf.bug { padding-left: 28px; }
|
|
656
|
+
.tree-label.status { font-size: 14px; font-weight: 700; }
|
|
657
|
+
.tree-leaf .leaf-recheck { color: var(--amber); font-size: 12px; flex-shrink: 0; }
|
|
658
|
+
.tree-leaf .leaf-tests { color: var(--muted); font-size: 11px; flex-shrink: 0; font-family: var(--mono); }
|
|
659
|
+
|
|
660
|
+
.chip.open { color: var(--red-text); background: var(--red-bg); border-color: var(--red-line); }
|
|
661
|
+
.chip.fixed { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
|
|
662
|
+
.chip.wont-fix { color: var(--muted); }
|
|
663
|
+
.chip.severity { text-transform: capitalize; }
|
|
664
|
+
.chip.severity.sev-critical { color: var(--red-text); background: var(--red-bg); border-color: var(--red-line); }
|
|
665
|
+
.chip.severity.sev-major { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber-line); }
|
|
666
|
+
.chip.severity.sev-minor { color: var(--blue-text); background: var(--blue-bg); border-color: var(--blue-line); }
|
|
667
|
+
.chip.date { font-family: var(--mono); font-weight: 500; }
|
|
668
|
+
|
|
669
|
+
.test-list { display: flex; flex-direction: column; gap: 6px; }
|
|
670
|
+
.test-row {
|
|
671
|
+
display: flex;
|
|
672
|
+
align-items: center;
|
|
673
|
+
gap: 8px 10px;
|
|
674
|
+
flex-wrap: wrap;
|
|
675
|
+
padding: 8px 10px;
|
|
676
|
+
border-radius: 8px;
|
|
677
|
+
background: var(--bg);
|
|
678
|
+
}
|
|
679
|
+
.test-row .test-id { font-family: var(--mono); font-size: 12px; }
|
|
680
|
+
.test-row .test-id:hover { text-decoration: underline; }
|
|
681
|
+
.test-row .test-name { color: var(--text); flex: 1; min-width: 12rem; }
|
|
682
|
+
.result-pill {
|
|
683
|
+
font-size: 11px;
|
|
684
|
+
font-weight: 600;
|
|
685
|
+
padding: 1px 8px;
|
|
686
|
+
border-radius: 999px;
|
|
687
|
+
border: 1px solid var(--line);
|
|
688
|
+
color: var(--muted);
|
|
689
|
+
white-space: nowrap;
|
|
690
|
+
}
|
|
691
|
+
.result-pill.fails { color: var(--red-text); background: var(--red-bg); border-color: var(--red-line); }
|
|
692
|
+
.result-pill.passed { color: var(--amber-text); background: var(--amber-bg); border-color: var(--amber-line); }
|
|
693
|
+
.result-pill.passes { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
|
|
694
|
+
|
|
695
|
+
.section { margin-bottom: 24px; }
|
|
696
|
+
.section h4 {
|
|
697
|
+
margin: 0 0 8px;
|
|
698
|
+
font-size: 12px;
|
|
699
|
+
font-weight: 600;
|
|
700
|
+
text-transform: uppercase;
|
|
701
|
+
letter-spacing: 0.08em;
|
|
702
|
+
color: var(--muted);
|
|
703
|
+
}
|
|
704
|
+
.prose { margin: 0; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; max-width: 72ch; }
|
|
705
|
+
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
706
|
+
.outcome-card { padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
|
|
707
|
+
.outcome-card .label {
|
|
708
|
+
display: inline-block;
|
|
709
|
+
font-size: 11px;
|
|
710
|
+
font-weight: 700;
|
|
711
|
+
text-transform: uppercase;
|
|
712
|
+
letter-spacing: 0.06em;
|
|
713
|
+
padding: 1px 8px;
|
|
714
|
+
border-radius: 999px;
|
|
715
|
+
margin-bottom: 8px;
|
|
716
|
+
}
|
|
717
|
+
.outcome-card.expected .label { color: var(--green); background: var(--green-bg); }
|
|
718
|
+
.outcome-card.actual .label { color: var(--red-text); background: var(--red-bg); }
|
|
719
|
+
.yaml-pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
720
|
+
|
|
721
|
+
@media (max-width: 640px) {
|
|
722
|
+
.outcome-grid { grid-template-columns: 1fr; }
|
|
723
|
+
}
|
|
724
|
+
</style>
|
|
725
|
+
</head>
|
|
726
|
+
<body>
|
|
727
|
+
<div class="app-layout">
|
|
728
|
+
<aside class="sidebar-pane">
|
|
729
|
+
<div class="sidebar-header">
|
|
730
|
+
<!-- The portal's logo; it and the back link lead to the portal. -->
|
|
731
|
+
<a href="../index.html" class="brand">
|
|
732
|
+
<svg width="36" height="36" viewBox="0 0 44 44" aria-hidden="true"><rect width="44" height="44" rx="10" fill="#3fb950"/><path d="M11 23l8 8l15-17" fill="none" stroke="#fff" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
733
|
+
<span><span class="brand-name" id="brand-name"></span><span class="brand-sub" id="brand-tagline"></span></span>
|
|
734
|
+
</a>
|
|
735
|
+
<div class="page-head">
|
|
736
|
+
<a href="../index.html" class="back-link">
|
|
737
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>
|
|
738
|
+
Automation Portal
|
|
739
|
+
</a>
|
|
740
|
+
<div class="brand-title">
|
|
741
|
+
<h1>Bugs</h1>
|
|
742
|
+
<span class="brand-tag">App under test</span>
|
|
743
|
+
</div>
|
|
744
|
+
</div>
|
|
745
|
+
<div class="kpi-row">
|
|
746
|
+
<button type="button" class="kpi-card" data-status="all" title="Show all bugs">
|
|
747
|
+
<span class="num" id="kpi-total">-</span><span class="lbl">Total</span>
|
|
748
|
+
</button>
|
|
749
|
+
<button type="button" class="kpi-card" data-status="open" title="Show open bugs">
|
|
750
|
+
<span class="num num-open" id="kpi-open">-</span><span class="lbl">Open</span>
|
|
751
|
+
</button>
|
|
752
|
+
<button type="button" class="kpi-card" data-status="recheck" title="Show open bugs whose test passed in the latest regression">
|
|
753
|
+
<span class="num num-recheck" id="kpi-recheck">-</span><span class="lbl">Re-check</span>
|
|
754
|
+
</button>
|
|
755
|
+
<button type="button" class="kpi-card" data-status="fixed" title="Show fixed bugs">
|
|
756
|
+
<span class="num num-fixed" id="kpi-fixed">-</span><span class="lbl">Fixed</span>
|
|
757
|
+
</button>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
|
|
761
|
+
<div class="filter-box">
|
|
762
|
+
<div class="search-input-wrap">
|
|
763
|
+
<svg class="search-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
|
764
|
+
<input type="search" id="bug-search" class="search-input" placeholder="Search ID, title, endpoint, scenario..." autocomplete="off" aria-label="Search bugs">
|
|
765
|
+
<button type="button" id="clear-search" class="clear-search-btn" title="Clear search" hidden>✕</button>
|
|
766
|
+
</div>
|
|
767
|
+
<div class="filter-pills-container" role="group" aria-label="Filter by status">
|
|
768
|
+
<button type="button" class="filter-pill active" data-status="all">All</button>
|
|
769
|
+
<button type="button" class="filter-pill" data-status="open"><span class="status-dot" style="color: var(--red)"></span>Open</button>
|
|
770
|
+
<button type="button" class="filter-pill" data-status="recheck"><span class="status-dot" style="color: var(--amber)"></span>Re-check</button>
|
|
771
|
+
<button type="button" class="filter-pill" data-status="fixed"><span class="status-dot" style="color: var(--green)"></span>Fixed</button>
|
|
772
|
+
<button type="button" class="filter-pill" data-status="wont-fix"><span class="status-dot" style="color: var(--muted)"></span>Won't fix</button>
|
|
773
|
+
</div>
|
|
774
|
+
<div class="filter-selects">
|
|
775
|
+
<select id="filter-severity" class="filter-select" aria-label="Filter by severity">
|
|
776
|
+
<option value="">All severities</option>
|
|
777
|
+
<option value="critical">Critical</option>
|
|
778
|
+
<option value="major">Major</option>
|
|
779
|
+
<option value="minor">Minor</option>
|
|
780
|
+
<option value="trivial">Trivial</option>
|
|
781
|
+
</select>
|
|
782
|
+
<select id="filter-layer" class="filter-select" aria-label="Filter by layer and area">
|
|
783
|
+
<option value="">All layers and areas</option>
|
|
784
|
+
</select>
|
|
785
|
+
</div>
|
|
786
|
+
</div>
|
|
787
|
+
|
|
788
|
+
<div class="scenarios-list" id="bug-list"></div>
|
|
789
|
+
|
|
790
|
+
<div class="list-footer">
|
|
791
|
+
<span id="showing-count">Loading bugs...</span>
|
|
792
|
+
<span id="generated-info"></span>
|
|
793
|
+
</div>
|
|
794
|
+
</aside>
|
|
795
|
+
|
|
796
|
+
<main class="detail-pane">
|
|
797
|
+
<div id="empty-state" class="empty-state">
|
|
798
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true">
|
|
799
|
+
<path d="M8 2l1.9 1.9M16 2l-1.9 1.9M9 7.1V6a3 3 0 1 1 6 0v1.1M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6zM12 20v-9M6 13H2M6 17l-3 2M18 13h4M18 17l3 2M6 9L3 7M18 9l3-2"/>
|
|
800
|
+
</svg>
|
|
801
|
+
<h3 id="empty-title">No bug selected</h3>
|
|
802
|
+
<p id="empty-text">Pick a bug in the list to see how to reproduce it, the tests that cover it and their latest result.</p>
|
|
803
|
+
</div>
|
|
804
|
+
|
|
805
|
+
<div id="bug-detail" hidden>
|
|
806
|
+
<header class="detail-header">
|
|
807
|
+
<div class="detail-breadcrumbs" id="detail-breadcrumbs"></div>
|
|
808
|
+
<div class="detail-title-row">
|
|
809
|
+
<h2 class="detail-title" id="detail-title"></h2>
|
|
810
|
+
<div class="header-actions">
|
|
811
|
+
<button type="button" class="btn-action" id="btn-copy-link" data-label="Copy link">Copy link</button>
|
|
812
|
+
<button type="button" class="btn-action" id="btn-copy-yaml" data-label="Copy YAML">Copy YAML</button>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
<div class="meta-tags-row" id="detail-chips"></div>
|
|
816
|
+
</header>
|
|
817
|
+
|
|
818
|
+
<div id="detail-banners"></div>
|
|
819
|
+
|
|
820
|
+
<div class="detail-tabs-bar">
|
|
821
|
+
<button type="button" class="detail-tab active" data-tab="details">Details</button>
|
|
822
|
+
<button type="button" class="detail-tab" data-tab="yaml">YAML</button>
|
|
823
|
+
</div>
|
|
824
|
+
|
|
825
|
+
<div class="detail-content-area">
|
|
826
|
+
<div id="tab-details"></div>
|
|
827
|
+
<div id="tab-yaml" class="yaml-container" hidden><pre class="yaml-pre" id="yaml-content"></pre></div>
|
|
828
|
+
</div>
|
|
829
|
+
</div>
|
|
830
|
+
</main>
|
|
831
|
+
</div>
|
|
832
|
+
|
|
833
|
+
<script src="bugs-data.js"></script>
|
|
834
|
+
<script>
|
|
835
|
+
(function () {
|
|
836
|
+
const catalog = window.BUG_CATALOG;
|
|
837
|
+
const $ = (id) => document.getElementById(id);
|
|
838
|
+
const CHEVRON = '<span class="tree-toggle" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg></span>';
|
|
839
|
+
const STATUS_GROUPS = [['open', 'Open'], ['fixed', 'Fixed'], ['wont-fix', "Won't fix"]];
|
|
840
|
+
|
|
841
|
+
const state = {
|
|
842
|
+
selectedId: null,
|
|
843
|
+
tab: 'details',
|
|
844
|
+
search: '',
|
|
845
|
+
status: 'all',
|
|
846
|
+
severity: '',
|
|
847
|
+
layerArea: '',
|
|
848
|
+
closed: new Set(),
|
|
849
|
+
// Scenario ID -> its test's result in the latest regression of its layer.
|
|
850
|
+
results: new Map(),
|
|
851
|
+
resultsInfo: [],
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
function escapeHtml(value) {
|
|
855
|
+
return String(value ?? '')
|
|
856
|
+
.replace(/&/g, '&')
|
|
857
|
+
.replace(/</g, '<')
|
|
858
|
+
.replace(/>/g, '>')
|
|
859
|
+
.replace(/"/g, '"')
|
|
860
|
+
.replace(/'/g, ''');
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// A project file's page on GitHub; projectPath is the project's folder in the repository ('' at its root).
|
|
864
|
+
function blobUrl(file, line) {
|
|
865
|
+
const [filePath, anchor] = file.split('#');
|
|
866
|
+
return `${catalog.repoUrl}/blob/${catalog.branch}/${catalog.projectPath ?? ''}${filePath}${line ? `#L${line}` : anchor ? `#${anchor.toLowerCase()}` : ''}`;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
function formatDate(iso) {
|
|
870
|
+
return new Date(iso).toLocaleDateString(undefined, { day: 'numeric', month: 'short', year: 'numeric' });
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// The portal's brand from the data file (simpright.yml portal): the title, its accent (the end of it) in green, the tagline.
|
|
874
|
+
function renderBrand(portal) {
|
|
875
|
+
if (!portal) return;
|
|
876
|
+
const accent = portal.titleAccent && portal.title.endsWith(portal.titleAccent) ? portal.titleAccent : '';
|
|
877
|
+
const name = $('brand-name');
|
|
878
|
+
name.textContent = portal.title.slice(0, portal.title.length - accent.length);
|
|
879
|
+
if (accent) {
|
|
880
|
+
const span = document.createElement('span');
|
|
881
|
+
span.textContent = accent;
|
|
882
|
+
name.appendChild(span);
|
|
883
|
+
}
|
|
884
|
+
$('brand-tagline').textContent = portal.tagline || '';
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
function init() {
|
|
888
|
+
if (!catalog) {
|
|
889
|
+
$('showing-count').textContent = 'No bug data found.';
|
|
890
|
+
$('empty-title').textContent = 'No bug data';
|
|
891
|
+
$('empty-text').textContent = 'bugs-data.js is missing. Build it with npm run bugs:build.';
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
894
|
+
document.title = catalog.portal ? `${catalog.portal.title} - ${catalog.title}` : catalog.title;
|
|
895
|
+
renderBrand(catalog.portal);
|
|
896
|
+
const layerAreas = [...new Set(catalog.bugs.map((b) => `${b.layer}/${b.area}`))].sort();
|
|
897
|
+
$('filter-layer').insertAdjacentHTML('beforeend', layerAreas
|
|
898
|
+
.map((key) => {
|
|
899
|
+
const [layer, area] = key.split('/');
|
|
900
|
+
return `<option value="${escapeHtml(key)}">${escapeHtml(`${catalog.layers[layer] ?? layer} / ${area}`)}</option>`;
|
|
901
|
+
})
|
|
902
|
+
.join(''));
|
|
903
|
+
|
|
904
|
+
const commit = catalog.commit ? catalog.commit.slice(0, 7) : '';
|
|
905
|
+
$('generated-info').innerHTML = `Updated ${escapeHtml(formatDate(catalog.generatedAt))}` +
|
|
906
|
+
(commit ? ` · <a href="${escapeHtml(`${catalog.repoUrl}/commit/${catalog.commit}`)}" target="_blank" rel="noreferrer"><code>${escapeHtml(commit)}</code></a>` : '');
|
|
907
|
+
|
|
908
|
+
bindEvents();
|
|
909
|
+
readHash();
|
|
910
|
+
render();
|
|
911
|
+
loadResults().then(render);
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
// run-summary.json (@simpright/portal's run summaries): the run's stats and, per scenario ID, its test's last status.
|
|
915
|
+
async function loadResults() {
|
|
916
|
+
await Promise.all(catalog.regressions.map(async (regression) => {
|
|
917
|
+
try {
|
|
918
|
+
const response = await fetch(regression.results);
|
|
919
|
+
if (!response.ok) return;
|
|
920
|
+
const summary = await response.json();
|
|
921
|
+
const ranAt = summary.stats?.startTime;
|
|
922
|
+
state.resultsInfo.push({ ...regression, ranAt });
|
|
923
|
+
Object.entries(summary.tests || {}).forEach(([id, test]) => {
|
|
924
|
+
state.results.set(id, { last: test.status, expectedStatus: test.expectedStatus, ranAt, regression });
|
|
925
|
+
});
|
|
926
|
+
} catch (error) {
|
|
927
|
+
console.debug(`No results at ${regression.results}`, error);
|
|
928
|
+
}
|
|
929
|
+
}));
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/** How a scenario's test did in the latest regression: fails (the bug is still there), passed (a known issue passed), passes, skipped or none. */
|
|
933
|
+
function resultOf(scenario) {
|
|
934
|
+
const result = state.results.get(scenario.id);
|
|
935
|
+
if (!result) return { kind: 'none', text: scenario.status === 'manual' ? 'Manual' : 'Not in the latest run' };
|
|
936
|
+
const when = result.ranAt ? ` on ${formatDate(result.ranAt)}` : '';
|
|
937
|
+
if (result.last === 'skipped') return { kind: 'none', text: 'Skipped', title: `${result.regression.label}${when}` };
|
|
938
|
+
const passed = result.last === 'passed';
|
|
939
|
+
if (result.expectedStatus === 'failed') {
|
|
940
|
+
return passed
|
|
941
|
+
? { kind: 'passed', text: 'Passed: re-check', title: `The known-issue test passed in the ${result.regression.label}${when}` }
|
|
942
|
+
: { kind: 'fails', text: 'Bug still there', title: `The known-issue test failed as expected in the ${result.regression.label}${when}` };
|
|
943
|
+
}
|
|
944
|
+
return passed
|
|
945
|
+
? { kind: 'passes', text: 'Passes', title: `${result.regression.label}${when}` }
|
|
946
|
+
: { kind: 'fails', text: 'Fails', title: `${result.regression.label}${when}` };
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
function needsRecheck(bug) {
|
|
950
|
+
return bug.status === 'open' && bug.scenarios.some((s) => resultOf(s).kind === 'passed');
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
function bindEvents() {
|
|
954
|
+
$('bug-search').addEventListener('input', (e) => {
|
|
955
|
+
state.search = e.target.value.trim().toLowerCase();
|
|
956
|
+
$('clear-search').hidden = !state.search;
|
|
957
|
+
render();
|
|
958
|
+
});
|
|
959
|
+
$('clear-search').addEventListener('click', () => {
|
|
960
|
+
$('bug-search').value = '';
|
|
961
|
+
state.search = '';
|
|
962
|
+
$('clear-search').hidden = true;
|
|
963
|
+
$('bug-search').focus();
|
|
964
|
+
render();
|
|
965
|
+
});
|
|
966
|
+
document.querySelectorAll('[data-status]').forEach((button) => {
|
|
967
|
+
button.addEventListener('click', () => setStatus(button.dataset.status));
|
|
968
|
+
});
|
|
969
|
+
$('filter-severity').addEventListener('change', (e) => { state.severity = e.target.value; render(); });
|
|
970
|
+
$('filter-layer').addEventListener('change', (e) => { state.layerArea = e.target.value; render(); });
|
|
971
|
+
document.querySelectorAll('.detail-tab').forEach((tab) => {
|
|
972
|
+
tab.addEventListener('click', () => switchTab(tab.dataset.tab));
|
|
973
|
+
});
|
|
974
|
+
$('btn-copy-yaml').addEventListener('click', (e) => copy(e.currentTarget, selected()?.yaml ?? ''));
|
|
975
|
+
$('btn-copy-link').addEventListener('click', (e) => copy(e.currentTarget, location.href));
|
|
976
|
+
window.addEventListener('hashchange', () => {
|
|
977
|
+
readHash();
|
|
978
|
+
render();
|
|
979
|
+
});
|
|
980
|
+
document.addEventListener('keydown', (e) => {
|
|
981
|
+
if (['INPUT', 'TEXTAREA', 'SELECT'].includes(e.target.tagName)) return;
|
|
982
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
983
|
+
e.preventDefault();
|
|
984
|
+
move(e.key === 'ArrowDown' ? 1 : -1);
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
function setStatus(status) {
|
|
990
|
+
state.status = status;
|
|
991
|
+
document.querySelectorAll('[data-status]').forEach((b) => b.classList.toggle('active', b.dataset.status === status && (b.classList.contains('filter-pill') || status !== 'all')));
|
|
992
|
+
render();
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
function matches(bug) {
|
|
996
|
+
if (state.status === 'recheck' && !needsRecheck(bug)) return false;
|
|
997
|
+
if (!['all', 'recheck'].includes(state.status) && bug.status !== state.status) return false;
|
|
998
|
+
if (state.severity && bug.severity !== state.severity) return false;
|
|
999
|
+
if (state.layerArea && `${bug.layer}/${bug.area}` !== state.layerArea) return false;
|
|
1000
|
+
if (!state.search) return true;
|
|
1001
|
+
const text = [bug.id, bug.title, bug.status, bug.severity, bug.layer, bug.area, bug.description ?? '', bug.expected, bug.actual,
|
|
1002
|
+
...bug.affects, ...bug.steps, ...bug.ref, ...bug.scenarios.flatMap((s) => [s.id, s.name])]
|
|
1003
|
+
.join(' ')
|
|
1004
|
+
.toLowerCase();
|
|
1005
|
+
return text.includes(state.search);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
function visible() {
|
|
1009
|
+
// The list shows the bugs grouped by status, in the catalog's order inside each group.
|
|
1010
|
+
return STATUS_GROUPS.flatMap(([status]) => catalog.bugs.filter((b) => b.status === status && matches(b)));
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
function selected() {
|
|
1014
|
+
return catalog.bugs.find((b) => b.id === state.selectedId);
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
function render() {
|
|
1018
|
+
const { stats } = catalog;
|
|
1019
|
+
$('kpi-total').textContent = stats.total;
|
|
1020
|
+
$('kpi-open').textContent = stats.open;
|
|
1021
|
+
$('kpi-recheck').textContent = catalog.bugs.filter(needsRecheck).length;
|
|
1022
|
+
$('kpi-fixed').textContent = stats.fixed;
|
|
1023
|
+
|
|
1024
|
+
const shown = visible();
|
|
1025
|
+
if (!shown.some((b) => b.id === state.selectedId)) state.selectedId = shown[0]?.id ?? null;
|
|
1026
|
+
renderList(shown);
|
|
1027
|
+
const loaded = state.resultsInfo.length
|
|
1028
|
+
? ` · results: ${state.resultsInfo.map((r) => `${r.layer.toUpperCase()} ${r.ranAt ? formatDate(r.ranAt) : ''}`).join(', ')}`
|
|
1029
|
+
: '';
|
|
1030
|
+
$('showing-count').textContent = `Showing ${shown.length} of ${catalog.bugs.length} bugs${loaded}`;
|
|
1031
|
+
const bug = selected();
|
|
1032
|
+
if (bug) renderDetail(bug);
|
|
1033
|
+
else showEmpty(shown.length === 0 && catalog.bugs.length > 0);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
function renderList(shown) {
|
|
1037
|
+
const list = $('bug-list');
|
|
1038
|
+
list.innerHTML = '';
|
|
1039
|
+
const fragment = document.createDocumentFragment();
|
|
1040
|
+
for (const [status, label] of STATUS_GROUPS) {
|
|
1041
|
+
const bugs = shown.filter((b) => b.status === status);
|
|
1042
|
+
if (bugs.length === 0) continue;
|
|
1043
|
+
const key = `status:${status}`;
|
|
1044
|
+
const open = !state.closed.has(key);
|
|
1045
|
+
const el = document.createElement('div');
|
|
1046
|
+
el.className = `tree-group${open ? '' : ' collapsed'}`;
|
|
1047
|
+
const header = document.createElement('button');
|
|
1048
|
+
header.type = 'button';
|
|
1049
|
+
header.className = 'tree-label status';
|
|
1050
|
+
header.setAttribute('aria-expanded', String(open));
|
|
1051
|
+
header.innerHTML = `${CHEVRON}<span class="label-text">${escapeHtml(label)}</span><span class="tree-count">${bugs.length}</span>`;
|
|
1052
|
+
header.addEventListener('click', () => {
|
|
1053
|
+
const nowOpen = el.classList.toggle('collapsed') === false;
|
|
1054
|
+
header.setAttribute('aria-expanded', String(nowOpen));
|
|
1055
|
+
nowOpen ? state.closed.delete(key) : state.closed.add(key);
|
|
1056
|
+
});
|
|
1057
|
+
const children = document.createElement('div');
|
|
1058
|
+
children.className = 'tree-children';
|
|
1059
|
+
bugs.forEach((bug) => children.appendChild(leaf(bug)));
|
|
1060
|
+
el.append(header, children);
|
|
1061
|
+
fragment.appendChild(el);
|
|
1062
|
+
}
|
|
1063
|
+
if (shown.length === 0) {
|
|
1064
|
+
const empty = document.createElement('div');
|
|
1065
|
+
empty.className = 'list-empty';
|
|
1066
|
+
empty.textContent = catalog.bugs.length ? 'No bugs match the filters.' : 'No bugs recorded.';
|
|
1067
|
+
fragment.appendChild(empty);
|
|
1068
|
+
}
|
|
1069
|
+
list.appendChild(fragment);
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
function leaf(bug) {
|
|
1073
|
+
const item = document.createElement('button');
|
|
1074
|
+
item.type = 'button';
|
|
1075
|
+
item.className = `tree-leaf bug${bug.id === state.selectedId ? ' active' : ''}`;
|
|
1076
|
+
item.dataset.id = bug.id;
|
|
1077
|
+
item.title = `${bug.id}: ${bug.title}`;
|
|
1078
|
+
const tests = bug.scenarios.length;
|
|
1079
|
+
item.innerHTML =
|
|
1080
|
+
`<span class="sev-dot sev-${escapeHtml(bug.severity)}" title="${escapeHtml(bug.severity)}"></span>` +
|
|
1081
|
+
`<span class="leaf-id">${escapeHtml(bug.id)}</span>` +
|
|
1082
|
+
`<span class="leaf-name">${escapeHtml(bug.title)}</span>` +
|
|
1083
|
+
(needsRecheck(bug) ? '<span class="leaf-recheck" title="A test passed in the latest regression: re-check">⟳</span>' : '') +
|
|
1084
|
+
`<span class="leaf-tests" title="${tests} scenario(s)">${tests}</span>`;
|
|
1085
|
+
item.addEventListener('click', () => select(bug.id));
|
|
1086
|
+
return item;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
function select(id) {
|
|
1090
|
+
state.selectedId = id;
|
|
1091
|
+
const bug = selected();
|
|
1092
|
+
if (bug) state.closed.delete(`status:${bug.status}`);
|
|
1093
|
+
history.replaceState(null, '', `#bug=${encodeURIComponent(id)}`);
|
|
1094
|
+
render();
|
|
1095
|
+
document.querySelector('.tree-leaf.active')?.scrollIntoView({ block: 'nearest' });
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
function move(direction) {
|
|
1099
|
+
const shown = visible();
|
|
1100
|
+
if (shown.length === 0) return;
|
|
1101
|
+
const index = shown.findIndex((b) => b.id === state.selectedId);
|
|
1102
|
+
select(shown[Math.min(Math.max(index + direction, 0), shown.length - 1)].id);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
function readHash() {
|
|
1106
|
+
const id = new URLSearchParams(location.hash.slice(1)).get('bug');
|
|
1107
|
+
if (id && catalog.bugs.some((b) => b.id === id)) state.selectedId = id;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
function showEmpty(filteredOut) {
|
|
1111
|
+
$('empty-state').hidden = false;
|
|
1112
|
+
$('bug-detail').hidden = true;
|
|
1113
|
+
$('empty-title').textContent = filteredOut ? 'Nothing matches' : 'No bug selected';
|
|
1114
|
+
$('empty-text').textContent = filteredOut
|
|
1115
|
+
? 'No bug matches the search and filters. Clear them to see every bug.'
|
|
1116
|
+
: 'Pick a bug in the list to see how to reproduce it, the tests that cover it and their latest result.';
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
function code(text) {
|
|
1120
|
+
return `<span class="code">${escapeHtml(text)}</span>`;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
function fileLink(file, line) {
|
|
1124
|
+
return `<a href="${escapeHtml(blobUrl(file, line))}" target="_blank" rel="noreferrer">${code(line ? `${file.split('#')[0]}:${line}` : file)}</a>`;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
function renderDetail(bug) {
|
|
1128
|
+
$('empty-state').hidden = true;
|
|
1129
|
+
$('bug-detail').hidden = false;
|
|
1130
|
+
|
|
1131
|
+
$('detail-breadcrumbs').innerHTML =
|
|
1132
|
+
`<span>${escapeHtml(catalog.title)}</span><span class="sep">/</span>` +
|
|
1133
|
+
`<span>${escapeHtml(catalog.layers[bug.layer] ?? bug.layer)}</span><span class="sep">/</span>` +
|
|
1134
|
+
`<strong>${escapeHtml(bug.area)}</strong>`;
|
|
1135
|
+
$('detail-title').textContent = bug.title;
|
|
1136
|
+
|
|
1137
|
+
const statusLabel = STATUS_GROUPS.find(([s]) => s === bug.status)?.[1] ?? bug.status;
|
|
1138
|
+
let chips = `<span class="chip id">${escapeHtml(bug.id)}</span>`;
|
|
1139
|
+
chips += `<span class="chip ${escapeHtml(bug.status)}"><span class="status-dot"></span>${escapeHtml(statusLabel)}</span>`;
|
|
1140
|
+
chips += `<span class="chip severity sev-${escapeHtml(bug.severity)}" title="Severity"><span class="sev-dot"></span>${escapeHtml(bug.severity)}</span>`;
|
|
1141
|
+
if (needsRecheck(bug)) chips += '<span class="chip known">⟳ Re-check</span>';
|
|
1142
|
+
chips += `<span class="chip date" title="Found">Found ${escapeHtml(bug.found)}</span>`;
|
|
1143
|
+
if (bug.resolved) chips += `<span class="chip date" title="Resolved">Resolved ${escapeHtml(bug.resolved)}</span>`;
|
|
1144
|
+
$('detail-chips').innerHTML = chips;
|
|
1145
|
+
|
|
1146
|
+
renderBanners(bug);
|
|
1147
|
+
renderDetails(bug);
|
|
1148
|
+
$('yaml-content').innerHTML = escapeHtml(bug.yaml).replace(/^(\s*-?\s*)([A-Za-z]+):/gm, '$1<span class="yaml-key">$2</span>:');
|
|
1149
|
+
switchTab(state.tab);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
function renderBanners(bug) {
|
|
1153
|
+
const banners = $('detail-banners');
|
|
1154
|
+
banners.innerHTML = '';
|
|
1155
|
+
|
|
1156
|
+
const passed = bug.scenarios.filter((s) => resultOf(s).kind === 'passed');
|
|
1157
|
+
if (bug.status === 'open' && passed.length) {
|
|
1158
|
+
banners.appendChild(banner('known', 'Re-check: the bug may be fixed',
|
|
1159
|
+
`${passed.map((s) => code(s.id)).join(' ')} passed in the latest regression although ${passed.length === 1 ? 'it expects' : 'they expect'} this bug. ` +
|
|
1160
|
+
`Re-check it with ${code(`/report-bug recheck ${bug.id}`)}: if the app is fixed, the bug is closed (<span class="code">status: fixed</span>) and its scenarios and tests lose the known issue.`));
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
const rows = bug.scenarios.map((s) => {
|
|
1164
|
+
const result = resultOf(s);
|
|
1165
|
+
const testCases = `../test-cases/${encodeURIComponent(s.layer)}/#scenario=${encodeURIComponent(s.id)}`;
|
|
1166
|
+
return `<div class="test-row"><a class="test-id" href="${escapeHtml(testCases)}" target="_blank" rel="noreferrer" title="Open in the Test Cases page">${escapeHtml(s.id)}</a>` +
|
|
1167
|
+
`<span class="test-name">${escapeHtml(s.name)}</span>` +
|
|
1168
|
+
`<span class="result-pill ${result.kind}" title="${escapeHtml(result.title ?? '')}">${escapeHtml(result.text)}</span>` +
|
|
1169
|
+
(s.automatedIn ? fileLink(s.automatedIn, s.specLine) : '') + '</div>';
|
|
1170
|
+
});
|
|
1171
|
+
const regressionLinks = state.resultsInfo
|
|
1172
|
+
.map((r) => `<a href="${escapeHtml(r.report)}" target="_blank" rel="noreferrer">${escapeHtml(r.label)}</a>${r.ranAt ? ` (${escapeHtml(formatDate(r.ranAt))})` : ''}`)
|
|
1173
|
+
.join(', ');
|
|
1174
|
+
banners.appendChild(banner('refs', `Tests (${bug.scenarios.length})`,
|
|
1175
|
+
rows.length
|
|
1176
|
+
? `<div class="test-list">${rows.join('')}</div>` +
|
|
1177
|
+
(regressionLinks ? `<div style="margin-top: 0.5rem">Results from the latest ${regressionLinks}.</div>` : '<div style="margin-top: 0.5rem">No regression results available here, so the latest results aren\'t shown.</div>')
|
|
1178
|
+
: 'No scenario names this bug yet. A scenario that hits it gets <span class="code">knownIssue</span> and <span class="code">bug: ' + escapeHtml(bug.id) + '</span>.'));
|
|
1179
|
+
|
|
1180
|
+
const refs = bug.ref.map((ref) => (/^(docs|src|tests|test-scenarios)\//.test(ref) ? fileLink(ref) : code(ref)));
|
|
1181
|
+
banners.appendChild(banner('refs', 'Source',
|
|
1182
|
+
`Affects: ${bug.affects.map(code).join(' ')}` +
|
|
1183
|
+
`<br>Bug file: ${fileLink(bug.file)}` +
|
|
1184
|
+
(refs.length ? `<br>Expected behaviour from: ${refs.join(' ')}` : '') +
|
|
1185
|
+
(bug.upstream ? `<br>Reported upstream: <a href="${escapeHtml(bug.upstream)}" target="_blank" rel="noreferrer">${escapeHtml(bug.upstream)}</a>` : '')));
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
function banner(kind, title, descHtml) {
|
|
1189
|
+
const el = document.createElement('div');
|
|
1190
|
+
el.className = `banner ${kind}`;
|
|
1191
|
+
el.innerHTML = `<div class="banner-left"><div class="banner-title">${escapeHtml(title)}</div><div class="banner-desc">${descHtml}</div></div>`;
|
|
1192
|
+
return el;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function formatStep(raw) {
|
|
1196
|
+
let text = escapeHtml(raw);
|
|
1197
|
+
text = text.replace(/"(.*?)"/g, '<span class="step-token-quote">"$1"</span>');
|
|
1198
|
+
text = text.replace(/\b(GET|POST|PUT|PATCH|DELETE|QUERY) (\/[^\s,;:)]*[^\s,.;:)])/g, '<span class="step-token-endpoint">$1 $2</span>');
|
|
1199
|
+
text = text.replace(/^(Open|Click|Select|Enter|Set|Search|Send|Create|Add|Remove|Log in|Register|Type|Check|Clear|Pick|Go to|Compare)\b/, '<span class="step-kw-action">$1</span>');
|
|
1200
|
+
return text;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
function renderDetails(bug) {
|
|
1204
|
+
let html = '';
|
|
1205
|
+
if (bug.description) html += `<div class="section"><h4>Description</h4><p class="prose">${escapeHtml(bug.description)}</p></div>`;
|
|
1206
|
+
html += `<div class="section"><h4>Steps to reproduce (${bug.steps.length})</h4><div class="steps-container">` +
|
|
1207
|
+
bug.steps.map((step, i) => `<div class="step-card"><div class="step-number">${i + 1}</div><div class="step-text">${formatStep(step)}</div></div>`).join('') +
|
|
1208
|
+
'</div></div>';
|
|
1209
|
+
html += '<div class="section"><div class="outcome-grid">' +
|
|
1210
|
+
`<div class="outcome-card expected"><span class="label">Expected</span><p class="prose">${formatStep(bug.expected)}</p></div>` +
|
|
1211
|
+
`<div class="outcome-card actual"><span class="label">Actual</span><p class="prose">${formatStep(bug.actual)}</p></div>` +
|
|
1212
|
+
'</div></div>';
|
|
1213
|
+
if (bug.evidence) html += `<div class="section"><h4>Evidence</h4><div class="yaml-container"><pre class="yaml-pre wrap">${escapeHtml(bug.evidence)}</pre></div></div>`;
|
|
1214
|
+
$('tab-details').innerHTML = html;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
function switchTab(tab) {
|
|
1218
|
+
state.tab = tab;
|
|
1219
|
+
document.querySelectorAll('.detail-tab').forEach((t) => t.classList.toggle('active', t.dataset.tab === tab));
|
|
1220
|
+
$('tab-details').hidden = tab !== 'details';
|
|
1221
|
+
$('tab-yaml').hidden = tab !== 'yaml';
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
function copy(button, text) {
|
|
1225
|
+
const done = () => {
|
|
1226
|
+
button.classList.add('copied');
|
|
1227
|
+
button.textContent = 'Copied';
|
|
1228
|
+
setTimeout(() => {
|
|
1229
|
+
button.classList.remove('copied');
|
|
1230
|
+
button.textContent = button.dataset.label;
|
|
1231
|
+
}, 1500);
|
|
1232
|
+
};
|
|
1233
|
+
if (navigator.clipboard) navigator.clipboard.writeText(text).then(done, () => {});
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
init();
|
|
1237
|
+
})();
|
|
1238
|
+
</script>
|
|
1239
|
+
</body>
|
|
1240
|
+
</html>
|