Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares committed Apr 27, 2020
1 parent bea9a0c commit 92c1894
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ describe('when on the hosts page', () => {
});
it('should display Success overall policy status', async () => {
const renderResult = render();
reactTestingLibrary.act(() => {
dispatchServerReturnedHostPolicyResponse(HostPolicyResponseActionStatus.success);
});
const policyStatusLink = await renderResult.findByTestId('policyStatusValue');
expect(policyStatusLink.textContent).toEqual('Success');

Expand All @@ -180,7 +183,6 @@ describe('when on the hosts page', () => {
});
it('should display Warning overall policy status', async () => {
const renderResult = render();
await middlewareSpy.waitForAction('serverReturnedHostPolicyResponse');
reactTestingLibrary.act(() => {
dispatchServerReturnedHostPolicyResponse(HostPolicyResponseActionStatus.warning);
});
Expand All @@ -194,7 +196,6 @@ describe('when on the hosts page', () => {
});
it('should display Failed overall policy status', async () => {
const renderResult = render();
await middlewareSpy.waitForAction('serverReturnedHostPolicyResponse');
reactTestingLibrary.act(() => {
dispatchServerReturnedHostPolicyResponse(HostPolicyResponseActionStatus.failure);
});
Expand All @@ -208,7 +209,6 @@ describe('when on the hosts page', () => {
});
it('should display Unknown overall policy status', async () => {
const renderResult = render();
await middlewareSpy.waitForAction('serverReturnedHostPolicyResponse');
reactTestingLibrary.act(() => {
dispatchServerReturnedHostPolicyResponse('' as HostPolicyResponseActionStatus);
});
Expand Down

0 comments on commit 92c1894

Please sign in to comment.