mirror of
https://github.com/tabler/tabler.git
synced 2025-12-22 01:44:25 +04:00
17 lines
539 B
TypeScript
17 lines
539 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.slice(0, 10)) {
|
|
test(`Compare ${file}`, async ({ page }) => {
|
|
await page.goto(`file://${path.join(previewDir, file)}`)
|
|
await page.waitForLoadState("networkidle")
|
|
await argosScreenshot(page, `${page}`)
|
|
})
|
|
}
|