diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-23 11:04:28 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-10-23 11:04:28 +0300 |
commit | 4ad8c9997d8d067cbc5a2f9252f244116cd24759 (patch) | |
tree | 515f90ed0e00a3dfba92dd1c914c837ad3612a1f /spec/features | |
parent | dfa79ebf12aca3d2784c754c53520a2fd34f28a9 (diff) | |
parent | c1ed00e81df21365bd783da8cb40957e474ed35d (diff) | |
download | gitlab-ce-4ad8c9997d8d067cbc5a2f9252f244116cd24759.tar.gz |
Merge branch 'master' into 37860-pipelines-page
* master: (88 commits)
Fix deletion of container registry or images returning an error
The fog-aliyun gem had a bug in v0.1.0 for file storage creation/update. This merge requests update the gem to v0.2.0 which contains the fix:
Decrease ABC threshold to 54.28
Update VERSION to 10.2.0-pre
Update CHANGELOG.md for 10.1.0
Document `CI_SHARED_ENVIRONMENT` and `CI_DISPOSABLE_ENVIRONMENT`
Fix the external URLs generated for online view of HTML artifacts
Use title as placeholder instead of issue title for reusability
Fix failure in current_settings_spec.rb
Clarify the difference between project_update and project_rename
URI decode Page-Title header to preserve UTF-8 characters
Update Gitaly version to v0.49.0
Decrease Perceived Complexity threshold to 14
Resolve "Remove help text regarding group issues on group issues page (and group merge requests page)"
Force non diff resolved discussion to display when collapse toggled
Added submodule support in multi-file editor
add note about after_script being run separately
Check for element before evaluate_script
Merge branch 'master-i18n' into 'master'
Update Prometheus gem to fix problems with other files overwriting current file
...
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/boards/boards_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/ci_lint_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/dashboard/issues_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/issues/issue_detail_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/issues/markdown_toolbar_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/merge_requests/conflicts_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/merge_requests/edit_mr_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/merge_requests/mini_pipeline_graph_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/blobs/edit_spec.rb | 1 | ||||
-rw-r--r-- | spec/features/projects/issuable_templates_spec.rb | 4 | ||||
-rw-r--r-- | spec/features/projects/user_creates_files_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/projects/user_edits_files_spec.rb | 7 |
12 files changed, 33 insertions, 4 deletions
diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 91c4e5037de..60ed17c0c81 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -171,12 +171,14 @@ describe 'Issue Boards', :js do expect(page).to have_selector('.card', count: 20) expect(page).to have_content('Showing 20 of 58 issues') + find('.board .board-list') evaluate_script("document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight") wait_for_requests expect(page).to have_selector('.card', count: 40) expect(page).to have_content('Showing 40 of 58 issues') + find('.board .board-list') evaluate_script("document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight") wait_for_requests @@ -449,11 +451,13 @@ describe 'Issue Boards', :js do expect(page).to have_selector('.card', count: 20) expect(page).to have_content('Showing 20 of 51 issues') + find('.board .board-list') evaluate_script("document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight") expect(page).to have_selector('.card', count: 40) expect(page).to have_content('Showing 40 of 51 issues') + find('.board .board-list') evaluate_script("document.querySelectorAll('.board .board-list')[1].scrollTop = document.querySelectorAll('.board .board-list')[1].scrollHeight") expect(page).to have_selector('.card', count: 51) diff --git a/spec/features/ci_lint_spec.rb b/spec/features/ci_lint_spec.rb index 9accd7bb07c..9bc23baf6cf 100644 --- a/spec/features/ci_lint_spec.rb +++ b/spec/features/ci_lint_spec.rb @@ -10,6 +10,7 @@ describe 'CI Lint', :js do visit ci_lint_path # Ace editor updates a hidden textarea and it happens asynchronously # `sleep 0.1` is actually needed here because of this + find('#ci-editor') execute_script("ace.edit('ci-editor').setValue(" + yaml_content.to_json + ");") sleep 0.1 click_on 'Validate' diff --git a/spec/features/dashboard/issues_spec.rb b/spec/features/dashboard/issues_spec.rb index 5610894fd9a..a8919976c31 100644 --- a/spec/features/dashboard/issues_spec.rb +++ b/spec/features/dashboard/issues_spec.rb @@ -87,8 +87,10 @@ RSpec.describe 'Dashboard Issues' do project_path = "/#{project.path_with_namespace}" project_json = { name: project.name_with_namespace, url: project_path }.to_json - # similate selection, and prevent overlap by dropdown menu + # simulate selection, and prevent overlap by dropdown menu + first('.project-item-select', visible: false) execute_script("$('.project-item-select').val('#{project_json}').trigger('change');") + find('#select2-drop-mask', visible: false) execute_script("$('#select2-drop-mask').remove();") find('.new-project-item-link').trigger('click') diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb index c0c396af93f..6fbee0ebcb5 100644 --- a/spec/features/issues/issue_detail_spec.rb +++ b/spec/features/issues/issue_detail_spec.rb @@ -25,7 +25,7 @@ feature 'Issue Detail', :js do wait_for_requests click_link 'Edit' - fill_in 'issue-title', with: 'issue title' + fill_in 'issuable-title', with: 'issue title' click_button 'Save' Users::DestroyService.new(user).execute(user) diff --git a/spec/features/issues/markdown_toolbar_spec.rb b/spec/features/issues/markdown_toolbar_spec.rb index 6869c2c869d..fee8fd9b365 100644 --- a/spec/features/issues/markdown_toolbar_spec.rb +++ b/spec/features/issues/markdown_toolbar_spec.rb @@ -16,6 +16,7 @@ feature 'Issue markdown toolbar', :js do find('#note-body').native.send_key(:enter) find('#note-body').native.send_keys('bold') + find('.js-main-target-form #note-body') page.evaluate_script('document.querySelectorAll(".js-main-target-form #note-body")[0].setSelectionRange(4, 9)') first('.toolbar-btn').click @@ -28,6 +29,7 @@ feature 'Issue markdown toolbar', :js do find('#note-body').native.send_key(:enter) find('#note-body').native.send_keys('underline') + find('.js-main-target-form #note-body') page.evaluate_script('document.querySelectorAll(".js-main-target-form #note-body")[0].setSelectionRange(4, 50)') find('.toolbar-btn:nth-child(2)').click diff --git a/spec/features/merge_requests/conflicts_spec.rb b/spec/features/merge_requests/conflicts_spec.rb index b0432ed8fc6..ba976bc7216 100644 --- a/spec/features/merge_requests/conflicts_spec.rb +++ b/spec/features/merge_requests/conflicts_spec.rb @@ -60,12 +60,14 @@ feature 'Merge request conflict resolution', :js do within find('.files-wrapper .diff-file', text: 'files/ruby/popen.rb') do click_button 'Edit inline' wait_for_requests + find('.files-wrapper .diff-file pre') execute_script('ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("One morning");') end within find('.files-wrapper .diff-file', text: 'files/ruby/regex.rb') do click_button 'Edit inline' wait_for_requests + find('.files-wrapper .diff-file pre') execute_script('ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");') end @@ -139,6 +141,7 @@ feature 'Merge request conflict resolution', :js do it 'conflicts are resolved in Edit inline mode' do within find('.files-wrapper .diff-file', text: 'files/markdown/ruby-style-guide.md') do wait_for_requests + find('.files-wrapper .diff-file pre') execute_script('ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");') end diff --git a/spec/features/merge_requests/edit_mr_spec.rb b/spec/features/merge_requests/edit_mr_spec.rb index 4538555c168..4362f8b3fcc 100644 --- a/spec/features/merge_requests/edit_mr_spec.rb +++ b/spec/features/merge_requests/edit_mr_spec.rb @@ -66,6 +66,7 @@ feature 'Edit Merge Request' do end def get_textarea_height + find('#merge_request_description') page.evaluate_script('document.getElementById("merge_request_description").offsetHeight') end end diff --git a/spec/features/merge_requests/mini_pipeline_graph_spec.rb b/spec/features/merge_requests/mini_pipeline_graph_spec.rb index dcc70338d7f..bf21a719901 100644 --- a/spec/features/merge_requests/mini_pipeline_graph_spec.rb +++ b/spec/features/merge_requests/mini_pipeline_graph_spec.rb @@ -52,10 +52,12 @@ feature 'Mini Pipeline Graph', :js do end it 'should expand when hovered' do + find('.mini-pipeline-graph-dropdown-toggle') before_width = evaluate_script("$('.mini-pipeline-graph-dropdown-toggle:visible').outerWidth();") toggle.hover + find('.mini-pipeline-graph-dropdown-toggle') after_width = evaluate_script("$('.mini-pipeline-graph-dropdown-toggle:visible').outerWidth();") expect(before_width).to be < after_width diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb index 6c625ed17aa..965028a6f90 100644 --- a/spec/features/projects/blobs/edit_spec.rb +++ b/spec/features/projects/blobs/edit_spec.rb @@ -20,6 +20,7 @@ feature 'Editing file blob', :js do def edit_and_commit wait_for_requests find('.js-edit-blob').click + find('#editor') execute_script('ace.edit("editor").setValue("class NextFeature\nend\n")') click_button 'Commit changes' end diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index 9f67216705d..a012db8fd27 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -35,7 +35,7 @@ feature 'issuable templates', :js do page.within('.content .issuable-actions') do click_on 'Edit' end - fill_in :'issue-title', with: 'test issue title' + fill_in :'issuable-title', with: 'test issue title' end scenario 'user selects "bug" template' do @@ -80,7 +80,7 @@ feature 'issuable templates', :js do page.within('.content .issuable-actions') do click_on 'Edit' end - fill_in :'issue-title', with: 'test issue title' + fill_in :'issuable-title', with: 'test issue title' fill_in :'issue-description', with: prior_description end diff --git a/spec/features/projects/user_creates_files_spec.rb b/spec/features/projects/user_creates_files_spec.rb index cbe70a93942..d84b91ddc32 100644 --- a/spec/features/projects/user_creates_files_spec.rb +++ b/spec/features/projects/user_creates_files_spec.rb @@ -60,6 +60,7 @@ describe 'User creates files' do end it 'creates and commit a new file', :js do + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:file_name, with: 'not_a_file.md') fill_in(:commit_message, with: 'New commit message', visible: true) @@ -75,6 +76,7 @@ describe 'User creates files' do end it 'creates and commit a new file with new lines at the end of file', :js do + find('#editor') execute_script('ace.edit("editor").setValue("Sample\n\n\n")') fill_in(:file_name, with: 'not_a_file.md') fill_in(:commit_message, with: 'New commit message', visible: true) @@ -86,6 +88,7 @@ describe 'User creates files' do find('.js-edit-blob').click + find('#editor') expect(evaluate_script('ace.edit("editor").getValue()')).to eq("Sample\n\n\n") end @@ -94,6 +97,7 @@ describe 'User creates files' do expect(page).to have_selector('.file-editor') + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') @@ -108,6 +112,7 @@ describe 'User creates files' do it 'creates and commit a new file specifying a new branch', :js do expect(page).to have_selector('.file-editor') + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:file_name, with: 'not_a_file.md') fill_in(:commit_message, with: 'New commit message', visible: true) @@ -136,6 +141,7 @@ describe 'User creates files' do expect(page).to have_selector('.file-editor') + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:file_name, with: 'not_a_file.md') diff --git a/spec/features/projects/user_edits_files_spec.rb b/spec/features/projects/user_edits_files_spec.rb index e8d83a661d4..d26ee653415 100644 --- a/spec/features/projects/user_edits_files_spec.rb +++ b/spec/features/projects/user_edits_files_spec.rb @@ -23,6 +23,7 @@ describe 'User edits files' do find('.js-edit-blob').click find('.file-editor', match: :first) + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -40,6 +41,7 @@ describe 'User edits files' do find('.js-edit-blob').click find('.file-editor', match: :first) + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') @@ -57,6 +59,7 @@ describe 'User edits files' do find('.file-editor', match: :first) + find('#editor') 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) @@ -74,6 +77,7 @@ describe 'User edits files' do find('.js-edit-blob').click find('.file-editor', match: :first) + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") click_link('Preview changes') @@ -103,6 +107,7 @@ describe 'User edits files' do find('.file-editor', match: :first) + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") expect(evaluate_script('ace.edit("editor").getValue()')).to eq('*.rbca') @@ -119,6 +124,7 @@ describe 'User edits files' do find('.file-editor', match: :first) + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'New commit message', visible: true) click_button('Commit changes') @@ -145,6 +151,7 @@ describe 'User edits files' do expect(page).not_to have_link('Fork') expect(page).not_to have_button('Cancel') + find('#editor') execute_script("ace.edit('editor').setValue('*.rbca')") fill_in(:commit_message, with: 'Another commit', visible: true) click_button('Commit changes') |