web: keep smoke coverage aligned with server-shared stars and short names
This commit is contained in:
+16
-10
@@ -2358,7 +2358,10 @@ try {
|
||||
step("narrowing by name and capturing the name-only empty state");
|
||||
await page.click("#filterToggle");
|
||||
await page.waitForSelector(".filter-panel");
|
||||
await page.fill("#pipelineNameFilter", "Android");
|
||||
const filterName = await page.evaluate(
|
||||
`document.querySelector("#pipelineRows .row-title")?.textContent?.trim() ?? ""`,
|
||||
);
|
||||
await page.fill("#pipelineNameFilter", filterName);
|
||||
const narrowed = await page.evaluate(
|
||||
`document.querySelectorAll("#pipelineRows button.row").length`,
|
||||
);
|
||||
@@ -2387,10 +2390,11 @@ try {
|
||||
step("opening a multi-stage pipeline detail (Summary)");
|
||||
const openedPipeline = await page.evaluate(`(() => {
|
||||
const rows = [...document.querySelectorAll("#pipelineRows button.row")];
|
||||
const wanted = rows.find((row) => row.textContent.includes("Plan and land")) ?? rows[0];
|
||||
const wanted =
|
||||
rows.find((row) => /\b[4-9] stages\b/.test(row.textContent)) ?? rows[0];
|
||||
if (!wanted) return null;
|
||||
wanted.setAttribute("data-test-click", "1");
|
||||
return wanted.textContent.includes("Plan and land") ? "Plan and land" : "first row";
|
||||
return wanted.querySelector(".row-title")?.textContent?.trim() ?? "first row";
|
||||
})()`);
|
||||
if (!openedPipeline) throw new Error("no pipeline row to open");
|
||||
console.log(` opened pipeline: ${openedPipeline}`);
|
||||
@@ -4771,6 +4775,9 @@ try {
|
||||
const row = document.querySelector('.chat-row[data-session="${createdId}"]');
|
||||
return {
|
||||
first: rows[0]?.dataset.session ?? "",
|
||||
firstActive:
|
||||
rows.find((candidate) => !candidate.querySelector(".chat-star.starred"))
|
||||
?.dataset.session ?? "",
|
||||
title: row?.querySelector(".chat-row-title")?.textContent ?? "",
|
||||
selected: row?.classList.contains("selected") ?? false,
|
||||
closed: !!row?.querySelector(".chat-activity-closed"),
|
||||
@@ -4802,8 +4809,10 @@ try {
|
||||
if (!created.pickerGone || !created.selected || created.closed) {
|
||||
throw new Error(`C2 did not close the pane onto the new conversation: ${JSON.stringify(created)}`);
|
||||
}
|
||||
if (created.first !== createdId) {
|
||||
throw new Error(`C2 created row is not at the head: first=${created.first} created=${createdId}`);
|
||||
if (created.firstActive !== createdId) {
|
||||
throw new Error(
|
||||
`C2 created row is not at the head of the active group: first=${created.firstActive} created=${createdId}`,
|
||||
);
|
||||
}
|
||||
if (created.title !== "New chat" || created.header !== "New chat") {
|
||||
throw new Error(`C2 created title: ${JSON.stringify(created)}`);
|
||||
@@ -4813,7 +4822,7 @@ try {
|
||||
}
|
||||
console.log(
|
||||
` chat_create sent exactly {title:"New chat",directory:"~",operation_id:${JSON.stringify(body.operation_id)}}; ` +
|
||||
`session ${createdId} at the head, active with empty history`,
|
||||
`session ${createdId} at the head of the active group, active with empty history`,
|
||||
);
|
||||
await shot("76-chat-created-list.png");
|
||||
|
||||
@@ -7488,10 +7497,7 @@ try {
|
||||
await page.waitForSelector("#pipelineRows button.row", { timeout: 25000 });
|
||||
const pipelineSelection = await page.evaluate(`(async () => {
|
||||
const rows = [...document.querySelectorAll("#pipelineRows button.row")];
|
||||
const row =
|
||||
rows.find((candidate) =>
|
||||
(candidate.querySelector(".row-title")?.textContent ?? "").includes("Plan and land"),
|
||||
) ?? rows[0];
|
||||
const row = rows[0];
|
||||
if (!row) return null;
|
||||
row.click();
|
||||
const deadline = Date.now() + 20000;
|
||||
|
||||
Reference in New Issue
Block a user