Skip to content

Commit

Permalink
fix failing unit test (elastic#192488)
Browse files Browse the repository at this point in the history
## Summary
This test (elastic#180931) was introduced
right before the version bump of user-events
(elastic#189949).

This PR updates the one async call to be awaited, hopefully fixing the
test.

Solves: elastic#192475
Unskipped tests are passing now:
https://buildkite.com/elastic/kibana-pull-request/builds/233177

---------

Co-authored-by: Antonio <antoniodcoelho@gmail.com>
  • Loading branch information
delanni and adcoelho authored Sep 11, 2024
1 parent e3d48e3 commit 865c3b7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import type { AppMockRenderer } from '../../../common/mock';
import { createAppMockRenderer } from '../../../common/mock';
import { TheHiveTLP } from './types';

// Failing: See https://github.com/elastic/kibana/issues/192475
describe.skip('TheHive Cases Fields', () => {
describe('TheHive Cases Fields', () => {
const fields = {
TLP: 1,
};
Expand Down Expand Up @@ -45,7 +44,7 @@ describe.skip('TheHive Cases Fields', () => {
</MockFormWrapperComponent>
);

userEvent.selectOptions(screen.getByTestId('tlp-field'), '4');
await userEvent.selectOptions(await screen.findByTestId('tlp-field'), '4');
expect(await screen.findByTestId('tlp-field')).toHaveValue(TheHiveTLP.RED.toString());
});
});

0 comments on commit 865c3b7

Please sign in to comment.