Skip to content

Commit

Permalink
updated the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Muppasanipraneeth committed Jan 6, 2025
1 parent 5499c03 commit bf601e2
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ describe(`Change Language Modal`, () => {
it('should correctly displays all allowed locales', () => {
render(<ChangeLanguageModal close={jest.fn()} />);

expect(screen.getByRole('radio', { name: /English/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /Français/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /Italiano/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /Português/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /english/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /français/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /italiano/i })).toBeInTheDocument();
expect(screen.getByRole('radio', { name: /português/i })).toBeInTheDocument();
});

it('should close the modal when the cancel button is clicked', async () => {
Expand All @@ -55,9 +55,9 @@ describe(`Change Language Modal`, () => {

render(<ChangeLanguageModal close={jest.fn()} />);

expect(screen.getByRole('radio', { name: /Français/ })).toBeChecked();
expect(screen.getByRole('radio', { name: /français/i })).toBeChecked();

await user.click(screen.getByRole('radio', { name: /English/i }));
await user.click(screen.getByRole('radio', { name: /english/i }));
await user.click(screen.getByRole('button', { name: /change/i }));

expect(mockPostUserPropertiesOnline).toHaveBeenCalledWith(
Expand Down

0 comments on commit bf601e2

Please sign in to comment.