feat(ui): add A1 dashboard and resumable onboarding
This commit is contained in:
@@ -30,6 +30,21 @@ beforeEach(() => {
|
||||
mockedApi.put.mockImplementation((_url: string, body: any) => { layout = { ...body, revision: body.revision + 1 }; return Promise.resolve({ data: layout }) as any; });
|
||||
});
|
||||
|
||||
test('A1 week glance shows recorded upcoming dates from attention data without inventing missing dates', async () => {
|
||||
const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
const deadline = `${tomorrow.getFullYear()}-${String(tomorrow.getMonth() + 1).padStart(2, '0')}-${String(tomorrow.getDate()).padStart(2, '0')}`;
|
||||
const jobs = [
|
||||
{ id: 91, jobTitle: 'School vacancy', company: { name: 'Linden School' }, deadline },
|
||||
{ id: 92, jobTitle: 'No recorded date', company: { name: 'Care centre' }, deadline: 'as soon as possible' },
|
||||
];
|
||||
mockedApi.get.mockImplementation((url: string) => Promise.resolve({ data: url.endsWith('/reminders') ? jobs : data(url) }) as any);
|
||||
open();
|
||||
const week = await screen.findByRole('region', { name: 'Your week' });
|
||||
expect(within(week).getByText('School vacancy')).toBeVisible();
|
||||
expect(within(week).queryByText('No recorded date')).not.toBeInTheDocument();
|
||||
expect(within(week).getByRole('link', { name: /School vacancy/ })).toHaveAttribute('href', '/jobs/91');
|
||||
});
|
||||
|
||||
test('[PRES-S01] exact monthly values, sample, custom statuses and separate salary group remain readable', async () => {
|
||||
open();
|
||||
expect(await screen.findByText('Tracked jobs')).toBeVisible();
|
||||
@@ -41,7 +56,7 @@ test('[PRES-S01] exact monthly values, sample, custom statuses and separate sala
|
||||
expect(within(table).getByRole('row', { name: 'September 2026 2 1' })).toBeVisible();
|
||||
expect(screen.getByText('Faglig vurdering')).toBeInTheDocument();
|
||||
expect(screen.getByText(/NOK.*2 jobs/)).toBeInTheDocument();
|
||||
expect(screen.queryByText(/upcoming|conversion funnel|active applications/i)).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/upcoming interviews|conversion funnel|active applications/i)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('[PRES-S02] all widget visibility choices save and survive remount', async () => {
|
||||
|
||||
Reference in New Issue
Block a user