@@ -29,11 +29,35 @@ test.each(Object.entries(fixtures))(
|
||||
const html = renderToString(
|
||||
<App initialPage={initialPage} initialComponent={Component} />,
|
||||
);
|
||||
expect(html).toContain('Consulta pública de desenvolvimento');
|
||||
expect(html).toContain('Consulta pública');
|
||||
expect(html).toContain('Consulta pública sem sessão');
|
||||
expect(html).toContain('Entrar na aplicação');
|
||||
expect(html).toContain('href="/login"');
|
||||
expect(html).not.toContain('Consulta pública de desenvolvimento');
|
||||
expect(html).not.toContain('/consulta?');
|
||||
expect(html).toContain('/dashboard');
|
||||
},
|
||||
);
|
||||
|
||||
test('product entry presents six areas and directs work to the application login', () => {
|
||||
const Home = modules['../../resources/js/pages/home.tsx'].default;
|
||||
const initialPage = { ...Object.values(fixtures)[0], component: 'home' };
|
||||
const html = renderToString(
|
||||
<App initialPage={initialPage} initialComponent={Home} />,
|
||||
);
|
||||
for (const title of [
|
||||
'Pedidos e aprovações',
|
||||
'Fornecedores e compras',
|
||||
'Recepção e armazém',
|
||||
'Orçamento e finanças',
|
||||
'Importações',
|
||||
'Pessoas e contratações',
|
||||
]) {
|
||||
expect(html).toContain(title);
|
||||
}
|
||||
expect(html).toContain('href="/login"');
|
||||
expect(html).not.toContain('href="/consulta');
|
||||
});
|
||||
test('public menu links only to the explicit public screens and never grants a staff role', () => {
|
||||
const paths = (
|
||||
fixtures.dashboard.props.publicNavigation as { paths: string[] }
|
||||
|
||||
Reference in New Issue
Block a user