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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user