Mostrar oportunidades publicadas antes do registo de candidatos
This commit is contained in:
@@ -62,6 +62,44 @@ test.each([true, false])(
|
||||
expect(html).not.toContain('/dashboard');
|
||||
},
|
||||
);
|
||||
test('public entry shows published opportunities and pagination while keeping application behind candidate login', () => {
|
||||
const initialPage = {
|
||||
...page,
|
||||
props: {
|
||||
...page.props,
|
||||
company: { id: 1, name: 'Empresa fictícia' },
|
||||
portal: {
|
||||
version: 1,
|
||||
registration_open: false,
|
||||
notice: 'Aviso fictício.',
|
||||
},
|
||||
opportunities: {
|
||||
data: [
|
||||
{
|
||||
id: 7,
|
||||
title: 'Serviço publicado',
|
||||
kind: 'service',
|
||||
closes_on: '2026-11-10',
|
||||
description: 'Descrição pública do serviço.',
|
||||
},
|
||||
],
|
||||
prev_page_url: null,
|
||||
next_page_url: '/candidaturas/1?opportunities_page=2',
|
||||
},
|
||||
},
|
||||
};
|
||||
const html = renderToString(
|
||||
<App initialPage={initialPage} initialComponent={Entry} />,
|
||||
);
|
||||
expect(html).toContain('Serviço publicado');
|
||||
expect(html).toContain('Descrição pública do serviço.');
|
||||
expect(html).toContain('Prestação de serviços');
|
||||
expect(html).toContain('href="#candidate-login"');
|
||||
expect(html).toContain('/candidaturas/1?opportunities_page=2');
|
||||
expect(html).not.toContain('/oportunidades/7');
|
||||
expect(html).not.toContain('anexos ainda está em desenvolvimento');
|
||||
});
|
||||
|
||||
test('candidate profile renders geography and retained version without internal evaluation controls', () => {
|
||||
const initialPage = {
|
||||
...page,
|
||||
|
||||
Reference in New Issue
Block a user