diff --git a/tests/time-line/xdesign.spec.ts b/tests/time-line/xdesign.spec.ts new file mode 100644 index 0000000..55f2c33 --- /dev/null +++ b/tests/time-line/xdesign.spec.ts @@ -0,0 +1,19 @@ +import { expect, test } from '@playwright/test' + +test.describe('timeline 组件xdesign规范', () => { + test('节点状态 --UI截图', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('time-line#status') + const demo = page.locator('#status .pc-demo') + await expect(demo).toBeInViewport() + await expect(demo).toHaveScreenshot('status.png') + }) + + test('圆点外观 --UI截图', async ({ page }) => { + page.on('pageerror', (exception) => expect(exception).toBeNull()) + await page.goto('time-line#shape') + const demo = page.locator('#shape .pc-demo') + await expect(demo).toBeInViewport() + await expect(demo).toHaveScreenshot('shape.png') + }) +}) diff --git a/tests/time-line/xdesign.spec.ts-snapshots/shape-chromium-win32.png b/tests/time-line/xdesign.spec.ts-snapshots/shape-chromium-win32.png new file mode 100644 index 0000000..197cbb6 Binary files /dev/null and b/tests/time-line/xdesign.spec.ts-snapshots/shape-chromium-win32.png differ diff --git a/tests/time-line/xdesign.spec.ts-snapshots/status-chromium-win32.png b/tests/time-line/xdesign.spec.ts-snapshots/status-chromium-win32.png new file mode 100644 index 0000000..9c25a47 Binary files /dev/null and b/tests/time-line/xdesign.spec.ts-snapshots/status-chromium-win32.png differ