Reputation: 5916
How is it possible the following spec (RSpec 3.8 + Capybara 3.8.2) passes?
scenario 'he can dismiss it', js: true do
find(:dataAttribute, 'tags.addButton').click
expect(page).to have_field('tag[name]', visible: false)
expect(page).to have_field('tag[name]')
end
Here the HTML
<input class="input" type="text" name="tag[name]" id="tag_name" />
Upvotes: 0
Views: 145
Reputation: 49880
visible: false
means to not check visibility -- if you want to confirm the element is not visible you need to specify visible: :hidden
Upvotes: 1