emergency: 911 demoted to very last resort — page now leads with event-help share card; emergency-services number moved to collapsed 'If none of the above is working' disclosure at the very bottom, no alert styling
Some checks failed
ci / check (push) Has been cancelled
Some checks failed
ci / check (push) Has been cancelled
This commit is contained in:
parent
5b5d1857c3
commit
1c49b8a4a8
3 changed files with 85 additions and 17 deletions
|
|
@ -189,6 +189,27 @@ describe("emergency view", () => {
|
|||
expect(view.textContent).toContain("isn't on this device yet");
|
||||
});
|
||||
|
||||
it("emergency number is last-resort: bottom of page, collapsed, after procedures", () => {
|
||||
const view = createEmergencyView(undefined, NOW);
|
||||
const last = view.querySelector(".emergency-last-resort");
|
||||
expect(last).toBeTruthy();
|
||||
// collapsed by default — the number is not presented until asked
|
||||
expect(last?.hasAttribute("open")).toBe(false);
|
||||
// it is the very last element of the view
|
||||
expect(view.lastElementChild).toBe(last);
|
||||
// ...it comes after the procedures section...
|
||||
const idx = (selector: string): number => {
|
||||
const el = view.querySelector(selector);
|
||||
return el ? [...view.children].indexOf(el) : -1;
|
||||
};
|
||||
expect(idx(".emergency-last-resort")).toBeGreaterThan(
|
||||
idx('[aria-labelledby="emergency-procedures-heading"]'),
|
||||
);
|
||||
// ...and the page leads with event help, not the dial number
|
||||
expect(idx(".emergency-share-card")).toBeGreaterThanOrEqual(1);
|
||||
expect(view.querySelector(".emergency-share-card")?.textContent).toContain("event help");
|
||||
});
|
||||
|
||||
it("dataset tier renders locations with map handoffs and notices", () => {
|
||||
const view = createEmergencyView(dataset(), NOW);
|
||||
expect(view.textContent).toContain("FESTIVAL DATA v3");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue