diff --git a/tests/DocPage/DocPage.spec.ts b/tests/DocPage/DocPage.spec.ts new file mode 100644 index 00000000..a1ef55a3 --- /dev/null +++ b/tests/DocPage/DocPage.spec.ts @@ -0,0 +1,9 @@ +import {expect, test} from '@playwright/test'; + +import {ROOT_ELEMENT_SELECTOR, URL_SEGMENT, VIEW_MODE} from '../utils'; + +test('Document page test', async ({page}) => { + await page.goto(URL_SEGMENT + 'pages-document--document' + VIEW_MODE); + await page.waitForSelector(ROOT_ELEMENT_SELECTOR); + await expect(page).toHaveScreenshot('DocPage.png'); +}); diff --git a/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-chromium-win32.png b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-chromium-win32.png new file mode 100644 index 00000000..21038e62 Binary files /dev/null and b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-chromium-win32.png differ diff --git a/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-firefox-win32.png b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-firefox-win32.png new file mode 100644 index 00000000..4c8bfd36 Binary files /dev/null and b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-firefox-win32.png differ diff --git a/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-webkit-win32.png b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-webkit-win32.png new file mode 100644 index 00000000..5e331204 Binary files /dev/null and b/tests/DocPage/DocPage.spec.ts-snapshots/DocPage-webkit-win32.png differ diff --git a/tests/utils.ts b/tests/utils.ts new file mode 100644 index 00000000..24c5a404 --- /dev/null +++ b/tests/utils.ts @@ -0,0 +1,3 @@ +export const URL_SEGMENT = 'http://localhost:6006/iframe.html?args=&id='; +export const ROOT_ELEMENT_SELECTOR = '#storybook-root'; +export const VIEW_MODE = '&viewMode=story';