mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
accdd970a4
* test(browser): add real Chrome AX smoke * fix(browser): attach cross-origin frame targets directly * fix(browser): resolve frame target by URL * test(browser): include frame target URL in AX smoke * fix(browser): discover iframe targets before routing * fix(browser): resolve iframe targets through CDP * fix(browser): auto-attach iframe targets for routing * test(browser): make cross-origin AX smoke a capability probe * docs(browser): mark cross-origin AX as best-effort * ci(browser): keep AX smoke out of normal e2e sweep
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
const includeExtendedE2e = process.env.OPENCLI_E2E === '1';
|
|
const includeAxChromeE2e = process.env.OPENCLI_AX_E2E === '1';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
projects: [
|
|
{
|
|
test: {
|
|
name: 'unit',
|
|
include: ['src/**/*.test.ts'],
|
|
exclude: ['clis/**/*.test.{ts,js}'],
|
|
sequence: { groupOrder: 0 },
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: 'extension',
|
|
include: ['extension/src/**/*.test.ts'],
|
|
sequence: { groupOrder: 0 },
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: 'adapter',
|
|
include: ['clis/**/*.test.{ts,js}'],
|
|
sequence: { groupOrder: 1 },
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: 'e2e',
|
|
include: [
|
|
'tests/e2e/browser-public.test.ts',
|
|
'tests/e2e/band-auth.test.ts',
|
|
'tests/e2e/public-commands.test.ts',
|
|
'tests/e2e/management.test.ts',
|
|
'tests/e2e/output-formats.test.ts',
|
|
'tests/e2e/plugin-management.test.ts',
|
|
'tests/e2e/browser-tabs.test.ts',
|
|
'tests/e2e/article-download-pipeline.test.ts',
|
|
...(includeAxChromeE2e ? ['tests/e2e/browser-ax-chrome.test.ts'] : []),
|
|
// Extended browser tests (20+ sites) — opt-in only:
|
|
// OPENCLI_E2E=1 npx vitest run
|
|
...(includeExtendedE2e ? ['tests/e2e/browser-public-extended.test.ts', 'tests/e2e/browser-auth.test.ts', 'tests/e2e/douban.test.ts'] : []),
|
|
],
|
|
maxWorkers: 2,
|
|
sequence: { groupOrder: 2 },
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: 'smoke',
|
|
include: ['tests/smoke/**/*.test.ts'],
|
|
sequence: { groupOrder: 3 },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|