#302: configurable pond start page, created with every new pond #310
@ -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$`));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user