feat(examples): polish workout phone UI
Give the workout exemplar a durable gym-floor command-slate direction, serve focused CSS, keep the first viewport centered on one action, and extend the HTTP E2E to verify stylesheet delivery. req: examples/001 req: local/001 req: local/003 req: host/002
This commit is contained in:
@@ -54,10 +54,19 @@ fn workout_is_e2e_working_over_http() {
|
||||
assert!(home.text().contains("Now-first Workout Copilot"));
|
||||
assert!(home.text().contains("Private event log"));
|
||||
assert!(home.text().contains("Replay export"));
|
||||
assert!(home
|
||||
.text()
|
||||
.contains("<link rel=\"stylesheet\" href=\"/workout.css\""));
|
||||
assert!(home
|
||||
.text()
|
||||
.contains(&format!("<script src=\"{}\" defer", runtime_js_path())));
|
||||
|
||||
let css = get(&server, "/workout.css");
|
||||
assert_eq!(css.status, 200);
|
||||
assert!(css.header("content-type").contains("text/css"));
|
||||
assert!(css.text().contains(".command-slate"));
|
||||
assert!(css.text().contains("min-height: var(--tap)"));
|
||||
|
||||
let runtime = get(&server, runtime_js_path());
|
||||
assert_eq!(runtime.status, 200);
|
||||
assert!(runtime.header("content-type").contains("javascript"));
|
||||
@@ -76,7 +85,7 @@ fn workout_is_e2e_working_over_http() {
|
||||
let replayed = post(
|
||||
&server,
|
||||
"/",
|
||||
&handle_body_from_html(&home.text(), "Replay exported log"),
|
||||
&handle_body_from_html(&home.text(), "Replay export"),
|
||||
);
|
||||
assert_effect_response(&replayed);
|
||||
let replayed_batch = replayed.effects();
|
||||
|
||||
Reference in New Issue
Block a user