test: isolate pull quote linework snapshot
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @ts-check
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
/**
|
||||
* Read environment variables from file.
|
||||
@@ -13,8 +13,9 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
* @see https://playwright.dev/docs/test-configuration
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
snapshotPathTemplate: '{testDir}/{testFilePath}-snapshots/{arg}{-projectName}{ext}',
|
||||
testDir: "./tests",
|
||||
snapshotPathTemplate:
|
||||
"{testDir}/{testFilePath}-snapshots/{arg}{-projectName}{ext}",
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: true,
|
||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||
@@ -24,22 +25,22 @@ export default defineConfig({
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: 'html',
|
||||
reporter: "html",
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
// baseURL: 'http://127.0.0.1:3000',
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: 'on-first-retry',
|
||||
trace: "on-first-retry",
|
||||
ignoreHTTPSErrors: true,
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] },
|
||||
},
|
||||
|
||||
// {
|
||||
@@ -80,4 +81,3 @@ export default defineConfig({
|
||||
// reuseExistingServer: !process.env.CI,
|
||||
// },
|
||||
});
|
||||
|
||||
|
||||
@@ -226,6 +226,9 @@ test("mobile pull quote matches the supplied visual reference", async ({
|
||||
|
||||
test("mobile pull quote linework render remains stable", async ({ page }) => {
|
||||
await page.goto(homepage);
|
||||
await page.locator(".pull-quote__content").evaluate((content) => {
|
||||
content.style.visibility = "hidden";
|
||||
});
|
||||
|
||||
await expect(page.locator(".pull-quote__vector--mobile")).toHaveScreenshot(
|
||||
"pullquote-linework-render.png",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 29 KiB |
Reference in New Issue
Block a user