test(frontend): follow dedicated job routes
This commit is contained in:
@@ -169,6 +169,7 @@ function renderLoop(initialPath: string) {
|
||||
<Route path="/dashboard" element={<DashboardView />} />
|
||||
<Route path="/reminders" element={<RemindersView />} />
|
||||
<Route path="/jobs" element={<JobTable refreshToken={0} pageSize={15} onPageSizeChange={() => {}} columns={{ status: true, dateApplied: true, daysSince: true, jobUrl: false }} onColumnsChange={() => {}} mode="jobs" />} />
|
||||
<Route path="/jobs/:id" element={<div data-testid="application-workspace" />} />
|
||||
</Routes>
|
||||
</MemoryRouter>
|
||||
</PromptProvider>
|
||||
@@ -193,8 +194,8 @@ test('dashboard attention card opens follow-up workspace', async () => {
|
||||
expect(await screen.findByText(/needs follow-up/i)).toBeInTheDocument();
|
||||
fireEvent.click(await screen.findByRole('button', { name: /follow up/i }));
|
||||
|
||||
expect(await screen.findByText(/follow-up context/i)).toBeInTheDocument();
|
||||
expect(await screen.findByText(/saved cover letter available/i)).toBeInTheDocument();
|
||||
await waitFor(() => expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs/42?section=communication&followMode=waiting-update'));
|
||||
expect(screen.getByTestId('application-workspace')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('reminders open action routes tailored-cv gaps into the tailored cv workspace', async () => {
|
||||
@@ -206,10 +207,8 @@ test('reminders open action routes tailored-cv gaps into the tailored cv workspa
|
||||
expect(platformCard).toBeTruthy();
|
||||
fireEvent.click(within(platformCard as HTMLElement).getByRole('button', { name: /build package/i }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs');
|
||||
});
|
||||
expect(await screen.findByText(/saved working material/i)).toBeInTheDocument();
|
||||
await waitFor(() => expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs/43?section=cv'));
|
||||
expect(screen.getByTestId('application-workspace')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('job table urgency signals and next actions route into the shared workspace flow', async () => {
|
||||
@@ -217,20 +216,14 @@ test('job table urgency signals and next actions route into the shared workspace
|
||||
|
||||
fireEvent.click(await screen.findByRole('button', { name: /backend developer — follow up signal/i }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs');
|
||||
});
|
||||
expect(await screen.findByText(/follow-up context/i)).toBeInTheDocument();
|
||||
expect(await screen.findByText(/saved cover letter available/i)).toBeInTheDocument();
|
||||
await waitFor(() => expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs/42?section=communication&followMode=waiting-update'));
|
||||
expect(screen.getByTestId('application-workspace')).toBeInTheDocument();
|
||||
|
||||
firstRender.unmount();
|
||||
renderLoop('/jobs');
|
||||
|
||||
fireEvent.click(await screen.findByRole('button', { name: /next action: platform engineer — build package/i }));
|
||||
fireEvent.click(await screen.findByRole('button', { name: /platform engineer.*build package signal/i }));
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs');
|
||||
});
|
||||
expect(await screen.findByText(/saved working material/i)).toBeInTheDocument();
|
||||
expect(await screen.findByText(/platform work/i)).toBeInTheDocument();
|
||||
await waitFor(() => expect(screen.getByTestId('location-indicator')).toHaveTextContent('/jobs/43?section=cv'));
|
||||
expect(screen.getByTestId('application-workspace')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user