Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky specs in backend/spec/features/admin/users_spec.rb #3089

Merged
merged 2 commits into from
Feb 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/spec/features/admin/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

it "can sort asc" do
within_table(table_id) do
expect(page).to have_selector '.sort_link.asc'
expect(page).to have_text text_match_1
expect(page).to have_text text_match_2
expect(text_match_1).to appear_before text_match_2
Expand All @@ -69,7 +70,10 @@
within_table(table_id) do
# Ransack adds a ▲ to the sort link. With exact match Capybara is not able to find that link
click_link sort_link, exact: false
end

within_table(table_id) do
expect(page).to have_selector '.sort_link.desc'
expect(page).to have_text text_match_1
expect(page).to have_text text_match_2
expect(text_match_2).to appear_before text_match_1
Expand Down