mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Covered by PR #380 rather than merged on its own. This branch already carries the Tor onion-service provider across the whole role set, and #495 touches the same nextcloud Playwright specs; landing them separately would mean resolving the same conflicts twice, once here and once on main. Reviewing #495 as part of #380 keeps the resolution in one place. One conflict, in the external-sites addon spec. Nextcloud 34 renamed the admin section from #external to #external-vue and replaced the add-site control with a 'New site' button, so the incoming selectors win — retargeting them is what the PR is for. This branch's resolveTimeout wrappers stay on both assertions. make quality green on the merge result. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
42 lines
1.8 KiB
JavaScript
42 lines
1.8 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
const { resolveTimeout } = require("../timeouts");
|
|
const { skipUnlessAddonEnabled } = require("../addon-gating");
|
|
const shared = require("../_shared");
|
|
const { gotoOnion } = require("../personas");
|
|
|
|
test.use({ ignoreHTTPSErrors: true });
|
|
|
|
test("external addon: admin External-sites settings panel renders", async ({ browser }) => {
|
|
skipUnlessAddonEnabled("external");
|
|
test.setTimeout(resolveTimeout(120_000));
|
|
|
|
const context = await browser.newContext({ ignoreHTTPSErrors: true });
|
|
const page = await context.newPage();
|
|
|
|
try {
|
|
await shared.loginToStandaloneNextcloud(page);
|
|
|
|
const settingsUrl = new URL("settings/admin/external", shared.env.nextcloudBaseUrl).toString();
|
|
await gotoOnion(page, settingsUrl, { waitUntil: "domcontentloaded", timeout: resolveTimeout(60_000) });
|
|
await shared.dismissBlockingNextcloudModals(page, page);
|
|
|
|
await expect(
|
|
page.locator("#app-content, #app-content-vue, #content, #content-vue").first(),
|
|
"the Nextcloud admin settings shell must render for the external app's own section (settings/admin/external)",
|
|
).toBeVisible({ timeout: resolveTimeout(60_000) });
|
|
|
|
await expect(
|
|
page.locator("#external-vue").first(),
|
|
"the external app's own admin section (#external-vue) must render (proves the 'external' section + template are served by the enabled app)",
|
|
).toBeVisible({ timeout: resolveTimeout(60_000) });
|
|
|
|
await expect(
|
|
page.getByRole("button", { name: "New site" }).first(),
|
|
"the external app's add-site admin control (the 'New site' button) must render (proves the External-sites configuration UI is live)",
|
|
).toBeVisible({ timeout: resolveTimeout(60_000) });
|
|
} finally {
|
|
await page.close().catch(() => {});
|
|
await context.close().catch(() => {});
|
|
}
|
|
});
|