Use supported Testing Library role options in transfer tests

Remove the three Playwright-only exact options from DOM Testing Library queries. String role names already match exactly there; the controls, assertions and runtime bytes are unchanged. The full registered suite passed before TypeScript identified this test-only API mismatch.

Contract-Neutral: Test-only query option correction; no runtime or subsystem contract change.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-25 11:53:12 +00:00
parent cebe1ae356
commit 6bbc3815a0
@@ -159,7 +159,6 @@ describe('BackupTransferDialogs', () => {
fireEvent.click(
within(dialog).getByRole('button', {
name: kind === 'import' ? 'Import' : 'Export',
exact: true,
}),
);
await waitFor(() => expect(flow.isTransferring()).toBe(false));
@@ -192,7 +191,7 @@ describe('BackupTransferDialogs', () => {
const fetchMock = vi.fn().mockResolvedValue(new Response('{}'));
vi.stubGlobal('fetch', fetchMock);
const flow = renderFlow('import', true);
fireEvent.click(screen.getByRole('button', { name: 'Import', exact: true }));
fireEvent.click(screen.getByRole('button', { name: 'Import' }));
const prompt = await screen.findByRole('dialog', { name: 'API token required' });
fireEvent.input(within(prompt).getByLabelText('API Token'), { target: { value: ' ' } });
fireEvent.click(within(prompt).getByRole('button', { name: 'Authenticate' }));
@@ -225,7 +224,7 @@ describe('BackupTransferDialogs', () => {
);
vi.stubGlobal('fetch', fetchMock);
renderFlow();
fireEvent.click(screen.getByRole('button', { name: 'Import', exact: true }));
fireEvent.click(screen.getByRole('button', { name: 'Import' }));
const prompt = await screen.findByRole('dialog', { name: 'API token required' });
expect(within(prompt).getByRole('alert')).toHaveTextContent('Import was not confirmed');
expect(document.querySelectorAll('[role=alert]')).toHaveLength(1);