Skip to content

Commit

Permalink
Add better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sabarasaba committed Oct 6, 2021
1 parent 01a2ec7 commit 2d79404
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ describe('Overview - Fix deprecation logs step', () => {
};

httpRequestsMockHelpers.setDeleteLogsCacheResponse(undefined, error);
// Initially we want to have the callout to have a warning state
httpRequestsMockHelpers.setLoadDeprecationLogsCountResponse({ count: 10 });

const addDanger = jest.fn();
Expand Down Expand Up @@ -373,9 +374,9 @@ describe('Overview - Fix deprecation logs step', () => {

// The toast should always be shown if the delete logs cache fails.
expect(addDanger).toHaveBeenCalled();
// Even though a stub for the API call getting the count was set to return 0,
// given that the delete logs cache API call will fail the callout remains in
// warning state.
// Even though we changed the response of the getLogsCountResponse, when the
// deleteLogsCache fails the getLogsCount api should not be called and the
// status of the callout should remain the same it initially was.
expect(exists('hasWarningsCallout')).toBe(true);
});

Expand Down

0 comments on commit 2d79404

Please sign in to comment.