From 6bbc3815a060e230e01aff1c693cbfd7bf616ade Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Sun, 25 Oct 2026 11:53:12 +0000 Subject: [PATCH] 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 --- .../Settings/__tests__/BackupTransferDialogs.test.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx b/frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx index 05b17e310f..3b543efbb5 100644 --- a/frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx +++ b/frontend-modern/src/components/Settings/__tests__/BackupTransferDialogs.test.tsx @@ -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);