test(app): align new tab launcher expectations

This commit is contained in:
Mohamed Boudra
2026-08-22 23:32:05 +02:00
parent c998b24c5f
commit fc214b20f1
3 changed files with 11 additions and 7 deletions
@@ -50,7 +50,7 @@ test.describe("New tab keyboard launcher", () => {
}
});
test("a new split pane focuses its launcher and wraps arrow navigation", async ({ page }) => {
test("a new split pane focuses its launcher and supports arrow navigation", async ({ page }) => {
const workspace = await seedWorkspace({ repoPrefix: "empty-pane-split-keyboard-" });
try {
@@ -60,8 +60,12 @@ test.describe("New tab keyboard launcher", () => {
const launcher = visibleNewTabPanel(page);
await expect(launcher).toBeVisible({ timeout: 30_000 });
await expectLauncherSelection(launcher, "Changes");
await expectLauncherSelection(launcher, "Agent");
await page.keyboard.press("ArrowDown");
await expectLauncherSelection(launcher, "Terminal");
await page.keyboard.press("ArrowDown");
await expectLauncherSelection(launcher, "Changes");
await page.keyboard.press("ArrowDown");
await expectLauncherSelection(launcher, "Files");
await page.keyboard.press("Enter");
@@ -172,16 +172,16 @@ test.describe("Tab creation", () => {
await expect(terminal).toContainText(new RegExp(`${shortcutPrefix.source}.*T`));
await expect(changes).toContainText(new RegExp(`${shortcutPrefix.source}.*G`));
await expect(files).toContainText(new RegExp(`${shortcutPrefix.source}.*E`));
await expect(changes).toBeFocused();
await expect(agent).toBeFocused();
await page.keyboard.press("ArrowDown");
await expect(files).toBeFocused();
await expect(terminal).toBeFocused();
await page.keyboard.press("ArrowUp");
await expect(changes).toBeFocused();
await expect(agent).toBeFocused();
await page.locator("body").click({ position: { x: 1, y: 1 } });
await panel.click({ position: { x: 20, y: 20 } });
await expect(changes).toBeFocused();
await expect(agent).toBeFocused();
});
test("clicking new agent tab creates a draft tab", async ({ page }) => {
+1 -1
View File
@@ -68,8 +68,8 @@ test.describe("Side panel", () => {
expect((await launcherButtonLabels(launcher)).slice(0, 4)).toEqual([
"Changes",
"Files",
"Agent",
"Terminal",
"Agent",
]);
await expect(page.getByTestId("workspace-tab-working_diff")).toHaveCount(0);
await capture(page, testInfo, "01-side-panel-reveals-empty");