Skip to content

Commit

Permalink
Address flakey test (#7044)
Browse files Browse the repository at this point in the history
# Pull Request

## πŸ“– Description

This PR attempts to address a flakey test in `@microsoft/fast-ssr` caused by the use of `getComputedStyle`.

## βœ… Checklist

### General

<!--- Review the list and put an x in the boxes that apply. -->

- [x] I have included a change request file using `$ npm run change`
- [x] I have added tests for my changes.
- [x] I have tested my changes.
- [ ] I have updated the project documentation to reflect my changes.
- [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/master/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/master/CODE_OF_CONDUCT.md#our-standards) for this project.
  • Loading branch information
janechu authored Dec 4, 2024
1 parent ed5a78d commit a3c98e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Attempt to address flaky test by increasing timeout",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect, test } from "@playwright/test";

test("Check that the first element has styles assigned", async ({ page }) => {
test.slow();
await page.goto("/fast-style");

const cards = page.locator("fast-card");
Expand All @@ -17,6 +18,7 @@ test("Check that the first element has styles assigned", async ({ page }) => {
test("Check that the nested element in the first element has styles assigned", async ({
page,
}) => {
test.slow();
await page.goto("/fast-style");

const cards = page.locator("fast-card");
Expand All @@ -34,6 +36,7 @@ test("Check that the nested element in the first element has styles assigned", a
expect(styles[0]).toEqual("rgb(43, 43, 43)");
});
test("Check that all elements have styles assigned", async ({ page }) => {
test.slow();
await page.goto("/fast-style");

const cards = page.locator("fast-card");
Expand All @@ -52,6 +55,7 @@ test("Check that all elements have styles assigned", async ({ page }) => {
});
});
test("Check that all nested elements have styles assigned", async ({ page }) => {
test.slow();
await page.goto("/fast-style");

const cards = page.locator("fast-card");
Expand Down

0 comments on commit a3c98e1

Please sign in to comment.