Fixing race condition on link click in spec/features/consumer/shops_spec.rb

This commit is contained in:
Rob Harrington
2017-05-19 13:29:47 +10:00
parent 6fc4a297a0
commit 15ee62aaa8

View File

@@ -125,7 +125,7 @@ feature 'Shops', js: true do
describe "closed shops" do
it "shows taxons for any order cycle" do
visit shops_path
click_link 'Show Closed Shops'
click_link_and_ensure('Show Closed Shops', -> { page.has_selector? '.active_table_node'})
expand_active_table_node shop.name
expect(page).to have_selector '.fat-taxons', text: 'Closed'
end