Skip to content

Allow custom messages in expect() #596

Description

@clayreimann
  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

for (tag, title) in defaultRows {
    let row = entryForm.row(tag: tag)
    expect(row.exists) == true
    expect(row.staticTexts["title"].label) == title
}

What did you expect to happen?

I would like to be able to provide custom message to expect so that I can see which loop iteration failed.

for (tag, title) in defaultRows {
    let row = entryForm.row(tag: tag)
    expect(row.exists, message: "\(tag) exists") == true
// or maybe more briefly
//    expect(row.exists, "\(tag) exists") == true
    expect(row.staticTexts["title"].label) == title
}

I'd be willing to submit a PR if this feature fits with the project

Environment

List the software versions you're using:

  • Quick: Nope
  • Nimble: 7.1.3
  • Xcode Version: 9.4.1 (9F2000)
  • Swift Version: Xcode Default
  • Carthage: 0.30.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions