Skip to content

Commit 3d816b4

Browse files
Add QA smoke test scripts to package.json
- Introduced new npm scripts for QA smoke testing, including 'dev:qa', 'dev:qa:cached', 'qa:smoke', and 'qa:smoke:cached'. - Updated the 'watch' script to maintain existing functionality while adding new testing capabilities.
1 parent 0ff6537 commit 3d816b4

4 files changed

Lines changed: 630 additions & 1 deletion

File tree

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
"start": "npm run build && node dist/app.js",
1616
"start:cached": "node dist/app.js",
1717
"build": "tsc",
18-
"watch": "tsc -w"
18+
"watch": "tsc -w",
19+
"dev:qa": "npm run qa:smoke",
20+
"dev:qa:cached": "npm run qa:smoke:cached",
21+
"qa:smoke": "npm run build && node scripts/tests/devQaSmokeWorkflow.js",
22+
"qa:smoke:cached": "node scripts/tests/devQaSmokeWorkflow.js"
1923
},
2024
"dependencies": {
2125
"@fortawesome/fontawesome-free": "^6.7.2",

pages/browserSmoke.html

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Browser Smoke Tests</title>
7+
<style>
8+
:root {
9+
color-scheme: light dark;
10+
}
11+
body {
12+
margin: 0;
13+
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
14+
background: #0f172a;
15+
color: #e2e8f0;
16+
}
17+
.layout {
18+
display: grid;
19+
grid-template-columns: 380px 1fr;
20+
min-height: 100vh;
21+
}
22+
.panel {
23+
border-right: 1px solid #334155;
24+
padding: 16px;
25+
background: #111827;
26+
}
27+
.panel h1 {
28+
margin: 0 0 8px;
29+
font-size: 1.1rem;
30+
}
31+
.panel p {
32+
margin: 0 0 12px;
33+
color: #94a3b8;
34+
font-size: 0.9rem;
35+
line-height: 1.4;
36+
}
37+
.row {
38+
display: flex;
39+
gap: 8px;
40+
align-items: center;
41+
margin-bottom: 10px;
42+
}
43+
.btn {
44+
border: 1px solid #334155;
45+
background: #1f2937;
46+
color: #e2e8f0;
47+
border-radius: 8px;
48+
padding: 8px 12px;
49+
cursor: pointer;
50+
font-size: 0.9rem;
51+
}
52+
.btn:hover {
53+
background: #334155;
54+
}
55+
.btn[disabled] {
56+
opacity: 0.6;
57+
cursor: not-allowed;
58+
}
59+
label {
60+
font-size: 0.9rem;
61+
color: #cbd5e1;
62+
}
63+
input[type="checkbox"] {
64+
transform: translateY(1px);
65+
}
66+
.summary {
67+
margin: 12px 0;
68+
padding: 10px;
69+
border: 1px solid #334155;
70+
border-radius: 8px;
71+
background: #0b1220;
72+
font-size: 0.9rem;
73+
}
74+
.results {
75+
margin: 0;
76+
padding: 0;
77+
list-style: none;
78+
display: grid;
79+
gap: 8px;
80+
}
81+
.result {
82+
border: 1px solid #334155;
83+
border-radius: 8px;
84+
padding: 8px 10px;
85+
background: #0b1220;
86+
}
87+
.result.pass {
88+
border-color: #166534;
89+
}
90+
.result.fail {
91+
border-color: #7f1d1d;
92+
}
93+
.result.skip {
94+
border-color: #854d0e;
95+
}
96+
.name {
97+
font-size: 0.9rem;
98+
font-weight: 600;
99+
}
100+
.meta {
101+
font-size: 0.8rem;
102+
color: #94a3b8;
103+
margin-top: 4px;
104+
white-space: pre-wrap;
105+
}
106+
.workspace {
107+
background: #0b1220;
108+
}
109+
#smoke-frame {
110+
width: 100%;
111+
min-height: 100vh;
112+
border: 0;
113+
background: #fff;
114+
}
115+
</style>
116+
</head>
117+
<body>
118+
<div class="layout">
119+
<section class="panel">
120+
<h1>Browser Smoke Tests</h1>
121+
<p>Runs app smoke checks directly in a real browser iframe. No Playwright required.</p>
122+
<div class="row">
123+
<button id="run-all" class="btn" type="button">Run All Tests</button>
124+
<button id="clear-results" class="btn" type="button">Clear</button>
125+
</div>
126+
<div class="row">
127+
<label>
128+
<input id="include-replay" type="checkbox" checked />
129+
Include replay-aware checks
130+
</label>
131+
</div>
132+
<div id="summary" class="summary">Idle</div>
133+
<ul id="results" class="results"></ul>
134+
</section>
135+
<section class="workspace">
136+
<iframe id="smoke-frame" title="Smoke Test Sandbox" src="about:blank"></iframe>
137+
</section>
138+
</div>
139+
<script src="/scripts/tests/browserSmokeRunner.js"></script>
140+
</body>
141+
</html>

0 commit comments

Comments
 (0)