fix create_snipper and diff_notes specs

This commit is contained in:
Jose Ivan Vargas 2017-10-05 16:13:21 -05:00
parent 7449c45d45
commit 035bf5d4d5
2 changed files with 5 additions and 5 deletions

View file

@ -76,7 +76,7 @@ feature 'Merge requests > User posts diff notes', :js do
context 'with an unfolded line' do
before do
find('.js-unfold', match: :first).click
find('.js-unfold', match: :first).send_keys(:return)
wait_for_requests
end
@ -103,7 +103,7 @@ feature 'Merge requests > User posts diff notes', :js do
it 'allows commenting' do
should_allow_commenting(find('[id="2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_9"]'))
first('.js-note-delete', visible: false).trigger('click')
first('.js-note-delete', visible: false).click
should_allow_commenting(find('[id="2f6fcd96b88b36ce98c38da085c795a27d92a3dd_10_9"]'))
end
@ -135,7 +135,7 @@ feature 'Merge requests > User posts diff notes', :js do
context 'with an unfolded line' do
before do
find('.js-unfold', match: :first).click
find('.js-unfold', match: :first).send_keys(:return)
wait_for_requests
end

View file

@ -10,7 +10,7 @@ feature 'Create Snippet', :js do
fill_in 'project_snippet_title', with: 'My Snippet Title'
fill_in 'project_snippet_description', with: 'My Snippet **Description**'
page.within('.file-editor') do
find('.ace_text-input').native.send_keys('Hello World!')
find('.ace_text-input', visible: false).send_keys('Hello World!')
end
end
@ -59,7 +59,7 @@ feature 'Create Snippet', :js do
fill_form
dropzone_file Rails.root.join('spec', 'fixtures', 'banana_sample.gif')
click_button('Create snippet')
find("input[value='Create snippet']").send_keys(:return)
wait_for_requests
expect(page).to have_content('My Snippet Title')