mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 20:26:33 +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
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
const { resolveTimeout } = require("./timeouts");
|
|
const { gotoOnion } = require("./personas");
|
|
|
|
exports.register = function (shared) {
|
|
test("taiga public discover keeps the themed surface", async ({ page }) => {
|
|
shared.skipUnlessServiceEnabled("css");
|
|
|
|
const taigaUrls = shared.getTaigaUrls();
|
|
|
|
await gotoOnion(page, taigaUrls.discoverUrl);
|
|
await expect(page.getByRole("heading", { name: /discover projects/i })).toBeVisible({ timeout: resolveTimeout(60_000) });
|
|
await shared.expectGradientBackground(
|
|
page.locator("div.master"),
|
|
"Expected the Taiga discover page to use the themed master background",
|
|
);
|
|
await shared.expectGradientBackground(
|
|
page.locator(".discover-header form"),
|
|
"Expected the Taiga discover search form to use the themed surface",
|
|
);
|
|
await shared.expectGradientBackground(
|
|
page.locator(".discover-header input[type='text']"),
|
|
"Expected the Taiga discover search input to use the themed input surface",
|
|
);
|
|
});
|
|
};
|