on master help sign in
Fixed flaky tests (#39)

* Fixed flaky tests * Added new screenshots

commitb16e12bb90c0915f64a72fc1c86351bb5509e826 authoriko <ilyakooo0@gmail.com> dateSat 26 Nov 2022, 07:45 (4 years ago) parent0963c69
7 files changed+2−1
tests/src/test.spec.ts+2−1 tests/src/test.spec.ts-snapshots/Cards-view-1-Pixel-3-linux.png tests/src/test.spec.ts-snapshots/Contacts-view-1-Pixel-3-linux.png tests/src/test.spec.ts-snapshots/Filled-ciphers-page-1-Pixel-3-linux.png tests/src/test.spec.ts-snapshots/Notes-view-1-Pixel-3-linux.png tests/src/test.spec.ts-snapshots/Passwords-view-1-Pixel-3-linux.png tests/src/test.spec.ts-snapshots/Side-bar-1-Pixel-3-linux.png
tests/src/test.spec.ts+2−1
@@ -85,7 +85,7 @@ async function screenshot(page: Page) {
8585 await page.locator('.p-icon--spinner.u-animation--spin.spinner').waitFor({ state: "hidden" })
8686 await screenshot(page)
8787 } else {
88− await expect.soft(page).toHaveScreenshot({ mask: [page.locator(".hide-in-test")], animations: "disabled", fullPage: true })
88+ await expect.soft(page).toHaveScreenshot({ animations: "disabled", fullPage: true })
8989 }
9090}
9191
@@ -109,6 +109,7 @@ function cipherPage(name: string) {
109109
110110test.beforeEach(async ({ page }) => {
111111 await page.goto(`file://${__dirname}/../../build/all/app/install/index.html`);
112+ await page.addStyleTag({ content: '.hide-in-test {opacity: 0;}' })
112113})
113114
114115if (process.env.RECORD_TEST === "true") {
tests/src/test.spec.ts-snapshots/Cards-view-1-Pixel-3-linux.png

Binary file not shown.

tests/src/test.spec.ts-snapshots/Contacts-view-1-Pixel-3-linux.png

Binary file not shown.

tests/src/test.spec.ts-snapshots/Filled-ciphers-page-1-Pixel-3-linux.png

Binary file not shown.

tests/src/test.spec.ts-snapshots/Notes-view-1-Pixel-3-linux.png

Binary file not shown.

tests/src/test.spec.ts-snapshots/Passwords-view-1-Pixel-3-linux.png

Binary file not shown.

tests/src/test.spec.ts-snapshots/Side-bar-1-Pixel-3-linux.png

Binary file not shown.