Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

2.4 KB
Raw Blame
/**
 * Playwright configuration for the real-browser mXSS regression spec.
 *
 * Scope: `tests/security-mxss-reparse.spec.js` only (issue #6295).
 *
 * Why a separate config rather than reusing `playwright.config.js`:
 * every project in the main config declares `dependencies: ['setup']` and
 * loads `.auth/user.json`. Playwright runs project dependencies even when a
 * specific spec is selected, and `auth.setup.js` visits `/auth/login`, so
 * selecting any main-config project requires the Flask dev server to be up.
 *
 * This spec needs neither. It loads the production sanitizer modules off disk
 * and its fixture page via `setContent()`, so it must not inherit the
 * authentication dependency, the stored auth state, or the `webServer` block.
 * Running it under this config is what makes the three-browser CI job
 * (`security-mxss-reparse-three-browser` in
 * `.github/workflows/playwright-webkit-tests.yml`) self-contained.
 */

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
    testDir: './tests',

    // Only this spec. Path-anchored so it cannot pick up an unrelated file
    // that happens to share the basename.
    testMatch: /\/tests\/security-mxss-reparse\.spec\.js$/,

    // The spec's tests share a page-level contract (document-wide executable
    // surface scan) and are cheap; serial keeps the failure output readable.
    fullyParallel: false,
    workers: 1,

    // A retry is worth having on CI: browser-parser timing differs across
    // Chromium/Firefox/WebKit and a flake here would be indistinguishable
    // from a real sanitizer regression without one.
    retries: process.env.CI ? 1 : 0,

    reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : 'list',

    use: {
        trace: 'retain-on-failure',
    },

    projects: [
        {
            // No `dependencies` and no `storageState`: this spec needs neither
            // the auth setup nor a running application server.
            name: 'mxss-chromium',
            use: { ...devices['Desktop Chrome'] },
        },
        {
            name: 'mxss-firefox',
            use: { ...devices['Desktop Firefox'] },
        },
        {
            name: 'mxss-webkit',
            use: { ...devices['Desktop Safari'] },
        },
    ],

    // Deliberately no `webServer`. The fixture is loaded from disk via
    // setContent(); nothing here talks to the application.
});