Skip to content

Commit 41a7ed8

Browse files
committed
Merge main navigation test migration
Signed-off-by: Arjun Mahanti <[email protected]>
2 parents 6b66966 + bfe4c7f commit 41a7ed8

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎src/app/entity-navigation.test.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import { afterEach, beforeEach, expect, it, vi } from "vitest";
1515
import { finalizeEvent, getPublicKey } from "nostr-tools";
1616
import { App } from "./App";
1717
import { createServices, type AppServices } from "./services";
18-
import type { OpenTarget } from "../features/navigation/targets";
18+
import {
19+
parseOpenTarget,
20+
type OpenTarget,
21+
} from "../features/navigation/targets";
1922
import { bindDeepLinks } from "../features/navigation/deep-links";
2023
import { matchesEvent } from "../features/relay/projection";
2124
import type { ReadFilter } from "../features/relay/events";
@@ -379,7 +382,7 @@ function legacyPageFixture() {
379382
}
380383

381384
it.each(["Inbox", "Bestie"])(
382-
"normalizes old %s targets in the same visit and caller, retaining scope",
385+
"normalizes old %s links in the same visit and caller, retaining scope",
383386
async (name) => {
384387
const current = legacyPageFixture();
385388
await screen.findByRole("navigation", { name: "Pages" });
@@ -408,10 +411,11 @@ it.each(["Inbox", "Bestie"])(
408411
route: { version: 1, params: name },
409412
...(scope !== undefined ? { scope } : {}),
410413
};
414+
const bound = parseOpenTarget(old);
411415
let visit = "";
412416
let result!: ReturnType<typeof current.navigation.open>;
413417
act(() => {
414-
result = current.navigation.open(old);
418+
result = current.navigation.open(bound);
415419
visit = current.navigation.snapshot().entry.id;
416420
});
417421
await waitFor(() =>

0 commit comments

Comments
 (0)