mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-05 08:15:41 -08:00
Make every URL the console page uses page-relative, guarded by a source test
AI Assisted
This commit is contained in:
1 parent
4ced32be5c
commit
1d007737b1
47 files changed
+401
-202
No files matched your search
@@ -579,7 +579,7 @@ test("each tab keeps its own text and pictures, and switching never saves into t
|
||||
await tabNamed(s, "Ideas").click();
|
||||
await s.page.waitForFunction(() => document.querySelectorAll("#notepad-strip > li.is-ready").length === 1);
|
||||
const src = await s.page.locator("#notepad-strip img").getAttribute("src");
|
||||
assert.match(src, new RegExp(`^/notepad/images/${ideas}/`), "the picture's address names its tab");
|
||||
assert.match(src, new RegExp(`^notepad/images/${ideas}/`), "the picture's address names its tab");
|
||||
|
||||
// A save that cannot reach the server keeps you on the tab, with why.
|
||||
await s.page.route("**/notepad/text*", (route) => route.abort());
|
||||
@@ -1009,7 +1009,8 @@ test("the preview opens at the clicked picture, steps and wraps, and Esc closes
|
||||
const s = await openSession(await suite.browser(), { t, workflow: "plan", payload: PLAN_QUESTION });
|
||||
await openNotepad(s);
|
||||
for (const color of ["#c33", "#3c3", "#33c"]) await addViaButton(s, color);
|
||||
const urls = stored(s).map((img) => img.url);
|
||||
// Page-relative: the page at / shows each one here.
|
||||
const urls = stored(s).map((img) => `/${img.url}`);
|
||||
const shown = () =>
|
||||
s.page.evaluate(() => ({
|
||||
src: new URL(document.getElementById("picview-img").src).pathname,
|
||||
|
||||
Reference in new issue
Block a user