summaryrefslogtreecommitdiff
path: root/features/steps/shared/markdown.rb
diff options
context:
space:
mode:
authorVinnie Okada <vokada@mrvinn.com>2014-10-20 21:53:17 -0500
committerVinnie Okada <vokada@mrvinn.com>2014-10-21 23:29:31 -0500
commit7a5072c5a8f03cd7342a5f8e74e1fde0250ce360 (patch)
treea12c1da5bf4ce93b2b418e2cbde458eae265ffcd /features/steps/shared/markdown.rb
parent5bb8aff5ddcc1debb4406303477c1ddbe618d058 (diff)
downloadgitlab-ce-7a5072c5a8f03cd7342a5f8e74e1fde0250ce360.tar.gz
Fix test assertions
Make sure we're asserting the correct thing when testing visible and invisible DOM elements.
Diffstat (limited to 'features/steps/shared/markdown.rb')
-rw-r--r--features/steps/shared/markdown.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/features/steps/shared/markdown.rb b/features/steps/shared/markdown.rb
index 8dfb8ed72e9..e71700880cd 100644
--- a/features/steps/shared/markdown.rb
+++ b/features/steps/shared/markdown.rb
@@ -56,7 +56,7 @@ EOT
end
step 'I should not see the Markdown preview' do
- expect(find('.gfm-form')).not_to have_css('.js-md-preview', visible: true)
+ expect(find('.gfm-form .js-md-preview')).not_to be_visible
end
step 'The Markdown preview tab should say there is nothing to do' do
@@ -67,21 +67,21 @@ EOT
end
step 'I should not see the Markdown text field' do
- expect(find('.gfm-form')).not_to have_css('textarea', visible: true)
+ expect(find('.gfm-form textarea')).not_to be_visible
end
step 'I should see the Markdown write tab' do
- expect(find('.gfm-form')).to have_css('.js-md-write-button')
+ expect(find('.gfm-form')).to have_css('.js-md-write-button', visible: true)
end
step 'I should see the Markdown preview' do
- expect(find('.gfm-form')).to have_css('.js-md-preview')
+ expect(find('.gfm-form')).to have_css('.js-md-preview', visible: true)
end
step 'The Markdown preview tab should display rendered Markdown' do
within('.gfm-form') 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