first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* n8n Playwright Janitor Configuration
|
||||
*
|
||||
* This configures the janitor for the n8n Playwright test suite.
|
||||
*/
|
||||
import { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { defineConfig } from '@n8n/playwright-janitor';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
rootDir: __dirname,
|
||||
|
||||
patterns: {
|
||||
pages: ['pages/**/*.ts'],
|
||||
components: ['pages/components/**/*.ts'],
|
||||
flows: ['composables/**/*.ts'],
|
||||
tests: ['tests/**/*.spec.ts'],
|
||||
services: ['services/**/*.ts'],
|
||||
fixtures: ['fixtures/**/*.ts'],
|
||||
helpers: [
|
||||
'helpers/**/*.ts',
|
||||
'utils/**/*.ts',
|
||||
'config/**/*.ts',
|
||||
'tests/**/fixtures.ts',
|
||||
],
|
||||
factories: ['test-data/**/*.ts', 'factories/**/*.ts'],
|
||||
testData: ['workflows/**/*'],
|
||||
},
|
||||
|
||||
excludeFromPages: [
|
||||
'n8nPage.ts', // Facade
|
||||
'BasePage.ts', // Base class
|
||||
'BaseModal.ts',
|
||||
'BaseComponent.ts',
|
||||
],
|
||||
|
||||
facade: {
|
||||
file: 'pages/n8nPage.ts',
|
||||
className: 'n8nPage',
|
||||
excludeTypes: ['Page', 'ApiHelpers'],
|
||||
},
|
||||
|
||||
fixtureObjectName: 'n8n',
|
||||
|
||||
apiFixtureName: 'api',
|
||||
|
||||
rawApiPatterns: [
|
||||
/\brequest\.(get|post|put|patch|delete|head)\s*\(/i,
|
||||
/\bfetch\s*\(/,
|
||||
/\.request\(\s*['"`]/,
|
||||
],
|
||||
|
||||
flowLayerName: 'Composable',
|
||||
|
||||
architectureLayers: ['Tests', 'Composables', 'Pages', 'BasePage'],
|
||||
|
||||
rules: {
|
||||
'boundary-protection': { enabled: true, severity: 'error' },
|
||||
'scope-lockdown': { enabled: true, severity: 'error' },
|
||||
'selector-purity': { enabled: true, severity: 'error' },
|
||||
deduplication: { enabled: true, severity: 'warning' },
|
||||
'dead-code': { enabled: true, severity: 'warning' },
|
||||
'no-page-in-flow': {
|
||||
enabled: true,
|
||||
severity: 'warning',
|
||||
allowPatterns: [
|
||||
/\.page\.keyboard/,
|
||||
/\.page\.evaluate/,
|
||||
/\.page\.waitForLoadState/,
|
||||
/\.page\.waitForURL/,
|
||||
/\.page\.reload/,
|
||||
],
|
||||
},
|
||||
'api-purity': { enabled: true, severity: 'warning' },
|
||||
// Enforce facade pattern - access pages through n8n.* instead of new *Page()
|
||||
'no-direct-page-instantiation': { enabled: true, severity: 'error' },
|
||||
},
|
||||
|
||||
orchestration: {
|
||||
metricsPath: '../../../.github/test-metrics/playwright.json',
|
||||
specFilter: 'tests/e2e/',
|
||||
},
|
||||
|
||||
tcr: {
|
||||
testCommand: 'pnpm test:local',
|
||||
workerCount: 1,
|
||||
allowedTestCommands: [
|
||||
'pnpm test:local',
|
||||
'pnpm test:container:sqlite',
|
||||
],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user