diff options
author | Stan Hu <stanhu@gmail.com> | 2017-10-14 13:52:28 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-10-14 13:52:28 -0700 |
commit | 4d1d4151cecee23e3f2634ef1badabe7cc19c7bf (patch) | |
tree | 43663f6ee64b7d3220474d9d0646d55304d047fa | |
parent | 9d42830f9f89df2413519b22438373b7678b711a (diff) | |
parent | 099928ad1e691ca4d80bcdfc95cbe4692c93680d (diff) | |
download | gitlab-ce-4d1d4151cecee23e3f2634ef1badabe7cc19c7bf.tar.gz |
Merge branch 'security-9-5' into 3435-backport-9-5
-rw-r--r-- | spec/features/projects/user_edits_files_spec.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/features/projects/user_edits_files_spec.rb b/spec/features/projects/user_edits_files_spec.rb index 8ae89c980b9..bfca2c25965 100644 --- a/spec/features/projects/user_edits_files_spec.rb +++ b/spec/features/projects/user_edits_files_spec.rb @@ -24,6 +24,8 @@ describe 'User edits files' do it 'inserts a content of a file', js: true do click_link('.gitignore') find('.js-edit-blob').click + find('.file-editor', match: :first) + execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -39,6 +41,8 @@ describe 'User edits files' do it 'commits an edited file', js: true do click_link('.gitignore') find('.js-edit-blob').click + find('.file-editor', match: :first) + execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') @@ -53,6 +57,8 @@ 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 + find('.file-editor', match: :first) + 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) @@ -62,13 +68,14 @@ describe 'User edits files' do click_link('Changes') - wait_for_requests expect(page).to have_content('*.rbca') end it 'shows the diff of an edited file', js: true do click_link('.gitignore') find('.js-edit-blob').click + find('.file-editor', match: :first) + execute_script("ace.edit('editor').setValue('*.rbca')") click_link('Preview changes') @@ -93,6 +100,8 @@ describe 'User edits files' do expect(page).to have_content(fork_message) + find('.file-editor', match: :first) + execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -106,6 +115,9 @@ describe 'User edits files' do expect(page).to have_button('Cancel') click_link('Fork') + + find('.file-editor', match: :first) + execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') |