"""The nav's search box reaching the search page. Ranking and matching are covered by unit tests against a real FTS5 index; what only a browser shows is that the box in the nav goes somewhere. """ from playwright.sync_api import expect from helpers import Actor def test_searching_from_the_nav_finds_a_mod(actor: Actor): actor.login() actor.create_mod("master-quest", title="Master Quest") actor.page.goto(f"{actor.app_url}/") actor.page.get_by_placeholder("Search").fill("master") actor.page.get_by_placeholder("Search").press("Enter") expect(actor.page).to_have_url(f"{actor.app_url}/search?q=master") result = actor.page.get_by_role("link", name="Master Quest") expect(result).to_be_visible() result.click() expect(actor.page).to_have_url(f"{actor.app_url}/{actor.handle}/master-quest")