1

I'm testing a Ember.js (1.13.1) app with Mocha (and Chai). I want to write expections on the page content without specifying selectors like I do in my capybara feature specs:

expect(page).to have_content 'Account created'

I can use jQuery('body').text() to extract the innerText but it needs farther parsing to remove whitespace and line-breaks.

A additional bonus would be if it could find elements such as buttons by content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.