Skip to content

Commit

Permalink
test: try to fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Sep 25, 2023
1 parent a4c3371 commit 029f4a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions e2e/02-login-flow.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ describe("Login Flow", () => {
// scroll down for small screens
await waitTillButtonDisplayed("logout button")
await scrollDown()
await clickButton("Staging Button")
await clickButton("Save Changes")
await clickButton("Staging Button", false)
await clickButton("Save Changes", false)

await clickBackButton()
})
Expand Down
4 changes: 2 additions & 2 deletions e2e/utils/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const clickAlertLastButton = async (title: string) => {
await okButton.click()
}

export const clickButton = async (title: string) => {
export const clickButton = async (title: string, waitForEnabled = true) => {
const button = await $(selector(title, "Button"))
await button.waitForEnabled({ timeout })
if (waitForEnabled) await button.waitForEnabled({ timeout })
await button.click()
}

Expand Down

0 comments on commit 029f4a0

Please sign in to comment.