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:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user