splitting unit + integration testing apart attempt #1
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 3m44s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 3m44s
This commit is contained in:
@@ -27,7 +27,7 @@ describe('AnalysisPanel', () => {
|
||||
mockedAiApiClient.getQuickInsights.mockReset();
|
||||
mockedAiApiClient.getDeepDiveAnalysis.mockReset();
|
||||
mockedAiApiClient.searchWeb.mockReset();
|
||||
mockedAiApiClient.planTripWithMaps.mockReset(); // Corrected function name
|
||||
mockedAiApiClient.planTripWithMaps.mockReset();
|
||||
mockedAiApiClient.generateImageFromText.mockReset();
|
||||
|
||||
// Mock Geolocation API
|
||||
@@ -66,7 +66,6 @@ describe('AnalysisPanel', () => {
|
||||
|
||||
it('should switch tabs and update the generate button text', () => {
|
||||
render(<AnalysisPanel flyerItems={mockFlyerItems} store={mockStore} />);
|
||||
// The tab elements now correctly have the role 'tab', not 'button'.
|
||||
fireEvent.click(screen.getByRole('tab', { name: /deep dive/i }));
|
||||
expect(screen.getByRole('button', { name: /generate deep dive/i })).toBeInTheDocument();
|
||||
});
|
||||
@@ -152,7 +151,7 @@ describe('AnalysisPanel', () => {
|
||||
// It does not display a specific error message in the UI in this case.
|
||||
// The test should verify that no result is displayed and no API call is made.
|
||||
await waitFor(() => {
|
||||
expect(mockedAiApiClient.planTripWithMaps).not.toHaveBeenCalled(); // Corrected function name
|
||||
expect(mockedAiApiClient.planTripWithMaps).not.toHaveBeenCalled();
|
||||
expect(screen.queryByText(/Please allow location access/i)).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user