Hello, i'm starting to use page objects in my app, but how can i make the failure messages more descriptive, for example, i have the following.
has_css?(".alert-info", text: success_message)
But getting the following failure
Failure/Error: expect(new_sale).to have_success_message
expected #has_success_message? to return true, got false
I would love to have the failure that give me for instance
Failure/Error: expect(page).to have_content "Failure"
expected to find text "Failure" in "Toggle navigation Baron's Sign in as firstname.lastname@example.org New SaleBack Please review the problems below: * Store can't be blank Customer * First Name * Last Name * Tax Id Address Details Product Quantity Price Employee Subtotal $85.00 Remove Item Add Item Total Notes Subtotal $85.00 Discount Total $85.00 Payments Credit Card Add CC Cash Cash Change $0.00"
Thank you for your help!! @christoomey @joshuaclayton