diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-09 08:54:32 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-09 08:54:32 +0100 |
commit | 3ba782d5de967ff8c765ac6da94c875837d352de (patch) | |
tree | b55a0663bd63fcf024c3a1f08ce0bda78cc30c88 | |
parent | 5388f5ee13c61eb9d686c9c21c027e603bc222b6 (diff) | |
download | gitlab-ce-3ba782d5de967ff8c765ac6da94c875837d352de.tar.gz |
Wait for requests to finish before running the ace JSuser-edit-files-spec-fix
Closes #36191
-rw-r--r-- | spec/features/projects/user_edits_files_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/user_edits_files_spec.rb b/spec/features/projects/user_edits_files_spec.rb index 8ae89c980b9..0c306fd34fb 100644 --- a/spec/features/projects/user_edits_files_spec.rb +++ b/spec/features/projects/user_edits_files_spec.rb @@ -24,6 +24,9 @@ describe 'User edits files' do it 'inserts a content of a file', js: true do click_link('.gitignore') find('.js-edit-blob').click + + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -39,6 +42,9 @@ describe 'User edits files' do it 'commits an edited file', js: true do click_link('.gitignore') find('.js-edit-blob').click + + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') @@ -53,6 +59,9 @@ describe 'User edits files' do it 'commits an edited file to a new branch', js: true do click_link('.gitignore') find('.js-edit-blob').click + + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) fill_in(:branch_name, with: 'new_branch_name', visible: true) @@ -69,6 +78,9 @@ describe 'User edits files' do it 'shows the diff of an edited file', js: true do click_link('.gitignore') find('.js-edit-blob').click + + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") click_link('Preview changes') @@ -93,6 +105,8 @@ describe 'User edits files' do expect(page).to have_content(fork_message) + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -106,6 +120,9 @@ describe 'User edits files' do expect(page).to have_button('Cancel') click_link('Fork') + + wait_for_requests + execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') |