Preservar a oportunidade durante o registo e preparacao do perfil

This commit is contained in:
2026-10-30 21:22:40 +02:00
parent f5f5649cfc
commit 86b31f2840
8 changed files with 184 additions and 16 deletions
+28
View File
@@ -135,3 +135,31 @@ test('candidate profile renders geography and retained version without internal
expect(html).not.toContain('Aprovar');
expect(html).not.toContain('/pessoas');
});
test('a newly registered candidate can resume the selected opportunity after preparing the profile without automatic submission', () => {
const initialPage = {
...page,
component: 'candidate/profile',
props: {
...page.props,
companyId: 1,
email: 'new@example.invalid',
selectedOpportunity: { id: 7, title: 'Serviço escolhido' },
profile: {
version: 0,
data: {
name: '',
phone: '',
summary: '',
availability: { province: '', district: '', locality: '' },
},
},
},
};
const html = renderToString(
<App initialPage={initialPage} initialComponent={Profile} />,
);
expect(html).toContain('Serviço escolhido');
expect(html).toContain('/candidaturas/1/oportunidades/7');
expect(html).toContain('A candidatura só será enviada quando confirmar');
});