n8n/packages/testing/playwright/tests/e2e/auth/authenticated.spec.ts
Declan Carroll 66087e2dd5
chore: Apply biome formatting to playwright package (no-changelog) (#26586)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 10:47:20 +00:00

25 lines
755 B
TypeScript

import { test, expect } from '../../../fixtures/base';
test.describe(
'Authentication',
{
annotation: [{ type: 'owner', description: 'Identity & Access' }],
},
() => {
const testCases = [
{ role: 'default', expectedUrl: /\/workflow/, auth: '' },
{ role: 'owner', expectedUrl: /\/workflow/, auth: '@auth:owner' },
{ role: 'admin', expectedUrl: /\/workflow/, auth: '@auth:admin' },
{ role: 'member', expectedUrl: /\/workflow/, auth: '@auth:member' },
{ role: 'none', expectedUrl: /\/signin/, auth: '@auth:none' },
];
for (const { role, expectedUrl, auth } of testCases) {
test(`${role} authentication ${auth}`, async ({ n8n }) => {
await n8n.goHome();
await expect(n8n.page).toHaveURL(expectedUrl);
});
}
},
);