diff --git a/__playwright-tests__/fixtures/dynamic-content.html b/__playwright-tests__/fixtures/dynamic-content.html new file mode 100644 index 00000000..469c65d5 --- /dev/null +++ b/__playwright-tests__/fixtures/dynamic-content.html @@ -0,0 +1,33 @@ + + + + Dynamic Content E2E Tests + + + +
+

Hello There! The current time is:

+
+
+
+ + + + \ No newline at end of file diff --git a/__playwright-tests__/forms.spec.ts b/__playwright-tests__/forms.spec.ts index 93879f37..f149802d 100644 --- a/__playwright-tests__/forms.spec.ts +++ b/__playwright-tests__/forms.spec.ts @@ -1,7 +1,6 @@ import { test, expect } from '../src'; test('form submits succesfully', async ({ page }) => { - test.setTimeout(2000); await page.goto('/forms'); await page.locator('#form-success input[type="submit"]').click(); await expect(page.getByText('OK!')).toBeVisible(); diff --git a/__playwright-tests__/ignored-regions.spec.ts b/__playwright-tests__/ignored-regions.spec.ts new file mode 100644 index 00000000..4c49aefe --- /dev/null +++ b/__playwright-tests__/ignored-regions.spec.ts @@ -0,0 +1,9 @@ +import { test, expect } from '../src'; + +// NOTE: This is a test that is meant to be run through Chromatic, so it doesn't actually work +// with the automated test suite. +test('ignored regions work with chromatic', async ({ page }) => { + test.setTimeout(2000); + await page.goto('/ignore'); + await setTimeout(() => {}, 1000); +}); diff --git a/__playwright-tests__/server.js b/__playwright-tests__/server.js index cf3e1606..1f032915 100644 --- a/__playwright-tests__/server.js +++ b/__playwright-tests__/server.js @@ -18,6 +18,10 @@ app.get('/asset-paths', (req, res) => { res.sendFile(path.join(__dirname, 'fixtures/asset-paths.html')); }); +app.get('/ignore', (req, res) => { + res.sendFile(path.join(__dirname, 'fixtures/dynamic-content.html')); +}); + app.get('/forms', (req, res) => { res.sendFile(path.join(__dirname, 'fixtures/forms.html')); });