Skip to content

Commit 3b702db

Browse files
committed
test: update VirtualDriveRootPicker test to use translated button name
1 parent 40d118b commit 3b702db

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/apps/renderer/pages/Settings/General/VirtualDriveRootPicker.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
22
import VirtualDriveRootPicker from './VirtualDriveRootPicker';
33

4+
vi.mock('../../../context/LocalContext', () => ({
5+
useTranslationContext: () => ({ translate: (key: string) => key }),
6+
}));
7+
48
describe('VirtualDriveRootPicker', () => {
59
beforeEach(() => {
610
vi.clearAllMocks();
@@ -26,7 +30,7 @@ describe('VirtualDriveRootPicker', () => {
2630
render(<VirtualDriveRootPicker />);
2731

2832
const changeFolderButton = await screen.findByRole('button', {
29-
name: 'Change',
33+
name: 'settings.general.virtual-drive-root.action',
3034
});
3135

3236
fireEvent.click(changeFolderButton);

0 commit comments

Comments
 (0)