Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Nav browser checks: counts for the new Sell studio, and a slower tab pick

Adarsha289caf2360d
diff --git a/tests/e2e/nav-hubs.mjs b/tests/e2e/nav-hubs.mjs
index 8e37a143..813e2191 100644
--- a/tests/e2e/nav-hubs.mjs
+++ b/tests/e2e/nav-hubs.mjs
@@ -285,8 +285,8 @@ try {
if (tab === "Studios") {
const tiles = sheet.locator("ul").first().getByRole("link");
const seen = await tiles.evaluateAll((els) => els.map((el) => el.getBoundingClientRect()).map((r) => r.top >= 0 && r.bottom <= innerHeight));
- // 33 studio tiles and the See all tile that ends the grid.
- check(seen.length === 34 && seen.every(Boolean), "phone Studios sheet: all 33 tiles and See all fit 390x844", `${seen.filter(Boolean).length}/${seen.length}`);
+ // 34 studio tiles and the See all tile that ends the grid.
+ check(seen.length === 35 && seen.every(Boolean), "phone Studios sheet: all 34 tiles and See all fit 390x844", `${seen.filter(Boolean).length}/${seen.length}`);
check((await sheet.getByRole("button", { name: "Search everything" }).count()) === 1, "phone Studios sheet: Search everything is an icon button");
if (shots) await p.screenshot({ path: path.join(shots, "phone-studios-sheet-390.png") });
}
diff --git a/tests/e2e/nav-subfeatures.mjs b/tests/e2e/nav-subfeatures.mjs
index 0e8d9955..e74f8276 100644
--- a/tests/e2e/nav-subfeatures.mjs
+++ b/tests/e2e/nav-subfeatures.mjs
@@ -68,8 +68,12 @@ const selectedTab = async (p, name) => {
const tab = p.getByRole("tab", { name, exact: true }).or(p.getByRole("radio", { name, exact: true })).first();
try {
await tab.waitFor({ timeout: 15_000 });
- await p.waitForTimeout(200);
- return (await tab.getAttribute("aria-selected")) === "true" || (await tab.getAttribute("aria-checked")) === "true";
+ // A page picks its linked tab once it has read the address: give a slow engine up to 3 s.
+ for (let i = 0; i < 15; i++) {
+ await p.waitForTimeout(200);
+ if ((await tab.getAttribute("aria-selected")) === "true" || (await tab.getAttribute("aria-checked")) === "true") return true;
+ }
+ return false;
} catch {
return false;
}
@@ -263,7 +267,9 @@ try {
check(f.sub && f.text === "Ad Multiplier", "keys: Down walks its links", JSON.stringify(f));
await p.keyboard.press("ArrowDown");
f = await focused(p);
- check(!f.sub && f.text.startsWith("Mixed Media"), "keys: Down from its last link goes on to the next studio", JSON.stringify(f));
+ // The next studio in the column: its first row (the lead's links come before it).
+ const nextStudio = await panel(p).locator('[data-group="sell"] > ul > li:nth-child(2) > a').evaluate((a) => ({ text: a.textContent.trim(), row: a.getAttribute("data-row") }));
+ check(!f.sub && f.text === nextStudio.text && f.row === nextStudio.row, "keys: Down from its last link goes on to the next studio", `${JSON.stringify(f)} want ${JSON.stringify(nextStudio)}`);
await p.keyboard.press("ArrowUp");
check((await focused(p)).text === "Ad Multiplier", "keys: Up comes back to the link");
await p.keyboard.press("ArrowRight");
diff --git a/tests/e2e/nav.mjs b/tests/e2e/nav.mjs
index 18871fcc..915146fd 100644
--- a/tests/e2e/nav.mjs
+++ b/tests/e2e/nav.mjs
@@ -181,7 +181,7 @@ try {
}),
);
const scrolls = await panel.evaluate((el) => el.scrollHeight > el.clientHeight + 1);
- check(seen.length === 33 && seen.every(Boolean) && subs.every(Boolean) && !scrolls, `launcher at ${w}x${h}: all 32 studios, their links and See all on screen, no scrolling`, `${seen.filter(Boolean).length}/${seen.length}, links ${subs.filter(Boolean).length}/${subs.length}`);
+ check(seen.length === 34 && seen.every(Boolean) && subs.every(Boolean) && !scrolls, `launcher at ${w}x${h}: all 33 studios, their links and See all on screen, no scrolling`, `${seen.filter(Boolean).length}/${seen.length}, links ${subs.filter(Boolean).length}/${subs.length}`);
await p.keyboard.press("Escape");
}
await p.setViewportSize(DESKTOP.viewport);
@@ -271,7 +271,7 @@ try {
await dialog.getByRole("group", { name: "Show the studios for one goal" }).getByRole("button", { name: /^Sell/ }).click();
await p.waitForTimeout(300);
const tiles = await dialog.locator('[cmdk-item][data-value^="tile:"]').count();
- check(tiles === 5, "palette: the Sell chip shows 5 studios", String(tiles));
+ check(tiles === 6, "palette: the Sell chip shows 6 studios", String(tiles));
await p.keyboard.press("Escape");
await openRoute(p, `${app}/`);
await p.keyboard.press("ControlOrMeta+k");
@@ -301,9 +301,9 @@ try {
await p.waitForTimeout(350);
const tiles = sheet.locator("ul").first().getByRole("link");
const seen = await inView(tiles);
- // 33 tiles (Ads Studio keeps its tile here; the desktop menu lists it under Marketing Studio) and the closing See all.
- if (size.height >= 844) check(seen.length === 34 && seen.every(Boolean), `${label}: the Studios sheet shows all 33 and See all without scrolling`, `${seen.filter(Boolean).length}/${seen.length}`);
- else check(seen.length === 34, `${label}: the Studios sheet lists all 33 and See all (it scrolls inside at this height)`, String(seen.length));
+ // 34 tiles (Ads Studio keeps its tile here; the desktop menu lists it under Marketing Studio) and the closing See all.
+ if (size.height >= 844) check(seen.length === 35 && seen.every(Boolean), `${label}: the Studios sheet shows all 34 and See all without scrolling`, `${seen.filter(Boolean).length}/${seen.length}`);
+ else check(seen.length === 35, `${label}: the Studios sheet lists all 34 and See all (it scrolls inside at this height)`, String(seen.length));
await sheet.getByRole("button", { name: /^Film/ }).tap();
check((await sheet.locator("ul").first().getByRole("link").count()) === 9, `${label}: the Film chip shows 8 and See all`);
if (size.height >= 844) await shot(p, "phone-studios-sheet-film-390");
@@ -452,7 +452,7 @@ try {
const menu = p.getByRole("menu");
await menu.waitFor();
const text = await menu.innerText();
- check(/\b3 of 28 studios tried/.test(text) && /Next to try:/.test(text), "explore: 3 visited show as “3 of 28 studios tried” with a next one", text.match(/\d+ of \d+ studios tried/)?.[0]);
+ check(/\b3 of 29 studios tried/.test(text) && /Next to try:/.test(text), "explore: 3 visited show as “3 of 29 studios tried” with a next one", text.match(/\d+ of \d+ studios tried/)?.[0]);
await shot(p, "account-menu-explore-1440");
await p.keyboard.press("Escape");
await ctx.close();