Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to disable implicit assertions in particular waitFor block #578

Closed
bnesteruk opened this issue May 15, 2019 · 0 comments
Closed

Add ability to disable implicit assertions in particular waitFor block #578

bnesteruk opened this issue May 15, 2019 · 0 comments
Assignees
Milestone

Comments

@bnesteruk
Copy link

@bnesteruk bnesteruk commented May 15, 2019

Sometimes it is useful to avoid implicit assertion of each statement in waitFor {} block. Can this be done by adding an option as block's argument? For instance, below the only last row should be checked for truth:

waitFor {
    jobRow.clickUpdate()
    processDialog.waitIfShown() //can return false and this is okay. 
    jobRow.statusCell.text() == status.value
}

So current workaround is to place these statements in a separate closure, and pass it to the waitFor block:

Closure waitAction =  {
    jobRow.clickUpdate()
    processDialog.waitIfShown()
    jobRow.statusCell.text() == status.value
}
waitFor { waitAction }

Instead, it would be good to write:

waitFor (implicitAssertion: false) {
    jobRow.clickUpdate()
    processDialog.waitIfShown() //can return false and this is okay. 
    jobRow.statusCell.text() == status.value
}
@erdi erdi added this to the 3.3 milestone Nov 22, 2019
@erdi erdi self-assigned this Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.