mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-23 20:42:02 +00:00
test(ui): await recent-chats render in lighthouse panel chat test (#12096)
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com>
This commit is contained in:
committed by
GitHub
parent
2f6aedf291
commit
9f5ef80e69
@@ -170,11 +170,12 @@ describe("LighthousePanelChat", () => {
|
||||
// When
|
||||
render(<LighthousePanelChat />);
|
||||
|
||||
// Then: composer is live and the empty state lists recent chats
|
||||
// Then: composer is live and the empty state lists recent chats.
|
||||
// Sessions load on a later render than the composer, so await them.
|
||||
expect(
|
||||
await screen.findByRole("textbox", { name: "Message" }),
|
||||
).toBeInTheDocument();
|
||||
expect(screen.getByText("Recent chats")).toBeInTheDocument();
|
||||
expect(await screen.findByText("Recent chats")).toBeInTheDocument();
|
||||
expect(
|
||||
await screen.findByText("Counting critical findings"),
|
||||
).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user