1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00
Files
tabler/tests/visual.test.ts

17 lines
526 B
TypeScript

import test, { expect } from '@playwright/test';
import { argosScreenshot } from "@argos-ci/playwright"
import fs from "fs"
import path from "path"
const previewDir = path.join(__dirname, "../preview/dist")
const htmlFiles = fs.readdirSync(previewDir).filter((file) => file.endsWith(".html"))
for (const file of htmlFiles) {
test(`Compare ${file}`, async ({ page }) => {
await page.goto(`file://${path.join(previewDir, file)}`)
await page.waitForLoadState("networkidle")
await argosScreenshot(page, `${file}`)
})
}