Commit fbf06761 authored by Rémy Coutable's avatar Rémy Coutable

Make the 'User comments on a snippet' system test more robust

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 99b3ee82
...@@ -13,6 +13,9 @@ describe 'Projects > Snippets > User comments on a snippet', :js do ...@@ -13,6 +13,9 @@ describe 'Projects > Snippets > User comments on a snippet', :js do
sign_in(user) sign_in(user)
visit(project_snippet_path(project, snippet)) visit(project_snippet_path(project, snippet))
# Snippet's content is loaded async, we wait for it before we try to click anything
wait_for_requests
end end
it 'leaves a comment on a snippet' do it 'leaves a comment on a snippet' do
...@@ -34,7 +37,8 @@ describe 'Projects > Snippets > User comments on a snippet', :js do ...@@ -34,7 +37,8 @@ describe 'Projects > Snippets > User comments on a snippet', :js do
end end
it 'has zen mode' do it 'has zen mode' do
find('.js-zen-enter').click click_button 'Go full screen'
expect(page).to have_selector('.fullscreen') expect(page).to have_selector('.fullscreen')
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment