Skip to content

Commit

Permalink
update css elements in capybara tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EraliaKats committed Dec 18, 2024
1 parent 641009c commit 8451195
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/features/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
expect(page).to have_content('Search')
expect(page).to have_content('Browse')

expect(page.find('.autocomplete__input#q')).to be_present
expect(page.find('#autocomplete input')).to be_present
end
end
end
Expand All @@ -25,8 +25,8 @@
VCR.use_cassette('search#gold') do
visit find_commodity_path

page.find('#new_search .autocomplete__input#q').click
page.find('#new_search .autocomplete__input#q').set('gold')
page.find('#new_search #autocomplete input').click
page.find('#new_search #autocomplete input').set('gold')

expect(page).to have_css('#new_search .autocomplete__option')
expect(page.find_all('#new_search .autocomplete__option').length).to be > 1
Expand All @@ -47,9 +47,9 @@
VCR.use_cassette('search#gibberish') do
visit find_commodity_path

page.find('#new_search .autocomplete__input#q').click
page.find('#new_search #autocomplete input').click

page.find('#new_search .autocomplete__input#q').set('dsauidoasuiodsa')
page.find('#new_search #autocomplete input').set('dsauidoasuiodsa')

expect(page).to have_css('#new_search .autocomplete__option')
expect(page.find_all('#new_search .autocomplete__option').length).to eq(1)
Expand Down

0 comments on commit 8451195

Please sign in to comment.