mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Fleet] Fix flaky jest tests (#190778)
Fixes https://github.com/elastic/kibana/issues/189868 Fixes https://github.com/elastic/kibana/issues/189869 ## Summary Fix flaky unit tests. Tested locally and on ci, note that flaky test runner cannot be used with jest tests. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
cf3149e983
commit
96a5df19ac
1 changed files with 3 additions and 1 deletions
|
@ -83,6 +83,8 @@ describe('step select agent policy', () => {
|
|||
beforeEach(() => {
|
||||
testRenderer = createFleetTestRendererMock();
|
||||
useMultipleAgentPoliciesMock.mockReturnValue({ canUseMultipleAgentPolicies: false });
|
||||
});
|
||||
afterEach(() => {
|
||||
updateAgentPoliciesMock.mockReset();
|
||||
});
|
||||
|
||||
|
@ -110,7 +112,7 @@ describe('step select agent policy', () => {
|
|||
});
|
||||
|
||||
test('should select agent policy by default if one exists', async () => {
|
||||
useGetAgentPoliciesMock.mockReturnValueOnce({
|
||||
useGetAgentPoliciesMock.mockReturnValue({
|
||||
data: { items: [{ id: 'policy-1', name: 'Policy 1' }] },
|
||||
error: undefined,
|
||||
isLoading: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue