@@ -1133,7 +1133,10 @@ test("the location dialog separates added projects from server projects and tags |
1133 | 1133 | const rows = options.filter({ has: page.locator(".new-session-location-name") }) |
1134 | 1134 | const names = options.locator(".new-session-location-name") |
1135 | 1135 | const paths = options.locator(".command-palette-description") |
1136 | | - const back = dialog.getByRole("button", { name: "Back to projects", exact: true }) |
| 1136 | + const back = dialog.locator(".new-session-location-back") |
| 1137 | + const arrow = dialog.locator(".new-session-location-search-back") |
| 1138 | + const leading = dialog.locator("[data-slot='text-input-v2-leading-icon']") |
| 1139 | + const input = dialog.locator("[data-slot='text-input-v2-input']") |
1137 | 1140 | // Only the projects added to this client open expanded; other ready-server projects remain discoverable. |
1138 | 1141 | await expect(names).toHaveText(["opencodeapollo", "opencode"]) |
1139 | 1142 | await expect(paths).toHaveText(["/home/dax/opencode", "C:/work/opencode"]) |
@@ -1150,8 +1153,8 @@ test("the location dialog separates added projects from server projects and tags |
1150 | 1153 | // It opens on the first row, not on the draft's current project (the second row). |
1151 | 1154 | await expect(options.nth(0)).toHaveAttribute("aria-selected", "true") |
1152 | 1155 |
|
1153 | | - // The picker shares the palette's full-width search, compact rows, and single-line titles. |
1154 | | - await expect(options.nth(0)).toHaveCSS("height", "28px") |
| 1156 | + // The picker shares the palette's full-width search, 32px rows, and single-line titles. |
| 1157 | + await expect(options.nth(0)).toHaveCSS("height", "32px") |
1155 | 1158 | await expect(dialog.locator(".palette-menu-search [data-component='text-input-v2']")).toHaveCSS("height", "28px") |
1156 | 1159 | await expect(dialog.locator(".new-session-location-hints")).toHaveCount(0) |
1157 | 1160 | await expect(dialog.locator("..")).toHaveCSS("width", "720px") |
@@ -1174,12 +1177,23 @@ test("the location dialog separates added projects from server projects and tags |
1174 | 1177 | }) |
1175 | 1178 | .toBeLessThanOrEqual(1) |
1176 | 1179 |
|
| 1180 | + await expect(arrow).toHaveCount(0) |
| 1181 | + const leadingBox = await leading.boundingBox() |
| 1182 | + const inputBox = await input.boundingBox() |
| 1183 | + await others.click() |
| 1184 | + await expect(names).toHaveText(["console", "sstapollo"]) |
| 1185 | + await expect(back).toHaveCount(0) |
| 1186 | + await expect(arrow).toBeVisible() |
| 1187 | + await expect(search).toHaveAttribute("placeholder", "Search other projects") |
| 1188 | + expect(await leading.boundingBox()).toEqual(leadingBox) |
| 1189 | + expect(await input.boundingBox()).toEqual(inputBox) |
| 1190 | + await arrow.click() |
| 1191 | + await expect(names).toHaveText(["opencodeapollo", "opencode"]) |
| 1192 | + await expect(search).toBeFocused() |
1177 | 1193 | await others.click() |
1178 | 1194 | await expect(names).toHaveText(["console", "sstapollo"]) |
1179 | | - await expect(back).toHaveText("Other projects") |
1180 | 1195 | await search.fill("no-project-matches") |
1181 | 1196 | await expect(options).toHaveCount(0) |
1182 | | - await expect(back).toBeVisible() |
1183 | 1197 | await search.fill("") |
1184 | 1198 | await expect(names).toHaveText(["console", "sstapollo"]) |
1185 | 1199 | await search.press("ArrowLeft") |
@@ -1191,9 +1205,6 @@ test("the location dialog separates added projects from server projects and tags |
1191 | 1205 | await expect(names).toHaveText(["console", "sstapollo"]) |
1192 | 1206 | await search.press("Escape") |
1193 | 1207 | await expect(names).toHaveText(["opencodeapollo", "opencode"]) |
1194 | | - await others.click() |
1195 | | - await back.click() |
1196 | | - await expect(names).toHaveText(["opencodeapollo", "opencode"]) |
1197 | 1208 |
|
1198 | 1209 | await search.fill("apollo") |
1199 | 1210 | await expect(names).toHaveText(["opencodeapollo", "sstapollo"]) |
@@ -1225,7 +1236,8 @@ test("the location dialog separates added projects from server projects and tags |
1225 | 1236 | const open = (await page.evaluate(() => navigator.platform.includes("Mac"))) ? "Meta+o" : "Control+o" |
1226 | 1237 | await search.fill("open") |
1227 | 1238 | await page.keyboard.press(open) |
1228 | | - await expect(back).toHaveText("Servers") |
| 1239 | + await expect(back).toHaveCount(0) |
| 1240 | + await expect(search).toHaveAttribute("placeholder", "Search servers") |
1229 | 1241 | await expect(search).toHaveValue("") |
1230 | 1242 | await page.keyboard.press("Escape") |
1231 | 1243 | await expect(back).toHaveText("Run session in") |
@@ -1249,10 +1261,10 @@ test("the location dialog separates added projects from server projects and tags |
1249 | 1261 | await page.keyboard.press("ArrowUp") |
1250 | 1262 | await expect(options.nth(3)).toHaveAttribute("aria-selected", "true") |
1251 | 1263 | await page.keyboard.press(open) |
1252 | | - await expect(back).toHaveText("Servers") |
| 1264 | + await expect(back).toHaveCount(0) |
1253 | 1265 | // The server the app runs beside shows its hostname and "This computer" instead of its address. |
1254 | 1266 | await expect(options).toHaveText(["hailmaryThis computer", "apollo"]) |
1255 | | - await back.click() |
| 1267 | + await search.press("Escape") |
1256 | 1268 | await options.filter({ hasText: "Add project" }).click() |
1257 | 1269 | await expect(options).toHaveText(["hailmaryThis computer", "apollo"]) |
1258 | 1270 | await options.filter({ hasText: "apollo" }).click() |
|