Skip to content

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

@bnesteruk

Description

@bnesteruk

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
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions