diff --git a/src/components/PageHeader/ItemPage.astro b/src/components/PageHeader/ItemPage.astro index 6213d90494..96c8481678 100644 --- a/src/components/PageHeader/ItemPage.astro +++ b/src/components/PageHeader/ItemPage.astro @@ -19,7 +19,7 @@ if (titleAuthor) { } --- -
+ No matching references found. +
+ ); + } + + return filteredCategoryData.map((category) => (Controls the media volume for video playback.
", + }, + }, + ], + }, + ], + }, + { + name: "p5.Graphics", + subcats: [ + { + name: "misc", + entries: [ + { + id: "3", + slug: "alpha", + body: "", + collection: "reference", + data: { + module: "Shape", + submodule: "misc", + file: "alpha.mdx", + line: 1, + deprecated: "", + params: [], + path: "p5/alpha", + title: "alpha()", + description: "No matching term here.
", + }, + }, + ], + }, + ], + }, + ]} + />, + ); + + const searchInput = screen.getByLabelText("Search references"); + + expect(screen.getByText("p5.MediaElement")).toBeTruthy(); + expect(screen.getByText("p5.Graphics")).toBeTruthy(); + expect(screen.getByText("video")).toBeTruthy(); + expect(screen.getByText("audio")).toBeTruthy(); + + fireEvent.input(searchInput, { target: { value: "VIDEO" } }); + + expect(screen.getByText("p5.MediaElement")).toBeTruthy(); + expect(screen.queryByText("p5.Graphics")).toBeNull(); + expect(screen.getByText("video")).toBeTruthy(); + expect(screen.getByText("audio")).toBeTruthy(); + expect(screen.getByText("createVideo()")).toBeTruthy(); + expect(screen.getByText("volume()")).toBeTruthy(); + expect(screen.queryByText("alpha()")).toBeNull(); + + cleanup(); + }); +}); \ No newline at end of file