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
@@ -80,8 +80,12 @@ test.describe("Lazy Loading", () => {
async function checkPaginatedDisplayNames(app: ElementAppPage, charlies: Bot[]) {
await app.timeline.scrollToTop();
for (const charly of charlies) {
await expect(await app.timeline.findEventTile(charly.credentials.displayName, charlyMsg1)).toBeAttached();
await expect(await app.timeline.findEventTile(charly.credentials.displayName, charlyMsg2)).toBeAttached();
await expect(
(await app.timeline.findEventTile(charly.credentials!.displayName!, charlyMsg1))!,
).toBeAttached();
await expect(
(await app.timeline.findEventTile(charly.credentials!.displayName!, charlyMsg2))!,
).toBeAttached();
}
}
@@ -99,13 +103,13 @@ test.describe("Lazy Loading", () => {
await expect(getMemberInMemberlist(page, "Alice")).toBeAttached();
await expect(getMemberInMemberlist(page, "Bob")).toBeAttached();
for (const charly of charlies) {
await expect(getMemberInMemberlist(page, charly.credentials.displayName)).toBeAttached();
await expect(getMemberInMemberlist(page, charly.credentials!.displayName!)).toBeAttached();
}
}
async function checkMemberListLacksCharlies(page: Page, charlies: Bot[]) {
for (const charly of charlies) {
await expect(getMemberInMemberlist(page, charly.credentials.displayName)).not.toBeAttached();
await expect(getMemberInMemberlist(page, charly.credentials!.displayName!)).not.toBeAttached();
}
}