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 /spec/features/notes_on_merge_requests_spec.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 'spec/features/notes_on_merge_requests_spec.rb')
-rw-r--r-- | spec/features/notes_on_merge_requests_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/features/notes_on_merge_requests_spec.rb b/spec/features/notes_on_merge_requests_spec.rb index 6d3cc3ae159..cac409b9139 100644 --- a/spec/features/notes_on_merge_requests_spec.rb +++ b/spec/features/notes_on_merge_requests_spec.rb @@ -34,7 +34,7 @@ describe 'Comments' do it 'should have enable submit button and preview button' do within('.js-main-target-form') do expect(page).not_to have_css('.js-comment-button[disabled]') - expect(page).to have_css('.js-md-preview-button') + expect(page).to have_css('.js-md-preview-button', visible: true) end end end @@ -53,7 +53,7 @@ describe 'Comments' do should have_content("This is awsome!") within('.js-main-target-form') do expect(page).to have_no_field('note[note]', with: 'This is awesome!') - expect(page).not_to have_css('.js-md-preview', visible: true) + expect(page).to have_css('.js-md-preview', visible: :hidden) end within(".js-main-target-form") { should have_css(".js-note-text", visible: true) } end |