commit compras1 2911
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-29 05:28:30 +02:00
parent 1ddabbbdcc
commit 448948a487
137 changed files with 9481 additions and 1926 deletions
@@ -29,6 +29,7 @@ function render(
canConfigure = true,
allowedTypes = ['production', 'maintenance'],
linked = false,
selected = false,
) {
return renderToStaticMarkup(
<App
@@ -58,6 +59,7 @@ function render(
data: { mode: 'procurement' },
},
canConfigure,
selectedOrderId: selected ? source.id : null,
allowedTypes,
departments: [{ id: 1, name: 'Synthetic department' }],
orders: {
@@ -78,6 +80,17 @@ function render(
/>,
);
}
test('a selected operational source is directly focusable and provides the return to the complete authorised registry', () => {
const html = render(7, false, [], false, true);
expect(html).toContain('A consultar uma ordem específica');
expect(html).toContain('href="/ordens-operacionais"');
expect(html).toContain('Ver todas as ordens disponíveis');
expect(html).toContain('id="op-order-5"');
expect(html).toContain('tabindex="-1"');
expect(html).toContain('lg:scroll-mt-72');
expect(html).not.toContain('<script>private-test</script>');
});
test('order preparation restores only its actor context and policy without automatic creation', () => {
const identity =
'procurement-preparations:4:7:procurement.internal:procurement,requester:operational-orders:1:1:production,maintenance:true:0:false';