Skip to content

Commit

Permalink
Unfortunately sometimes GHA are slow to respond
Browse files Browse the repository at this point in the history
  • Loading branch information
sourishkrout committed Jun 27, 2024
1 parent 80a2c48 commit b0f4aad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/e2e/specs/githubAction.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Key } from 'webdriverio'
import { RunmeNotebook } from '../pageobjects/notebook.page.js'
import type { NotebookCell } from '../pageobjects/cell.page.js'

const UI_LATENCY_TIMEOUT_SECS = 2 * 60 * 1000

describe('Runme GitHub Workflow Integration', async () => {
const notebook = new RunmeNotebook()
const token = process.env.RUNME_TEST_TOKEN
Expand Down Expand Up @@ -62,15 +64,15 @@ describe('Runme GitHub Workflow Integration', async () => {
await outputContainer.$('aria/Run Workflow').click()
await outputContainer
.$('github-workflow-run[status="queued"]')
.waitForExist({ timeout: 60000 })
.waitForExist({ timeout: UI_LATENCY_TIMEOUT_SECS })
// run again if workflow is not triggered
.catch(() => outputContainer.$('aria/Run Workflow').click())
await outputContainer
.$('github-workflow-run[status="in_progress"]')
.waitForExist({ timeout: 60000 })
.waitForExist({ timeout: UI_LATENCY_TIMEOUT_SECS })
await outputContainer
.$('github-workflow-run[status="completed"][conclusion="success"]')
.waitForExist({ timeout: 60000 })
.waitForExist({ timeout: UI_LATENCY_TIMEOUT_SECS })
})

after(() => cell.switchOutOfCellFrame())
Expand Down

0 comments on commit b0f4aad

Please sign in to comment.