mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
New lint test_no_raw_goto.py forbids raw `page.goto(...)` in role playwright specs + persona flows (the gotoOnion wrapper in personas/utils is exempt) so navigation retries transient Tor-transport errors over onion. Migrates every raw call across ~75 roles (343 sites) to `gotoOnion(page, ...)` and teaches gotoOnion to detect relative onion URLs (`isOnionCanonical`). gotoOnion is a behaviour-identical drop-in on clearnet (single attempt, same return). Verified: no-raw-goto lint green, eslint 0 errors, make test green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
947 B
JavaScript
27 lines
947 B
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("addon mail: app route renders the Nextcloud app container", async ({ browser }) => {
|
|
skipUnlessAddonEnabled("mail");
|
|
|
|
const context = await browser.newContext({ ignoreHTTPSErrors: true });
|
|
const page = await context.newPage();
|
|
|
|
try {
|
|
await shared.loginToStandaloneNextcloud(page);
|
|
|
|
const appUrl = new URL("apps/mail/", shared.env.nextcloudBaseUrl).toString();
|
|
await gotoOnion(page, appUrl, { waitUntil: "commit", timeout: resolveTimeout(60_000) });
|
|
|
|
await expect(
|
|
page.locator("#app-content, #app-content-vue, #content").first()
|
|
).toBeVisible({ timeout: resolveTimeout(60_000) });
|
|
} finally {
|
|
await page.close();
|
|
await context.close();
|
|
}
|
|
});
|