Skip to content

Commit

Permalink
Fix failing tests and remove sleep statement for GitHub Actions (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaankabalak authored Jan 21, 2022
1 parent 5f28151 commit a778a1e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/permissions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Start Console, front-end app and initialize users/policies
run: |
(./console server && sleep 180) & (make initialize-permissions && sleep 180)
(./console server) & (make initialize-permissions)
- name: Run TestCafe Tests
uses: DevExpress/testcafe-action@latest
Expand Down
28 changes: 13 additions & 15 deletions portal-ui/tests/permissions/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,20 @@ test("Start Diagnostic button can be clicked", async (t) => {
.click(elements.startDiagnosticButton);
});

// TODO: Fix test failing sporadically on GitHub Actions

// test("Download button exists after Diagnostic is completed", async (t) => {
// const downloadExists = elements.downloadButton.exists;
// await t
// .navigateTo("http://localhost:9090/support/diagnostics")
// .click(elements.startDiagnosticButton)
// .expect(downloadExists).ok();
// });
test("Download button exists after Diagnostic is completed", async (t) => {
const downloadExists = elements.downloadButton.exists;
await t
.navigateTo("http://localhost:9090/support/diagnostics")
.click(elements.startDiagnosticButton)
.expect(downloadExists).ok();
});

// test("Download button is clickable after Diagnostic is completed", async (t) => {
// await t
// .navigateTo("http://localhost:9090/support/diagnostics")
// .click(elements.startDiagnosticButton)
// .click(elements.downloadButton);
// });
test("Download button is clickable after Diagnostic is completed", async (t) => {
await t
.navigateTo("http://localhost:9090/support/diagnostics")
.click(elements.startDiagnosticButton)
.click(elements.downloadButton);
});

test("Start New Diagnostic button exists after Diagnostic is completed", async (t) => {
const startNewDiagnosticButtonExists =
Expand Down

0 comments on commit a778a1e

Please sign in to comment.