diff --git a/tests/e2e/pr11346-selected-runtime-add.spec.ts b/tests/e2e/pr11346-selected-runtime-add.spec.ts index 6225f13c623..2cdd63954af 100644 --- a/tests/e2e/pr11346-selected-runtime-add.spec.ts +++ b/tests/e2e/pr11346-selected-runtime-add.spec.ts @@ -727,7 +727,12 @@ async function runSelectedRuntimeAddJourney( ...fixture.nestedRepoPaths.map((repoPath) => path.basename(repoPath)) ]) { // Why: duplicate checkout names are disambiguated with a parent path. - await expect(client.page.getByText(projectName, { exact: false }).first()).toBeVisible() + await expect( + client.page + .getByRole('listbox', { name: 'Worktrees', exact: true }) + .getByText(projectName, { exact: false }) + .first() + ).toBeVisible() } expect(await client.getDirectSshAttemptTargetIds()).toEqual([]) // Why: revealing the client must not leak into the HUB's window visibility.