Skip to content

Commit

Permalink
Fixed flaky tests (#39)
Browse files Browse the repository at this point in the history
* Fixed flaky tests

* Added new screenshots
  • Loading branch information
ilyakooo0 authored Nov 26, 2022
1 parent 0963c69 commit b16e12b
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/src/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function screenshot(page: Page) {
await page.locator('.p-icon--spinner.u-animation--spin.spinner').waitFor({ state: "hidden" })
await screenshot(page)
} else {
await expect.soft(page).toHaveScreenshot({ mask: [page.locator(".hide-in-test")], animations: "disabled", fullPage: true })
await expect.soft(page).toHaveScreenshot({ animations: "disabled", fullPage: true })
}
}

Expand All @@ -109,6 +109,7 @@ function cipherPage(name: string) {

test.beforeEach(async ({ page }) => {
await page.goto(`file://${__dirname}/../../build/all/app/install/index.html`);
await page.addStyleTag({ content: '.hide-in-test {opacity: 0;}' })
})

if (process.env.RECORD_TEST === "true") {
Expand Down
Binary file modified tests/src/test.spec.ts-snapshots/Cards-view-1-Pixel-3-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/src/test.spec.ts-snapshots/Notes-view-1-Pixel-3-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/src/test.spec.ts-snapshots/Side-bar-1-Pixel-3-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b16e12b

Please sign in to comment.