mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 03:15:56 +00:00
Split the monolithic playwright.spec.js of akaunting, flowise, joomla, opentalk and opencloud into per-scenario test-*.js files aggregated by a require-only playwright.spec.js, matching the baserow/mattermost convention. opentalk and opencloud gain a _shared.js holding their multi-test SSO-login helpers (attachDiagnostics + ssoLoginAndAssert*). Pure structural split: all 28 tests are preserved verbatim (titles, asserts, selectors, timeouts, messages unchanged), the file-scoped beforeEach is inlined into the tests that relied on it, and each file re-declares only the env consts it uses. Verified: node --check on every file, old/new test-title inventory matches per role, and _shared exports cover the split files' imports. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
|
|
const { skipUnlessServiceEnabled } = require("./service-gating");
|
|
const {
|
|
adminUsername,
|
|
adminPassword,
|
|
biberUsername,
|
|
biberPassword,
|
|
ssoLoginAndAssertDashboard,
|
|
} = require("./_shared");
|
|
|
|
test.use({ ignoreHTTPSErrors: true });
|
|
|
|
test("opentalk sso login (administrator) lands on dashboard", async ({ page }) => {
|
|
skipUnlessServiceEnabled("sso");
|
|
expect(adminUsername, "LOGIN_USERNAME must be set").toBeTruthy();
|
|
expect(adminPassword, "LOGIN_PASSWORD must be set").toBeTruthy();
|
|
|
|
await ssoLoginAndAssertDashboard(page, adminUsername, adminPassword);
|
|
});
|
|
|
|
test("opentalk sso login (biber) lands on dashboard", async ({ browser }) => {
|
|
skipUnlessServiceEnabled("sso");
|
|
expect(biberUsername, "BIBER_USERNAME must be set").toBeTruthy();
|
|
expect(biberPassword, "BIBER_PASSWORD must be set").toBeTruthy();
|
|
|
|
const context = await browser.newContext({ ignoreHTTPSErrors: true });
|
|
const page = await context.newPage();
|
|
try {
|
|
await ssoLoginAndAssertDashboard(page, biberUsername, biberPassword);
|
|
} finally {
|
|
await context.close();
|
|
}
|
|
});
|