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
This commit is contained in:
Michael Telatynski
2026-07-30 09:07:03 +00:00
committed by GitHub
parent 4a18eac927
commit 42253a7ae5
84 changed files with 413 additions and 388 deletions
@@ -26,6 +26,7 @@ test.describe("Encryption tab", () => {
test.beforeEach(async ({ page, homeserver, credentials }) => {
// The bot bootstraps cross-signing, creates a key backup and sets up a recovery key
const botCredentials = { ...credentials };
// @ts-expect-error
delete botCredentials.accessToken; // use a new login for the bot
const res = await createBot(page, homeserver, botCredentials);
recoveryKey = res.recoveryKey;
@@ -71,7 +72,7 @@ test.describe("Encryption tab", () => {
"should prompt to enter the recovery key when the secrets are not cached locally",
{ tag: "@screenshot" },
async ({ page, app, util }) => {
await verifySession(app, recoveryKey.encodedPrivateKey);
await verifySession(app, recoveryKey.encodedPrivateKey!);
// We need to delete the cached secrets
await deleteCachedSecrets(page);
@@ -104,7 +105,7 @@ test.describe("Encryption tab", () => {
app,
util,
}) => {
await verifySession(app, recoveryKey.encodedPrivateKey);
await verifySession(app, recoveryKey.encodedPrivateKey!);
// We need to delete the cached secrets
await deleteCachedSecrets(page);
@@ -120,7 +121,7 @@ test.describe("Encryption tab", () => {
});
test("should warn before turning off key storage", { tag: "@screenshot" }, async ({ page, app, util }) => {
await verifySession(app, recoveryKey.encodedPrivateKey);
await verifySession(app, recoveryKey.encodedPrivateKey!);
await util.openEncryptionTab();
await page.getByRole("switch", { name: "Allow key storage" }).click();