Skip to content

Commit

Permalink
fix: Fixed account profile tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Nov 7, 2023
1 parent 1bebff5 commit 1ec7a04
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/account/components/AccountProfile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,15 @@ test('AccountProfile: Save language', async () => {

expect(screen.getByText('English')).toBeInTheDocument();
await act(async () =>
fireEvent.mouseDown(screen.getByRole('button', { name: /English/i }))
fireEvent.mouseDown(screen.getByRole('combobox', { name: /English/i }))
);
const listbox = within(screen.getByRole('listbox'));
await act(async () =>
fireEvent.click(listbox.getByRole('option', { name: /Español/i }))
);
expect(screen.getByRole('button', { name: /Español/i })).toBeInTheDocument();
expect(
screen.getByRole('combobox', { name: /Español/i })
).toBeInTheDocument();

await act(async () =>
fireEvent.click(screen.getByRole('button', { name: 'Save Profile' }))
Expand Down

0 comments on commit 1ec7a04

Please sign in to comment.