Q200: one-of choices and selected items say which is chosen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bac0d75451
commit
11369f8fed
18 files changed
+52
-12
No files matched your search
@@ -404,7 +404,7 @@ test("the pinned CEO conversation is the Messages front door", async () => {
|
||||
await parentDialog.getByRole("button", { name: "Delete", exact: true }).click();
|
||||
await expect(parentDialog.getByRole("alertdialog", { name: "Delete this task?" })).toContainText("1 subtasks stay and move to the top level.");
|
||||
// Switching to another task drops a pending confirmation, so it can never delete the wrong task.
|
||||
await parentDialog.getByRole("button", { name: "Subtasks" }).click();
|
||||
await parentDialog.getByRole("radio", { name: "Subtasks" }).click();
|
||||
await parentDialog.getByRole("button", { name: "Open task Child step" }).click();
|
||||
const childDialog = page.getByRole("dialog", { name: "Child step" });
|
||||
await expect(childDialog).toBeVisible();
|
||||
|
||||
@@ -244,7 +244,7 @@ test("onboards, hires, and creates work in the Electron shell", async () => {
|
||||
await page.getByRole("button", { name: "Advanced" }).click();
|
||||
await expect(page.getByText("Requests", { exact: true }).first()).toBeVisible();
|
||||
await expect(page.getByLabel("Request provider")).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Background" })).toBeVisible();
|
||||
await expect(page.getByRole("radio", { name: "Background" })).toBeVisible();
|
||||
await page.getByLabel("Request prompt").fill("Draft a provider control memo.");
|
||||
await page.getByLabel("Request instructions").fill("Use direct language.");
|
||||
|
||||
|
||||
@@ -55,6 +55,17 @@ test("a dialog keeps the keyboard inside it, closes on Escape, and gives focus b
|
||||
await expect(dialog).toHaveCount(0);
|
||||
// Both layers closed at once; focus still returns to what opened the dialog.
|
||||
await expect(opener).toBeFocused();
|
||||
|
||||
// A one-of choice says which option is chosen, and the arrow keys move the choice.
|
||||
const views = page.getByRole("radiogroup", { name: "View" });
|
||||
await expect(views.getByRole("radio", { name: "Board" })).toHaveAttribute("aria-checked", "true");
|
||||
await views.getByRole("radio", { name: "Board" }).focus();
|
||||
await page.keyboard.press("ArrowRight");
|
||||
await expect(views.getByRole("radio", { name: "List" })).toHaveAttribute("aria-checked", "true");
|
||||
await expect(views.getByRole("radio", { name: "List" })).toBeFocused();
|
||||
await expect(views.getByRole("radio", { name: "Board" })).toHaveAttribute("aria-checked", "false");
|
||||
await page.keyboard.press("Home");
|
||||
await expect(views.getByRole("radio", { name: "Board" })).toHaveAttribute("aria-checked", "true");
|
||||
} finally {
|
||||
await closeApp(app);
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ test("onboarding resumes where it was left after the app is closed", async () =>
|
||||
await expect.poll(savedModel).toBe("cancelled-model");
|
||||
// Saving a preference refreshes the in-memory snapshot, which now holds the draft too.
|
||||
await page.getByRole("button", { name: "Back", exact: true }).click();
|
||||
await page.getByRole("button", { name: "中文" }).click();
|
||||
await page.getByRole("button", { name: "English" }).click();
|
||||
await page.getByRole("radio", { name: "中文" }).click();
|
||||
await page.getByRole("radio", { name: "English" }).click();
|
||||
// Past the 800 ms change-event reload window, so only Cancel itself can refresh the snapshot.
|
||||
await page.waitForTimeout(1_200);
|
||||
await page.getByRole("button", { name: "Cancel" }).click();
|
||||
|
||||
Reference in new issue
Block a user