Update e2e tests and header

Don't add normalisation of widget headers either
This commit is contained in:
David Langley
2026-03-13 15:43:25 +00:00
parent 6aa454c646
commit 5d091e91c3
10 changed files with 69 additions and 28 deletions
@@ -0,0 +1,35 @@
/*
Copyright 2026 Element Creations Ltd.
Copyright 2023 Nordeck IT + Consulting GmbH
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
import { describe, expect, it } from "vitest";
import { matchPattern } from "../src/utils/matchPattern";
describe("matchPattern", () => {
it.each([
"*",
"org.matrix.msc2762.receive.*",
"org.matrix.msc2762.receive.state_event:*",
"org.matrix.msc2762.receive.state_event:m.custom*",
"org.matrix.msc2762.receive.state_event:m.custom#*",
"org.matrix.msc2762.receive.state_event:m.custom#state_key",
"org.matrix.msc2762.receive.state_event:m.custom#state_key*",
])("matches %s", (pattern) => {
expect(matchPattern("org.matrix.msc2762.receive.state_event:m.custom#state_key", pattern)).toBe(true);
});
it.each([
"org.matrix.msc2762.receive.state_event:",
"org.matrix.msc2762.receive.state_event:m.custom",
"org.matrix.msc2762.receive.state_event:m.custom#other_key",
"org.matrix.msc2762.receive.*:m.custom#state_key",
"org.matrix.msc2762.receive.room_event:m.custom",
])("does not match %s", (pattern) => {
expect(matchPattern("org.matrix.msc2762.receive.state_event:m.custom#state_key", pattern)).toBe(false);
});
});