@@ -65,6 +65,28 @@ test('read-only capital register preserves archived identity and history without
|
||||
expect(html).toContain('Histórico do registo');
|
||||
expect(html).toContain('<script>QA</script>');
|
||||
expect(html).not.toContain('<form');
|
||||
expect(html).not.toContain('href="#capital-preparation"');
|
||||
expect(html).toContain('?history=source#capital-history');
|
||||
expect(html).toContain('id="capital-history"');
|
||||
});
|
||||
|
||||
test('capital editor links land on a focusable preparation without submitting or changing the original', () => {
|
||||
const html = render(CapitalRegister, {
|
||||
records: page([source]),
|
||||
history: null,
|
||||
departments: [],
|
||||
equipment: [],
|
||||
canManage: true,
|
||||
actorId: 1,
|
||||
tenantId: 1,
|
||||
});
|
||||
expect(html.match(/href="#capital-preparation"/g)).toHaveLength(2);
|
||||
expect(html).toMatch(
|
||||
/<section[^>]*id="capital-preparation"[^>]*tabindex="-1"/,
|
||||
);
|
||||
expect(html).toContain('Preparar nova versão');
|
||||
expect(html).toContain('PRJ-QA');
|
||||
expect(html).not.toContain('id="capital-history"');
|
||||
});
|
||||
test('approved requisitions display the preserved source independently of available new choices', () => {
|
||||
const html = render(CapitalAssignments, {
|
||||
|
||||
Reference in New Issue
Block a user