1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-08 12:22:23 +04:00

Limit visual regression tests to the first 10 HTML files for improved performance

This commit is contained in:
codecalm
2025-02-19 01:14:53 +01:00
parent c2b446c209
commit fbe3680142
+1 -6
View File
@@ -4,14 +4,9 @@ import path from "path"
const previewDir = path.join(__dirname, "../preview/dist")
async function visualDiff(page: Page, url: string) {
await page.goto(url);
await expect(page).toHaveScreenshot({ fullPage: true });
}
const htmlFiles = fs.readdirSync(previewDir).filter((file) => file.endsWith(".html"))
for (const file of htmlFiles) {
for (const file of htmlFiles.slice(0, 10)) {
test(`Compare ${file}`, async ({ page }) => {
const filePath = `file://${path.join(previewDir, file)}`
await page.goto(filePath)