Skip to content

Commit

Permalink
Fixes flakey tests (opensearch-project#105)
Browse files Browse the repository at this point in the history
* Fixes flakey cypress test 'rollup enable and disable test'

* Fixes flakey unit test 'can delete a rollup job'

Signed-off-by: Robert Downs <[email protected]>
  • Loading branch information
downsrob authored Oct 7, 2021
1 parent 04d5d44 commit 614cd5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cypress/integration/rollups_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ describe("Rollups", () => {

cy.contains(`${ROLLUP_ID}`);

// Disable button is enabled
cy.get(`[data-test-subj="disableButton"]`).should("not.be.disabled");

// Click Disable button
cy.get(`[data-test-subj="disableButton"]`).trigger("click", { force: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ describe("<RollupDetails /> spec", () => {
browserServicesMock.rollupService.deleteRollup = jest.fn().mockResolvedValue({ ok: true, response: true });
const { getByTestId } = renderRollupDetailsWithRouter([`${ROUTES.ROLLUP_DETAILS}?id=${testRollup._id}`]);

await waitFor(() => {});
await waitFor(() => {
getByTestId("deleteButton");
});

userEvent.click(getByTestId("deleteButton"));

Expand Down

0 comments on commit 614cd5f

Please sign in to comment.