diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2014-10-21 06:53:17 +0400 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2014-10-22 08:29:31 +0400 |
commit | 7a5072c5a8f03cd7342a5f8e74e1fde0250ce360 (patch) | |
tree | a12c1da5bf4ce93b2b418e2cbde458eae265ffcd /features/steps/shared/diff_note.rb | |
parent | 5bb8aff5ddcc1debb4406303477c1ddbe618d058 (diff) |
Fix test assertions
Make sure we're asserting the correct thing when testing visible and
invisible DOM elements.
Diffstat (limited to 'features/steps/shared/diff_note.rb')
-rw-r--r-- | features/steps/shared/diff_note.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb index 7f1dde16c17..28964d54a8f 100644 --- a/features/steps/shared/diff_note.rb +++ b/features/steps/shared/diff_note.rb @@ -132,26 +132,26 @@ module SharedDiffNote step 'I should see the diff comment preview' do within("#{diff_file_selector} form") do - expect(page).to have_css('.js-md-preview') + expect(page).to have_css('.js-md-preview', visible: true) end end step 'I should see the diff comment write tab' do within(diff_file_selector) do - expect(page).to have_css('.js-md-write-button') + expect(page).to have_css('.js-md-write-button', visible: true) end end step 'The diff comment preview tab should display rendered Markdown' do within(diff_file_selector) do find('.js-md-preview-button').click - expect(find('.js-md-preview')).to have_css('img.emoji') + expect(find('.js-md-preview')).to have_css('img.emoji', visible: true) end end step 'I should see two separate previews' do within(diff_file_selector) do - expect(page).to have_css('.js-md-preview', count: 2) + expect(page).to have_css('.js-md-preview', visible: true, count: 2) expect(page).to have_content('Should fix it') expect(page).to have_content('DRY this up') end |