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
@@ -41,8 +41,8 @@ test.describe("migration", { tag: "@no-webkit" }, function () {
// When the progress bar first loads, it should have a high max (one per megolm session to import), and
// a relatively low value.
const progressBar = page.getByRole("progressbar");
const initialProgress = parseFloat(await progressBar.getAttribute("value"));
const initialMax = parseFloat(await progressBar.getAttribute("max"));
const initialProgress = parseFloat((await progressBar.getAttribute("value"))!);
const initialMax = parseFloat((await progressBar.getAttribute("max"))!);
expect(initialMax).toBeGreaterThan(4000);
expect(initialProgress).toBeGreaterThanOrEqual(0);
expect(initialProgress).toBeLessThanOrEqual(500);
@@ -53,8 +53,8 @@ test.describe("migration", { tag: "@no-webkit" }, function () {
async () => {
const progressBar = page.getByRole("progressbar");
return (
(parseFloat(await progressBar.getAttribute("value")) * 100.0) /
parseFloat(await progressBar.getAttribute("max"))
(parseFloat((await progressBar.getAttribute("value"))!) * 100.0) /
parseFloat((await progressBar.getAttribute("max"))!)
);
},
{ timeout: 60000 },