Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I test the order of elements on a rails app page with Rspec / Capybara?

Micheal Waldrup asked in Testing

I have a 'Team' index page and I just want to TDD the ordering of the elements on page. My instructions are to validate they are showing most recently created first.

I know how to do the actual implementation, just not sure how to test that a team created today shows up before a team created yesterday.

Thanks!

Reply

I'm familiar with the nitty-gritty of putting this into practice, but I'm stumped as to how to guarantee that a team made today would appear ahead of one made yesterday during testing.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.