forge
Explore
Log in

Don't you dare go Hollow

the Connection card's test stops racing the clock: the last-event and last-pass ages were asserted as exactly 0s, and any second boundary crossed between the health stamp and the page render flipped one to 1s — the test now asserts the honest contract, an age line that no longer reads never, whatever number the moment produced; eight consecutive runs green where it failed every fourth before

Browse files at this commit

23a92ca31391a6bf9def3f279579c03be456e64cAhmet Kaan GümüşParent: ad66f40
crates/in-web/tests/http.rsmodified+10 -2
@@ -5325,8 +5325,16 @@ async fn connection_card_shows_issuer_client_id_and_stream_state() {
5325 let body = page.text();5325 let body = page.text();
5326 assert!(body.contains("Connected"), "no green wording: {body}");5326 assert!(body.contains("Connected"), "no green wording: {body}");
5327 assert!(body.contains("status-dot-done"), "no green dot: {body}");5327 assert!(body.contains("status-dot-done"), "no green dot: {body}");
5328- assert!(body.contains("Last event · 0s"), "no event age: {body}");5328+ // An age, not never — the number itself races the second boundary
5329- assert!(body.contains("Last pass · 0s"), "no pass age: {body}");5329+ // between the stamp and this render, so it is not asserted.
5330+ assert!(
5331+ body.contains("Last event · ") && !body.contains("Last event · never"),
5332+ "no event age: {body}"
5333+ );
5334+ assert!(
5335+ body.contains("Last pass · ") && !body.contains("Last pass · never"),
5336+ "no pass age: {body}"
5337+ );
5330 // The stream ends: amber again, no event line retraction needed — the5338 // The stream ends: amber again, no event line retraction needed — the
5331 // last event stays but the wording names the truth.5339 // last event stays but the wording names the truth.
5332 app.health.reconnecting();5340 app.health.reconnecting();