-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfrontend_runtime_smoke.sh
More file actions
386 lines (308 loc) · 18.6 KB
/
Copy pathfrontend_runtime_smoke.sh
File metadata and controls
386 lines (308 loc) · 18.6 KB
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
#!/usr/bin/env bash
set -euo pipefail
PORT="${FRONTEND_SMOKE_PORT:-3001}"
BASE_URL="http://127.0.0.1:${PORT}"
SERVER_LOG="${FRONTEND_SMOKE_LOG:-/tmp/deploymate-frontend-runtime-smoke.log}"
DIST_DIR="${FRONTEND_SMOKE_DIST_DIR:-.next-smoke-${PORT}}"
APP_HTML="$(mktemp)"
DETAIL_HTML="$(mktemp)"
FRESH_DETAIL_HTML="$(mktemp)"
FAILED_DETAIL_HTML="$(mktemp)"
HEALTHY_WORKFLOW_HTML="$(mktemp)"
FAILED_WORKFLOW_HTML="$(mktemp)"
INTERNAL_DETAIL_HTML="$(mktemp)"
INTERNAL_WORKFLOW_HTML="$(mktemp)"
TEMPLATE_SUCCESS_WORKFLOW_HTML="$(mktemp)"
CREATE_SUCCESS_WORKFLOW_HTML="$(mktemp)"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
source "${SCRIPT_DIR}/lib/project_automation.sh"
source "${SCRIPT_DIR}/lib/frontend_smoke_checks.sh"
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
RUNTIME_SCENARIO_PORT_BASE="${FRONTEND_SMOKE_RUNTIME_SCENARIO_PORT_BASE:-$((PORT + 20))}"
cleanup() {
if [ "${FRONTEND_SMOKE_REUSE_SERVER:-0}" != "1" ]; then
stop_frontend_smoke_server
fi
rm -f "$APP_HTML" "$DETAIL_HTML" "$FRESH_DETAIL_HTML" "$FAILED_DETAIL_HTML" "$HEALTHY_WORKFLOW_HTML" "$FAILED_WORKFLOW_HTML" "$INTERNAL_DETAIL_HTML" "$INTERNAL_WORKFLOW_HTML" "$TEMPLATE_SUCCESS_WORKFLOW_HTML" "$CREATE_SUCCESS_WORKFLOW_HTML"
}
trap cleanup EXIT
if [ "${FRONTEND_SMOKE_REUSE_SERVER:-0}" != "1" ]; then
start_frontend_smoke_server
fi
wait_for_frontend_smoke_url "$(automation_frontend_ready_path)"
frontend_smoke_assert_checks "frontend-runtime-smoke" "$BASE_URL" automation_smoke_runtime_checks
curl -sS "${BASE_URL}/deployments/smoke-deployment" > "$DETAIL_HTML"
if ! grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>Open running app<' "$DETAIL_HTML"; then
echo "[frontend-runtime-smoke] healthy runtime detail does not make opening the app the main next step" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-detail-share-order-title"[^>]*>Share this runtime in order<' "$DETAIL_HTML"; then
echo "[frontend-runtime-smoke] runtime detail lost the ordered share/handoff guidance" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-detail-evidence-order-title"[^>]*>Read evidence in order<' "$DETAIL_HTML"; then
echo "[frontend-runtime-smoke] runtime detail lost the ordered evidence guidance" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>Prepare rollout change<' "$DETAIL_HTML"; then
echo "[frontend-runtime-smoke] healthy runtime detail still makes rollout change the main next step" >&2
exit 1
fi
curl -sS "${BASE_URL}/deployments/smoke-deployment?source=workflow-success" > "$FRESH_DETAIL_HTML"
if ! grep -Eq 'data-testid="runtime-detail-fresh-rollout-banner"' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail lost the workflow-success bridge banner" >&2
exit 1
fi
if ! grep -Eq 'Opened from deployment workflow: this rollout is still fresh\.' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail lost the explicit workflow-to-detail bridge copy" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-detail-fresh-rollout-checklist-card"' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail lost the first-review checklist card" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-detail-fresh-rollout-checklist-title"[^>]*>Verify this rollout before you move on<' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail lost the explicit verification checklist title" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-detail-main-next-step-action-secondary"[^>]*>Review runtime overview<' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail does not keep review-first secondary guidance" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-detail-main-next-step-action-secondary"[^>]*>Prepare rollout change<' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail still exposes prepare-change as the immediate secondary path" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-detail-tab-change"' "$FRESH_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] fresh rollout detail still exposes the change tab before verification" >&2
exit 1
fi
curl -sS "${BASE_URL}/app/deployment-workflow" > "$APP_HTML"
if grep -Eq 'data-testid="runtime-deployment-delete-button-review-worker"' "$APP_HTML"; then
echo "[frontend-runtime-smoke] failed runtime queue exposes delete before detail review" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-review-worker"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-review-worker")' "$APP_HTML"; then
echo "[frontend-runtime-smoke] failed runtime queue does not make review the primary card action" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-deployment-details-link-review-worker"[^>]*>Review runtime issues<' "$APP_HTML"; then
echo "[frontend-runtime-smoke] failed runtime queue lost the explicit runtime review action label" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-open-app-link-smoke-deployment"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-open-app-link-smoke-deployment")' "$APP_HTML"; then
echo "[frontend-runtime-smoke] healthy secondary runtime queue card does not make opening the app primary" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-smoke-deployment"[^>]*class="[^"]*secondaryButton[^"]*")|(<a[^>]*class="[^"]*secondaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-smoke-deployment")' "$APP_HTML"; then
echo "[frontend-runtime-smoke] healthy secondary runtime queue card does not keep details secondary" >&2
exit 1
fi
curl -sS "${BASE_URL}/deployments/review-worker" > "$FAILED_DETAIL_HTML"
if ! grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>Review runtime issues<' "$FAILED_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] failed runtime detail is not review-first" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>(Prepare rollout change|Open running app)<' "$FAILED_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] failed runtime detail exposes a non-review main next step" >&2
exit 1
fi
curl -sS "${BASE_URL}/deployments/internal-runtime" > "$INTERNAL_DETAIL_HTML"
if ! grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>Review stable runtime<' "$INTERNAL_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] internal-only runtime detail does not make stable review the main next step" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-detail-main-next-step-action-focus"[^>]*>(Prepare rollout change|Open running app)<' "$INTERNAL_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] internal-only runtime detail exposes a non-review main next step" >&2
exit 1
fi
if ! grep -Eq 'No public URL assigned yet' "$INTERNAL_DETAIL_HTML"; then
echo "[frontend-runtime-smoke] internal-only runtime detail lost the private-endpoint explanation" >&2
exit 1
fi
(
set -euo pipefail
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
export PORT="${FRONTEND_SMOKE_HEALTHY_RUNTIME_PORT:-${RUNTIME_SCENARIO_PORT_BASE}}"
export BASE_URL="http://127.0.0.1:${PORT}"
export SERVER_LOG="${FRONTEND_SMOKE_HEALTHY_RUNTIME_LOG:-/tmp/deploymate-frontend-healthy-runtime-smoke.log}"
export DIST_DIR="${FRONTEND_SMOKE_HEALTHY_RUNTIME_DIST_DIR:-.next-smoke-healthy-runtime-${PORT}}"
export FRONTEND_SMOKE_PORT="$PORT"
export FRONTEND_SMOKE_LOG="$SERVER_LOG"
export FRONTEND_SMOKE_DIST_DIR="$DIST_DIR"
export FRONTEND_SMOKE_REUSE_SERVER=0
export NEXT_PUBLIC_SMOKE_DEPLOYMENT_WORKFLOW_SCENARIO=healthy-live-review
cleanup_healthy_runtime() {
stop_frontend_smoke_server
}
trap cleanup_healthy_runtime EXIT
start_frontend_smoke_server
wait_for_frontend_smoke_url "/app/deployment-workflow"
curl -sS "${BASE_URL}/app/deployment-workflow" > "$HEALTHY_WORKFLOW_HTML"
if ! grep -Eq 'data-testid="runtime-deployment-card-smoke-deployment"' "$HEALTHY_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] healthy workflow scenario lost the smoke deployment card" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-open-app-link-smoke-deployment"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-open-app-link-smoke-deployment")' "$HEALTHY_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] healthy workflow does not make opening the app the primary queue action" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-smoke-deployment"[^>]*class="[^"]*secondaryButton[^"]*")|(<a[^>]*class="[^"]*secondaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-smoke-deployment")' "$HEALTHY_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] healthy workflow does not keep detail review secondary after open app" >&2
exit 1
fi
)
(
set -euo pipefail
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
export PORT="${FRONTEND_SMOKE_FAILED_RUNTIME_PORT:-$((RUNTIME_SCENARIO_PORT_BASE + 1))}"
export BASE_URL="http://127.0.0.1:${PORT}"
export SERVER_LOG="${FRONTEND_SMOKE_FAILED_RUNTIME_LOG:-/tmp/deploymate-frontend-failed-runtime-smoke.log}"
export DIST_DIR="${FRONTEND_SMOKE_FAILED_RUNTIME_DIST_DIR:-.next-smoke-failed-runtime-${PORT}}"
export FRONTEND_SMOKE_PORT="$PORT"
export FRONTEND_SMOKE_LOG="$SERVER_LOG"
export FRONTEND_SMOKE_DIST_DIR="$DIST_DIR"
export FRONTEND_SMOKE_REUSE_SERVER=0
export NEXT_PUBLIC_SMOKE_DEPLOYMENT_WORKFLOW_SCENARIO=failed-live-review
cleanup_failed_runtime() {
stop_frontend_smoke_server
}
trap cleanup_failed_runtime EXIT
start_frontend_smoke_server
wait_for_frontend_smoke_url "/app/deployment-workflow"
curl -sS "${BASE_URL}/app/deployment-workflow" > "$FAILED_WORKFLOW_HTML"
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-review-worker-shadow"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-review-worker-shadow")' "$FAILED_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] failed secondary runtime queue card does not make review the primary action" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-deployment-details-link-review-worker-shadow"[^>]*>Review runtime issues<' "$FAILED_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] failed secondary runtime queue card lost the explicit review action label" >&2
exit 1
fi
)
(
set -euo pipefail
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
export PORT="${FRONTEND_SMOKE_INTERNAL_RUNTIME_PORT:-$((RUNTIME_SCENARIO_PORT_BASE + 2))}"
export BASE_URL="http://127.0.0.1:${PORT}"
export SERVER_LOG="${FRONTEND_SMOKE_INTERNAL_RUNTIME_LOG:-/tmp/deploymate-frontend-internal-runtime-smoke.log}"
export DIST_DIR="${FRONTEND_SMOKE_INTERNAL_RUNTIME_DIST_DIR:-.next-smoke-internal-runtime-${PORT}}"
export FRONTEND_SMOKE_PORT="$PORT"
export FRONTEND_SMOKE_LOG="$SERVER_LOG"
export FRONTEND_SMOKE_DIST_DIR="$DIST_DIR"
export FRONTEND_SMOKE_REUSE_SERVER=0
export NEXT_PUBLIC_SMOKE_DEPLOYMENT_WORKFLOW_SCENARIO=internal-only-live-review
cleanup_internal_runtime() {
stop_frontend_smoke_server
}
trap cleanup_internal_runtime EXIT
start_frontend_smoke_server
wait_for_frontend_smoke_url "/app/deployment-workflow"
curl -sS "${BASE_URL}/app/deployment-workflow" > "$INTERNAL_WORKFLOW_HTML"
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-internal-runtime"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-internal-runtime")' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only focus runtime queue card does not make stable review primary" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-deployment-details-link-internal-runtime"[^>]*>Review stable runtime<' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only focus runtime queue card lost the stable review label" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-deployment-open-app-link-internal-runtime"' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only focus runtime queue card should not expose open app" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="runtime-deployment-details-link-internal-runtime-shadow"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="runtime-deployment-details-link-internal-runtime-shadow")' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only secondary runtime queue card does not make stable review primary" >&2
exit 1
fi
if ! grep -Eq 'data-testid="runtime-deployment-details-link-internal-runtime-shadow"[^>]*>Review stable runtime<' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only secondary runtime queue card lost the stable review label" >&2
exit 1
fi
if grep -Eq 'data-testid="runtime-deployment-open-app-link-internal-runtime-shadow"' "$INTERNAL_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] internal-only secondary runtime queue card should not expose open app" >&2
exit 1
fi
)
(
set -euo pipefail
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
export PORT="${FRONTEND_SMOKE_TEMPLATE_SUCCESS_PORT:-$((RUNTIME_SCENARIO_PORT_BASE + 3))}"
export BASE_URL="http://127.0.0.1:${PORT}"
export SERVER_LOG="${FRONTEND_SMOKE_TEMPLATE_SUCCESS_LOG:-/tmp/deploymate-frontend-template-success-smoke.log}"
export DIST_DIR="${FRONTEND_SMOKE_TEMPLATE_SUCCESS_DIST_DIR:-.next-smoke-template-success-${PORT}}"
export FRONTEND_SMOKE_PORT="$PORT"
export FRONTEND_SMOKE_LOG="$SERVER_LOG"
export FRONTEND_SMOKE_DIST_DIR="$DIST_DIR"
export FRONTEND_SMOKE_REUSE_SERVER=0
export NEXT_PUBLIC_SMOKE_DEPLOYMENT_WORKFLOW_SCENARIO=template-deploy-success
cleanup_template_success() {
stop_frontend_smoke_server
}
trap cleanup_template_success EXIT
start_frontend_smoke_server
wait_for_frontend_smoke_url "/app/deployment-workflow"
curl -sS "${BASE_URL}/app/deployment-workflow" > "$TEMPLATE_SUCCESS_WORKFLOW_HTML"
if ! grep -Eq 'data-testid="template-deploy-success-banner"' "$TEMPLATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] template deploy success scenario lost the success banner" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="template-deploy-success-open-detail-link"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="template-deploy-success-open-detail-link")' "$TEMPLATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] template deploy success does not make runtime detail the primary action" >&2
exit 1
fi
if ! grep -Eq 'data-testid="template-deploy-success-open-detail-link"[^>]*>Open runtime detail<' "$TEMPLATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] template deploy success lost the explicit runtime-detail action label" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="template-deploy-success-open-detail-link"[^>]*href="/deployments/template-success-deployment\?source=workflow-success")|(<a[^>]*href="/deployments/template-success-deployment\?source=workflow-success"[^>]*data-testid="template-deploy-success-open-detail-link")' "$TEMPLATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] template deploy success detail link lost the workflow-success context" >&2
exit 1
fi
if ! grep -Eq '(<button[^>]*data-testid="template-deploy-success-open-live-button"[^>]*class="[^"]*secondaryButton[^"]*")|(<button[^>]*class="[^"]*secondaryButton[^"]*"[^>]*data-testid="template-deploy-success-open-live-button")' "$TEMPLATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] template deploy success does not keep live queue review secondary" >&2
exit 1
fi
)
(
set -euo pipefail
source "${SCRIPT_DIR}/frontend_smoke_shared.sh"
export PORT="${FRONTEND_SMOKE_CREATE_SUCCESS_PORT:-$((RUNTIME_SCENARIO_PORT_BASE + 4))}"
export BASE_URL="http://127.0.0.1:${PORT}"
export SERVER_LOG="${FRONTEND_SMOKE_CREATE_SUCCESS_LOG:-/tmp/deploymate-frontend-create-success-smoke.log}"
export DIST_DIR="${FRONTEND_SMOKE_CREATE_SUCCESS_DIST_DIR:-.next-smoke-create-success-${PORT}}"
export FRONTEND_SMOKE_PORT="$PORT"
export FRONTEND_SMOKE_LOG="$SERVER_LOG"
export FRONTEND_SMOKE_DIST_DIR="$DIST_DIR"
export FRONTEND_SMOKE_REUSE_SERVER=0
export NEXT_PUBLIC_SMOKE_DEPLOYMENT_WORKFLOW_SCENARIO=create-deploy-success
cleanup_create_success() {
stop_frontend_smoke_server
}
trap cleanup_create_success EXIT
start_frontend_smoke_server
wait_for_frontend_smoke_url "/app/deployment-workflow"
curl -sS "${BASE_URL}/app/deployment-workflow" > "$CREATE_SUCCESS_WORKFLOW_HTML"
if ! grep -Eq 'data-testid="create-deployment-success-banner"' "$CREATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] create success scenario lost the success banner" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="create-deployment-success-open-detail-link"[^>]*class="[^"]*landingButton primaryButton[^"]*")|(<a[^>]*class="[^"]*landingButton primaryButton[^"]*"[^>]*data-testid="create-deployment-success-open-detail-link")' "$CREATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] create success does not make runtime detail the primary action" >&2
exit 1
fi
if ! grep -Eq '(<a[^>]*data-testid="create-deployment-success-open-detail-link"[^>]*href="/deployments/fresh-success-deployment\?source=workflow-success")|(<a[^>]*href="/deployments/fresh-success-deployment\?source=workflow-success"[^>]*data-testid="create-deployment-success-open-detail-link")' "$CREATE_SUCCESS_WORKFLOW_HTML"; then
echo "[frontend-runtime-smoke] create success detail link lost the workflow-success context" >&2
exit 1
fi
)
echo "[frontend-runtime-smoke] app runtime surface rendered"
echo "[frontend-runtime-smoke] deployment detail surface rendered"
echo "[frontend-runtime-smoke] internal-only runtime detail rendered"
echo "[frontend-runtime-smoke] healthy workflow happy path rendered"
echo "[frontend-runtime-smoke] failed secondary workflow review path rendered"
echo "[frontend-runtime-smoke] internal-only workflow review path rendered"
echo "[frontend-runtime-smoke] template deploy success path rendered"
echo "[frontend-runtime-smoke] create deploy success path rendered"
echo "[frontend-runtime-smoke] complete"