Files
ThreadNet-Web/apps/web/playwright/e2e/retention/retention-global.spec.ts
T
Michael TelatynskiandGitHub 42253a7ae5 Make apps/web/playwright comply with strict mode (#34403)
* Make apps/web/playwright comply with strict mode

Otherwise it sometimes fails to compile matrix-js-sdk as strict mode & noImplicitAny both impact how overloads are asserted

* Iterate
2026-07-30 09:07:03 +00:00

54 lines
1.6 KiB
TypeScript

/*
* Copyright 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import { rejectToastIfExists } from "@element-hq/element-web-playwright-common";
import { isDendrite } from "../../plugins/homeserver/dendrite";
import { checkRetentionInRoom } from "./utils";
import { test } from "../../element-web-test";
const ONE_MINUTE_STR = "60s";
test.use({
synapseConfig: {
retention: {
enabled: true,
default_policy: {
max_lifetime: ONE_MINUTE_STR,
},
allowed_lifetime_min: ONE_MINUTE_STR,
allowed_lifetime_max: ONE_MINUTE_STR,
},
experimental_features: {
msc1763_enabled: true,
},
},
});
test.describe("global retention rules", () => {
test.skip(isDendrite, "dendrite does not support retention");
test.use({
displayName: "Tom",
botCreateOpts: {
displayName: "Bob",
},
labsFlags: ["feature_retention"],
});
test.beforeEach(async ({ app, homeserver, page, user }) => {
await rejectToastIfExists(page, "Verify this device");
await rejectToastIfExists(page, "Notifications");
await page.clock.install();
});
test("should apply", async ({ app, bot, page }) => {
const roomId = await app.client.createRoom({
name: "Test",
invite: [bot.credentials!.userId],
});
await checkRetentionInRoom({ app, bot, page }, roomId);
});
});