Skip to content

Commit

Permalink
Utilize have_css to let capybara wait
Browse files Browse the repository at this point in the history
Utilize the built in capybara checks to allow the page to wait until fully loaded.
This should fix #485
  • Loading branch information
carolyncole committed Oct 19, 2022
1 parent 3f6e66c commit 357d2ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec/system/user_show_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

it "renders the proper date value for sorting by last edited", js: true do
work_last_edited = work.updated_at.strftime("%Y-%m-%d %H:%M:%S %Z")
sort_value = '<td class="last-edited" data-sort="' + work_last_edited + '">'
sign_in user_admin
visit user_path(user_admin)
expect(page.html.include?(sort_value)).to be true
expect(page).to have_css('td.last-edited[data-sort="' + work_last_edited + '"]')
end

it "renders the collection names as links", js: true do
Expand Down

0 comments on commit 357d2ec

Please sign in to comment.