diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-24 14:18:36 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-24 14:18:36 +0000 |
commit | f82377b89ff008c7593cf3aeffc76ba073515e3c (patch) | |
tree | 7094e9333294e484c53e3c39769d7839fc277afb /spec/features/projects | |
parent | ead94db602f6f2e4d3b790bd4c7e645494d72318 (diff) | |
parent | 2338785ec9fcacc43ba2098ab1485fca292c06cc (diff) | |
download | gitlab-ce-f82377b89ff008c7593cf3aeffc76ba073515e3c.tar.gz |
Merge branch 'wait-for-ajax-handling-all-js-requests' into 'master'
Use wait_for_requests for checking Vue resource and $.ajax requests [CE]
Closes #31946 and #31555
See merge request !11451
Diffstat (limited to 'spec/features/projects')
25 files changed, 67 insertions, 70 deletions
diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb index 74308a7e8dd..25db908d917 100644 --- a/spec/features/projects/artifacts/file_spec.rb +++ b/spec/features/projects/artifacts/file_spec.rb @@ -13,7 +13,7 @@ feature 'Artifact file', :js, feature: true do before do visit_file('other_artifacts_0.1.2/doc_sample.txt') - wait_for_ajax + wait_for_requests end it 'displays an error' do @@ -37,7 +37,7 @@ feature 'Artifact file', :js, feature: true do before do visit_file('rails_sample.jpg') - wait_for_ajax + wait_for_requests end it 'displays the blob' do diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb index fc242082278..82cfbfda157 100644 --- a/spec/features/projects/blobs/blob_show_spec.rb +++ b/spec/features/projects/blobs/blob_show_spec.rb @@ -6,7 +6,7 @@ feature 'File blob', :js, feature: true do def visit_blob(path, fragment = nil) visit namespace_project_blob_path(project.namespace, project, File.join('master', path), anchor: fragment) - wait_for_ajax + wait_for_requests end context 'Ruby file' do @@ -61,7 +61,7 @@ feature 'File blob', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=simple]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the simple viewer' do @@ -82,7 +82,7 @@ feature 'File blob', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=rich]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the rich viewer' do @@ -170,7 +170,7 @@ feature 'File blob', :js, feature: true do before do find('.js-blob-viewer-switcher .js-blob-viewer-switch-btn[data-viewer=simple]').click - wait_for_ajax + wait_for_requests end it 'displays an error' do diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb index cc5b1a7e734..1a38997450d 100644 --- a/spec/features/projects/blobs/edit_spec.rb +++ b/spec/features/projects/blobs/edit_spec.rb @@ -18,7 +18,7 @@ feature 'Editing file blob', feature: true, js: true do end def edit_and_commit - wait_for_ajax + wait_for_requests find('.js-edit-blob').click execute_script('ace.edit("editor").setValue("class NextFeature\nend\n")') click_button 'Commit changes' diff --git a/spec/features/projects/blobs/user_create_spec.rb b/spec/features/projects/blobs/user_create_spec.rb index d805450e095..4b6c55f5f44 100644 --- a/spec/features/projects/blobs/user_create_spec.rb +++ b/spec/features/projects/blobs/user_create_spec.rb @@ -15,7 +15,7 @@ feature 'New blob creation', feature: true, js: true do end def edit_file - wait_for_ajax + wait_for_requests fill_in 'file_name', with: 'feature.rb' execute_script("ace.edit('editor').setValue('#{content}')") end diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb index fa67d390c47..bc7ca0ddd38 100644 --- a/spec/features/projects/commit/cherry_pick_spec.rb +++ b/spec/features/projects/commit/cherry_pick_spec.rb @@ -72,11 +72,11 @@ describe 'Cherry-pick Commits' do click_button 'master' end - wait_for_ajax + wait_for_requests page.within('#modal-cherry-pick-commit .dropdown-menu') do find('.dropdown-input input').set('feature') - wait_for_ajax + wait_for_requests click_link "feature" end diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb index 98c0f2c63b0..f2de195eb7f 100644 --- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb +++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb @@ -32,7 +32,7 @@ feature 'Mini Pipeline Graph in Commit View', :js, :feature do it 'should show the builds list when stage is clicked' do first('.mini-pipeline-graph-dropdown-toggle').click - wait_for_ajax + wait_for_requests page.within '.js-builds-dropdown-list' do expect(page).to have_selector('.ci-status-icon-running') diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb index b2a3b111c9e..294a63a5c6d 100644 --- a/spec/features/projects/compare_spec.rb +++ b/spec/features/projects/compare_spec.rb @@ -53,7 +53,7 @@ describe "Compare", js: true do dropdown = find(".js-compare-#{dropdown_type}-dropdown") dropdown.find(".compare-dropdown-toggle").click dropdown.fill_in("Filter by Git revision", with: selection) - wait_for_ajax + wait_for_requests dropdown.find_all("a[data-ref=\"#{selection}\"]", visible: true).last.click end end diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb index 4533a6fb144..c49648f54bd 100644 --- a/spec/features/projects/features_visibility_spec.rb +++ b/spec/features/projects/features_visibility_spec.rb @@ -21,17 +21,17 @@ describe 'Edit Project Settings', feature: true do select 'Disabled', from: "project_project_feature_attributes_#{tool_name}_access_level" click_button 'Save changes' - wait_for_ajax + wait_for_requests expect(page).not_to have_selector(".shortcuts-#{shortcut_name}") select 'Everyone with access', from: "project_project_feature_attributes_#{tool_name}_access_level" click_button 'Save changes' - wait_for_ajax + wait_for_requests expect(page).to have_selector(".shortcuts-#{shortcut_name}") select 'Only team members', from: "project_project_feature_attributes_#{tool_name}_access_level" click_button 'Save changes' - wait_for_ajax + wait_for_requests expect(page).to have_selector(".shortcuts-#{shortcut_name}") sleep 0.1 @@ -169,7 +169,7 @@ describe 'Edit Project Settings', feature: true do select "Disabled", from: "project_project_feature_attributes_wiki_access_level" click_button "Save changes" - wait_for_ajax + wait_for_requests visit namespace_project_path(project.namespace, project) @@ -182,7 +182,7 @@ describe 'Edit Project Settings', feature: true do select "Disabled", from: "project_project_feature_attributes_wiki_access_level" click_button "Save changes" - wait_for_ajax + wait_for_requests visit activity_namespace_project_path(project.namespace, project) @@ -223,7 +223,7 @@ describe 'Edit Project Settings', feature: true do def save_changes_and_check_activity_tab click_button "Save changes" - wait_for_ajax + wait_for_requests visit activity_namespace_project_path(project.namespace, project) diff --git a/spec/features/projects/files/browse_files_spec.rb b/spec/features/projects/files/browse_files_spec.rb index 4166aec1956..c0a9327249c 100644 --- a/spec/features/projects/files/browse_files_spec.rb +++ b/spec/features/projects/files/browse_files_spec.rb @@ -24,7 +24,7 @@ feature 'user browses project', feature: true, js: true do click_link 'files' click_link 'lfs' click_link 'lfs_object.iso' - wait_for_ajax + wait_for_requests expect(page).not_to have_content 'Download (1.5 MB)' expect(page).to have_content 'version https://git-lfs.github.com/spec/v1' @@ -36,7 +36,7 @@ feature 'user browses project', feature: true, js: true do last_commit = project.repository.last_commit_for_path(project.default_branch, 'files') click_link 'files' - wait_for_ajax + wait_for_requests page.within('.blob-commit-info') do expect(page).to have_content last_commit.short_id diff --git a/spec/features/projects/files/dockerfile_dropdown_spec.rb b/spec/features/projects/files/dockerfile_dropdown_spec.rb index 548131c7cd4..93909e91d05 100644 --- a/spec/features/projects/files/dockerfile_dropdown_spec.rb +++ b/spec/features/projects/files/dockerfile_dropdown_spec.rb @@ -19,14 +19,14 @@ feature 'User wants to add a Dockerfile file', feature: true do scenario 'user can pick a Dockerfile file from the dropdown', js: true do find('.js-dockerfile-selector').click - wait_for_ajax + wait_for_requests within '.dockerfile-selector' do find('.dropdown-input-field').set('HTTPd') find('.dropdown-content li', text: 'HTTPd').click end - wait_for_ajax + wait_for_requests expect(page).to have_css('.dockerfile-selector .dropdown-toggle-text', text: 'HTTPd') expect(page).to have_content('COPY ./ /usr/local/apache2/htdocs/') diff --git a/spec/features/projects/files/find_file_keyboard_spec.rb b/spec/features/projects/files/find_file_keyboard_spec.rb index e7a6749d8ac..ee42bcaec4b 100644 --- a/spec/features/projects/files/find_file_keyboard_spec.rb +++ b/spec/features/projects/files/find_file_keyboard_spec.rb @@ -10,7 +10,7 @@ feature 'Find file keyboard shortcuts', feature: true, js: true do visit namespace_project_find_file_path(project.namespace, project, project.repository.root_ref) - wait_for_ajax + wait_for_requests end it 'opens file when pressing enter key' do diff --git a/spec/features/projects/files/gitignore_dropdown_spec.rb b/spec/features/projects/files/gitignore_dropdown_spec.rb index e59428f8b24..e9f49453121 100644 --- a/spec/features/projects/files/gitignore_dropdown_spec.rb +++ b/spec/features/projects/files/gitignore_dropdown_spec.rb @@ -15,12 +15,12 @@ feature 'User wants to add a .gitignore file', feature: true do scenario 'user can pick a .gitignore file from the dropdown', js: true do find('.js-gitignore-selector').click - wait_for_ajax + wait_for_requests within '.gitignore-selector' do find('.dropdown-input-field').set('rails') find('.dropdown-content li', text: 'Rails').click end - wait_for_ajax + wait_for_requests expect(page).to have_css('.gitignore-selector .dropdown-toggle-text', text: 'Rails') expect(page).to have_content('/.bundle') diff --git a/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb b/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb index 85b66b93fba..031b89d0499 100644 --- a/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb +++ b/spec/features/projects/files/gitlab_ci_yml_dropdown_spec.rb @@ -15,12 +15,12 @@ feature 'User wants to add a .gitlab-ci.yml file', feature: true do scenario 'user can pick a template from the dropdown', js: true do find('.js-gitlab-ci-yml-selector').click - wait_for_ajax + wait_for_requests within '.gitlab-ci-yml-selector' do find('.dropdown-input-field').set('Jekyll') find('.dropdown-content li', text: 'Jekyll').click end - wait_for_ajax + wait_for_requests expect(page).to have_css('.gitlab-ci-yml-selector .dropdown-toggle-text', text: 'Jekyll') expect(page).to have_content('This file is a template, and might need editing before it works on your project') diff --git a/spec/features/projects/files/project_owner_creates_license_file_spec.rb b/spec/features/projects/files/project_owner_creates_license_file_spec.rb index 249830921ac..8d410cc3f2e 100644 --- a/spec/features/projects/files/project_owner_creates_license_file_spec.rb +++ b/spec/features/projects/files/project_owner_creates_license_file_spec.rb @@ -63,7 +63,7 @@ feature 'project owner creates a license file', feature: true, js: true do page.within('.js-license-selector-wrap') do click_button 'Apply a license template' click_link template - wait_for_ajax + wait_for_requests end end end diff --git a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb index 70a41886985..8e197bccabf 100644 --- a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb +++ b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb @@ -40,7 +40,7 @@ feature 'project owner sees a link to create a license file in empty project', f page.within('.js-license-selector-wrap') do click_button 'Apply a license template' click_link template - wait_for_ajax + wait_for_requests end end end diff --git a/spec/features/projects/files/undo_template_spec.rb b/spec/features/projects/files/undo_template_spec.rb index cd3af0b7d29..de10eec0557 100644 --- a/spec/features/projects/files/undo_template_spec.rb +++ b/spec/features/projects/files/undo_template_spec.rb @@ -57,7 +57,7 @@ end def select_file_template(template_selector_selector, template_name) find(template_selector_selector).click find('.dropdown-content li', text: template_name).click - wait_for_ajax + wait_for_requests end def select_file_template_type(template_type) diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index fa5e30075e3..3076c863dcb 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -34,14 +34,14 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "bug" template' do select_template 'bug' - wait_for_ajax + wait_for_requests assert_template save_changes end scenario 'user selects "bug" template and then "no template"' do select_template 'bug' - wait_for_ajax + wait_for_requests select_option 'No template' assert_template('') save_changes('') @@ -49,7 +49,7 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "bug" template, edits description and then selects "reset template"' do select_template 'bug' - wait_for_ajax + wait_for_requests find_field('issue_description').send_keys(description_addition) assert_template(template_content + description_addition) select_option 'Reset template' @@ -61,7 +61,7 @@ feature 'issuable templates', feature: true, js: true do start_height = page.evaluate_script('$(".markdown-area").outerHeight()') select_template 'test' - wait_for_ajax + wait_for_requests end_height = page.evaluate_script('$(".markdown-area").outerHeight()') @@ -88,7 +88,7 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "bug" template' do select_template 'bug' - wait_for_ajax + wait_for_requests assert_template("#{template_content}") save_changes end @@ -111,7 +111,7 @@ feature 'issuable templates', feature: true, js: true do scenario 'user selects "feature-proposal" template' do select_template 'feature-proposal' - wait_for_ajax + wait_for_requests assert_template save_changes end @@ -143,7 +143,7 @@ feature 'issuable templates', feature: true, js: true do context 'template exists in target project' do scenario 'user selects template' do select_template 'feature-proposal' - wait_for_ajax + wait_for_requests assert_template save_changes end diff --git a/spec/features/projects/labels/update_prioritization_spec.rb b/spec/features/projects/labels/update_prioritization_spec.rb index 836f81fb16d..34fafe072a3 100644 --- a/spec/features/projects/labels/update_prioritization_spec.rb +++ b/spec/features/projects/labels/update_prioritization_spec.rb @@ -24,7 +24,7 @@ feature 'Prioritize labels', feature: true do page.within('.other-labels') do all('.js-toggle-priority')[1].click - wait_for_ajax + wait_for_requests expect(page).not_to have_content('feature') end @@ -43,7 +43,7 @@ feature 'Prioritize labels', feature: true do expect(page).to have_content('feature') first('.js-toggle-priority').click - wait_for_ajax + wait_for_requests expect(page).not_to have_content('bug') end @@ -59,7 +59,7 @@ feature 'Prioritize labels', feature: true do page.within('.other-labels') do first('.js-toggle-priority').click - wait_for_ajax + wait_for_requests expect(page).not_to have_content('bug') end @@ -78,7 +78,7 @@ feature 'Prioritize labels', feature: true do expect(page).to have_content('bug') first('.js-toggle-priority').click - wait_for_ajax + wait_for_requests expect(page).not_to have_content('bug') end @@ -107,7 +107,7 @@ feature 'Prioritize labels', feature: true do end refresh - wait_for_ajax + wait_for_requests page.within('.prioritized-labels') do expect(first('li')).to have_content('feature') diff --git a/spec/features/projects/members/group_links_spec.rb b/spec/features/projects/members/group_links_spec.rb index ab2b089db2e..3d253f01484 100644 --- a/spec/features/projects/members/group_links_spec.rb +++ b/spec/features/projects/members/group_links_spec.rb @@ -20,7 +20,7 @@ feature 'Projects > Members > Anonymous user sees members', feature: true, js: t click_link 'Guest' end - wait_for_ajax + wait_for_requests visit namespace_project_settings_members_path(project.namespace, project) @@ -31,7 +31,7 @@ feature 'Projects > Members > Anonymous user sees members', feature: true, js: t tomorrow = Date.today + 3 fill_in "member_expires_at_#{group.id}", with: tomorrow.strftime("%F") - wait_for_ajax + wait_for_requests page.within(find('li.group_member')) do expect(page).to have_content('Expires in') @@ -42,7 +42,7 @@ feature 'Projects > Members > Anonymous user sees members', feature: true, js: t page.within(first('.group_member')) do find('.btn-remove').click end - wait_for_ajax + wait_for_requests expect(page).not_to have_selector('.group_member') end diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb index 19d14ad9af4..1e6f15d8258 100644 --- a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb +++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb @@ -38,7 +38,7 @@ feature 'Projects > Members > Master adds member with expiration date', feature: page.within "#project_member_#{new_member.project_members.first.id}" do find('.js-access-expiration-date').set date.to_s(:medium) - wait_for_ajax + wait_for_requests expect(page).to have_content('Expires in 3 days') end end diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb index a521222fc9c..f40e1bc4930 100644 --- a/spec/features/projects/pipeline_schedules_spec.rb +++ b/spec/features/projects/pipeline_schedules_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' feature 'Pipeline Schedules', :feature do include PipelineSchedulesHelper - include WaitForAjax let!(:project) { create(:project) } let!(:pipeline_schedule) { create(:ci_pipeline_schedule, :nightly, project: project ) } diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 5f82cf2f5e5..a97a92aa64f 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe 'Pipelines', :feature, :js do - include WaitForVueResource - let(:project) { create(:empty_project) } context 'when user is logged in' do @@ -54,7 +52,7 @@ describe 'Pipelines', :feature, :js do context 'header tabs' do before do visit namespace_project_pipelines_path(project.namespace, project) - wait_for_vue_resource + wait_for_requests end it 'shows a tab for All pipelines and count' do @@ -106,7 +104,7 @@ describe 'Pipelines', :feature, :js do context 'when canceling' do before do find('.js-pipelines-cancel-button').click - wait_for_vue_resource + wait_for_requests end it 'indicated that pipelines was canceled' do @@ -136,7 +134,7 @@ describe 'Pipelines', :feature, :js do context 'when retrying' do before do find('.js-pipelines-retry-button').click - wait_for_vue_resource + wait_for_requests end it 'shows running pipeline that is not retryable' do @@ -356,14 +354,14 @@ describe 'Pipelines', :feature, :js do it 'should render pagination' do visit namespace_project_pipelines_path(project.namespace, project) - wait_for_vue_resource + wait_for_requests expect(page).to have_selector('.gl-pagination') end it 'should render second page of pipelines' do visit namespace_project_pipelines_path(project.namespace, project, page: '2') - wait_for_vue_resource + wait_for_requests expect(page).to have_selector('.gl-pagination .page', count: 2) end @@ -392,7 +390,7 @@ describe 'Pipelines', :feature, :js do create(:generic_commit_status, pipeline: pipeline, stage: 'external', name: 'jenkins', stage_idx: 3) visit namespace_project_pipeline_path(project.namespace, project, pipeline) - wait_for_vue_resource + wait_for_requests end it 'shows a graph with grouped stages' do @@ -507,6 +505,6 @@ describe 'Pipelines', :feature, :js do def visit_project_pipelines(**query) visit namespace_project_pipelines_path(project.namespace, project, query) - wait_for_vue_resource + wait_for_requests end end diff --git a/spec/features/projects/ref_switcher_spec.rb b/spec/features/projects/ref_switcher_spec.rb index 881ad7910dd..04414490571 100644 --- a/spec/features/projects/ref_switcher_spec.rb +++ b/spec/features/projects/ref_switcher_spec.rb @@ -12,12 +12,12 @@ feature 'Ref switcher', feature: true, js: true do it 'allow user to change ref by enter key' do click_button 'master' - wait_for_ajax + wait_for_requests page.within '.project-refs-form' do input = find('input[type="search"]') input.set 'binary' - wait_for_ajax + wait_for_requests expect(find('.dropdown-content ul')).to have_selector('li', count: 6) @@ -31,7 +31,7 @@ feature 'Ref switcher', feature: true, js: true do it "user selects ref with special characters" do click_button 'master' - wait_for_ajax + wait_for_requests page.within '.project-refs-form' do page.fill_in 'Search branches and tags', with: "'test'" diff --git a/spec/features/projects/snippets/show_spec.rb b/spec/features/projects/snippets/show_spec.rb index cedf3778c7e..b844e60e5d5 100644 --- a/spec/features/projects/snippets/show_spec.rb +++ b/spec/features/projects/snippets/show_spec.rb @@ -17,7 +17,7 @@ feature 'Project snippet', :js, feature: true do before do visit namespace_project_snippet_path(project.namespace, project, snippet) - wait_for_ajax + wait_for_requests end it 'displays the blob' do @@ -48,7 +48,7 @@ feature 'Project snippet', :js, feature: true do before do visit namespace_project_snippet_path(project.namespace, project, snippet) - wait_for_ajax + wait_for_requests end it 'displays the blob using the rich viewer' do @@ -78,7 +78,7 @@ feature 'Project snippet', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=simple]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the simple viewer' do @@ -99,7 +99,7 @@ feature 'Project snippet', :js, feature: true do before do find('.js-blob-viewer-switch-btn[data-viewer=rich]').click - wait_for_ajax + wait_for_requests end it 'displays the blob using the rich viewer' do @@ -120,7 +120,7 @@ feature 'Project snippet', :js, feature: true do before do visit namespace_project_snippet_path(project.namespace, project, snippet, anchor: 'L1') - wait_for_ajax + wait_for_requests end it 'displays the blob using the simple viewer' do diff --git a/spec/features/projects/view_on_env_spec.rb b/spec/features/projects/view_on_env_spec.rb index b7a41ca54e6..640f1376548 100644 --- a/spec/features/projects/view_on_env_spec.rb +++ b/spec/features/projects/view_on_env_spec.rb @@ -54,7 +54,7 @@ describe 'View on environment', js: true do visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do @@ -70,7 +70,7 @@ describe 'View on environment', js: true do visit namespace_project_compare_path(project.namespace, project, from: 'master', to: branch_name) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do @@ -84,7 +84,7 @@ describe 'View on environment', js: true do visit namespace_project_compare_path(project.namespace, project, from: 'master', to: sha) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do @@ -98,7 +98,7 @@ describe 'View on environment', js: true do visit namespace_project_blob_path(project.namespace, project, File.join(branch_name, file_path)) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do @@ -112,7 +112,7 @@ describe 'View on environment', js: true do visit namespace_project_blob_path(project.namespace, project, File.join(sha, file_path)) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do @@ -126,7 +126,7 @@ describe 'View on environment', js: true do visit namespace_project_commit_path(project.namespace, project, sha) - wait_for_ajax + wait_for_requests end it 'has a "View on env" button' do |