The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
test(studio): the assistant panel waits for its lazy chat as long as a busy runner needs
Maurice338548bf7f61
diff --git a/client/src/components/Studio/StudioAssistantPanel.test.tsx b/client/src/components/Studio/StudioAssistantPanel.test.tsxindex 42c8dcc48..95c4f2b36 100644--- a/client/src/components/Studio/StudioAssistantPanel.test.tsx+++ b/client/src/components/Studio/StudioAssistantPanel.test.tsx@@ -22,6 +22,8 @@ import { chatOf, useAssistantStore } from '../../store/assistantStore';import StudioAssistantPanel, { StudioAssistantColumn, StudioAssistantToggle } from './StudioAssistantPanel';import type { StudioAssistant } from './useStudioAssistant';+/** The assistant's surface is loaded lazily, which can outlast findBy's default second on CI. */+const LAZY = { timeout: 10_000 };const JOURNEY = 12;const KEY = assistantChatKey({ kind: 'journey', journeyId: JOURNEY });const INITIAL = useAssistantStore.getState();@@ -75,7 +77,8 @@ describe('StudioAssistantPanel', () => {render(<StudioAssistantPanel assistant={assistant()} title="Lisbon" />);expect(screen.getByRole('complementary', { name: 'Book assistant' })).toBeInTheDocument();- expect(await screen.findByText('What should the book look like?')).toBeInTheDocument();+ // The chat is a lazy chunk; on a busy runner it can take longer than findBy's default second.+ expect(await screen.findByText('What should the book look like?', undefined, LAZY)).toBeInTheDocument();const notice = screen.getByRole('note');expect(notice.textContent).toContain('Only that page goes to Anthropic');@@ -97,7 +100,8 @@ describe('StudioAssistantPanel', () => {useAssistantStore.setState({ status: { ...STATUS, studioImagesAcked: true } });render(<StudioAssistantPanel assistant={assistant()} title="Lisbon" />);- expect(await screen.findByText('What should the book look like?')).toBeInTheDocument();+ // The chat is a lazy chunk; on a busy runner it can take longer than findBy's default second.+ expect(await screen.findByText('What should the book look like?', undefined, LAZY)).toBeInTheDocument();expect(screen.queryByRole('note')).toBeNull();});@@ -144,7 +148,8 @@ describe('StudioAssistantPanel', () => {it('FE-STUDIO-ASTPANEL-005: the journey chat offers no trip notes, which only a trip turn reads', async () => {render(<StudioAssistantPanel assistant={assistant()} title="Lisbon" />);- expect(await screen.findByText('What should the book look like?')).toBeInTheDocument();+ // The chat is a lazy chunk; on a busy runner it can take longer than findBy's default second.+ expect(await screen.findByText('What should the book look like?', undefined, LAZY)).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Recent chats' })).toBeInTheDocument();expect(screen.queryByRole('button', { name: 'Trip notes' })).toBeNull();});@@ -175,7 +180,8 @@ describe('StudioAssistantPanel', () => {});render(<StudioAssistantPanel assistant={assistant()} title="Lisbon" />);- expect(await screen.findByText('What should the book look like?')).toBeInTheDocument();+ // The chat is a lazy chunk; on a busy runner it can take longer than findBy's default second.+ expect(await screen.findByText('What should the book look like?', undefined, LAZY)).toBeInTheDocument();expect(screen.queryByRole('note')).toBeNull();expect(screen.queryByRole('button', { name: 'Show it pages' })).toBeNull();});@@ -207,7 +213,8 @@ describe('StudioAssistantPanel', () => {render(<StudioAssistantColumn assistant={assistant()} />);expect(screen.getByRole('complementary', { name: 'Book assistant' })).toBeInTheDocument();- expect(await screen.findByText('What should the book look like?')).toBeInTheDocument();+ // The chat is a lazy chunk; on a busy runner it can take longer than findBy's default second.+ expect(await screen.findByText('What should the book look like?', undefined, LAZY)).toBeInTheDocument();expect(screen.getByRole('heading', { name: 'Journey' })).toBeInTheDocument();});});