You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
932 B
34 lines
932 B
import { defineConfig } from 'vitest/config';
|
|
import { playwright } from '@vitest/browser-playwright';
|
|
import base from '../vite.config.ts';
|
|
|
|
const client = base.test?.projects?.find(
|
|
(project) =>
|
|
typeof project === 'object' &&
|
|
project !== null &&
|
|
'test' in project &&
|
|
project.test?.name === 'client'
|
|
);
|
|
|
|
if (typeof client !== 'object' || !client || !('test' in client) || !client.test?.browser) {
|
|
throw new Error('The client test project is required for UIX visual auditing.');
|
|
}
|
|
|
|
// The larger outer viewport keeps the audit iframe at its native CSS scale.
|
|
// Reuse the normal plugins, aliases, instances and test discovery.
|
|
export default defineConfig({
|
|
...base,
|
|
test: {
|
|
name: 'audit-visual',
|
|
expect: base.test?.expect,
|
|
include: client.test.include,
|
|
browser: {
|
|
...client.test.browser,
|
|
ui: false,
|
|
provider: playwright({
|
|
contextOptions: { viewport: { width: 1280, height: 1400 } }
|
|
})
|
|
}
|
|
}
|
|
});
|