test: pin the Coach layout clock to midday and read copied text without a tag-stripping replace

The panel groups conversations by the browser's local day, so the e2e
fixture's "an hour ago" landed in yesterday when CI ran just after
midnight. The turn-steps test reads its markup by splitting rather than
with a replace CodeQL reads as an incomplete sanitiser.
This commit is contained in:
Marc-André Bombeck committed 2026-10-06 00:30:13 +02:00
1 parent 68720418e3
commit ef9dc1ddc6
2 files changed
+10 -6

No files matched your search

@@ -363,12 +363,12 @@ describe("a step row copied out of the list", () => {
"de",
);
// What a selection copies: every text node except the unselectable ones.
// Reads this test's own static markup; not a sanitiser for input.
const copied = html
.replace(
/<span[^>]*class="[^"]*\bselect-none\b[^"]*"[^>]*>[^<]*<\/span>/g,
"",
)
.replace(/<[^>]+>/g, "")
.split(/<span[^>]*class="[^"]*\bselect-none\b[^"]*"[^>]*>[^<]*<\/span>/)
.join("")
.split(/<[^>]*>/)
.join("")
.replace(/\s+/g, " ")
.trim();
expect(copied).toBe("Gewicht · letzte 90 Tage");