Skip to content

Commit

Permalink
Fix FeatureSelectionWidgetUI tests, due to some changes in the render…
Browse files Browse the repository at this point in the history
…ing details
  • Loading branch information
VictorVelarde committed Oct 20, 2022
1 parent efc7730 commit ccb6237
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ describe('FeatureSelectionWidgetUI', () => {
expect(onEnabledChange).toHaveBeenCalledWith(false);
});

test('selectionModes and editModes are rendered correctly in modes menu', () => {
test('selectionModes and editModes are rendered correctly in modes menu', async () => {
const rendered = render(<CommonFeatureSelectionWidgetUI />);
const menuBtn = rendered.getByTitle('Select a mode');
const menuBtn = await rendered.findByLabelText('Select a mode');
// Open menu
fireEvent.click(menuBtn);
// Once the menu is opened, check everything is okey rendered
Expand All @@ -90,13 +90,13 @@ describe('FeatureSelectionWidgetUI', () => {
);
});

test('select mode event is correctly raised', () => {
test('select mode event is correctly raised', async () => {
const onSelectMode = jest.fn();
const rendered = render(
<CommonFeatureSelectionWidgetUI onSelectMode={onSelectMode} />
);

const menuBtn = rendered.getByTitle('Select a mode');
const menuBtn = await rendered.findByLabelText('Select a mode');
// Open menu
fireEvent.click(menuBtn);

Expand Down

0 comments on commit ccb6237

Please sign in to comment.