chore: make less test less flaky (#3417)
This commit is contained in:
@@ -2347,19 +2347,25 @@ Deno.test({
|
|||||||
assertMetaContent(doc, "og:foo", "og value foo");
|
assertMetaContent(doc, "og:foo", "og value foo");
|
||||||
assertMetaContent(doc, "og:bar", "og value bar");
|
assertMetaContent(doc, "og:bar", "og value bar");
|
||||||
|
|
||||||
const color = await page
|
await waitFor(async () => {
|
||||||
.locator<HTMLHeadingElement>("h1")
|
const color = await page
|
||||||
.evaluate((el) => {
|
.locator<HTMLHeadingElement>("h1")
|
||||||
return globalThis.getComputedStyle(el).color;
|
.evaluate((el) => {
|
||||||
});
|
return globalThis.getComputedStyle(el).color;
|
||||||
expect(color).toEqual("rgb(255, 0, 0)");
|
});
|
||||||
|
expect(color).toEqual("rgb(255, 0, 0)");
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
const textColor = await page
|
await waitFor(async () => {
|
||||||
.locator<HTMLParagraphElement>("p")
|
const textColor = await page
|
||||||
.evaluate((el) => {
|
.locator<HTMLParagraphElement>("p")
|
||||||
return globalThis.getComputedStyle(el).color;
|
.evaluate((el) => {
|
||||||
});
|
return globalThis.getComputedStyle(el).color;
|
||||||
expect(textColor).toEqual("rgb(0, 128, 0)");
|
});
|
||||||
|
expect(textColor).toEqual("rgb(0, 128, 0)");
|
||||||
|
return true;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user