diff --git a/apps/web/e2e/import-vault.spec.ts b/apps/web/e2e/import-vault.spec.ts index d0d05f8..1533f31 100644 --- a/apps/web/e2e/import-vault.spec.ts +++ b/apps/web/e2e/import-vault.spec.ts @@ -93,11 +93,19 @@ test('a pond admin imports an Obsidian vault through the settings dialog', async await expect( mountItem.locator('.sidebar__tree-children .sidebar__page', { hasText: 'Projekte' }), ).toBeVisible(); - await expect(page.locator('.sidebar__page:text-is("Startseite")')).toBeVisible(); + // Scoped to the mount: the pond has its own "Startseite" since issue #302, + // so an unscoped title match now finds two entries. + const importedHome = mountItem + .locator('.sidebar__tree-children .sidebar__page') + .filter({ hasText: /^Startseite$/ }) + .first(); + await expect(importedHome).toBeVisible(); // A rewritten Obsidian link navigates to the right imported page, and the - // display text still reads like the original note name. - await page.goto(`/p/${pond.slug}/startseite`); + // display text still reads like the original note name. Reached through the + // sidebar rather than by slug — `/startseite` belongs to the pond's own + // start page, so the imported note landed on a suffixed slug. + await importedHome.click(); await page.locator('.editor-content a.wikilink', { hasText: 'Projekt A' }).click(); await expect(page).toHaveURL(new RegExp(`/p/${pond.slug}/projekt-a$`));