Skip to content

Commit

Permalink
feat(vrt): ダークモード、ライトモード用のテストを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
mii288 committed Dec 13, 2024
1 parent b629de5 commit c1dfe27
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/vrt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { test } from '@playwright/test'
;(['dark', 'light'] as const).map((colorScheme) =>
test.describe('Capture screenshots', () => {
const workDir = '.reg'
const saveDir = `${workDir}/screenshots`
test.use({ colorScheme })

test.describe('Capture screenshots', () => {
const workDir = '.reg'
const saveDir = `${workDir}/screenshots`

test('Home', async ({ page }, info) => {
await page.goto('/')
await page.screenshot({
path: `${saveDir}/${info.title}/${info.project.name}.png`,
fullPage: true,
animations: 'disabled'
test(`[${colorScheme}] Home`, async ({ page }, info) => {
await page.goto('/')
await page.screenshot({
path: `${saveDir}/${info.title}/${info.project.name}.png`,
fullPage: true,
animations: 'disabled'
})
})
})
})
)

0 comments on commit c1dfe27

Please sign in to comment.