Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project')
-rw-r--r--features/steps/project/builds/artifacts.rb4
-rw-r--r--features/steps/project/forked_merge_requests.rb7
-rw-r--r--features/steps/project/merge_requests.rb45
-rw-r--r--features/steps/project/merge_requests/acceptance.rb6
-rw-r--r--features/steps/project/merge_requests/revert.rb4
-rw-r--r--features/steps/project/project.rb4
-rw-r--r--features/steps/project/project_milestone.rb4
-rw-r--r--features/steps/project/snippets.rb6
-rw-r--r--features/steps/project/source/browse_files.rb6
-rw-r--r--features/steps/project/source/markdown_render.rb22
10 files changed, 53 insertions, 55 deletions
diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb
index 89132ff068f..4b72355b125 100644
--- a/features/steps/project/builds/artifacts.rb
+++ b/features/steps/project/builds/artifacts.rb
@@ -3,7 +3,7 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
include SharedProject
include SharedBuilds
include RepoHelpers
- include WaitForAjax
+ include WaitForRequests
step 'I click artifacts download button' do
click_link 'Download'
@@ -79,7 +79,7 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps
step 'I click a link to file within build artifacts' do
page.within('.tree-table') { find_link('ci_artifacts.txt').click }
- wait_for_ajax
+ wait_for_requests
end
step 'I see a download link' do
diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb
index 29055373a57..25514eb9ef2 100644
--- a/features/steps/project/forked_merge_requests.rb
+++ b/features/steps/project/forked_merge_requests.rb
@@ -4,8 +4,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
include SharedNote
include SharedPaths
include Select2Helper
- include WaitForVueResource
- include WaitForAjax
+ include WaitForRequests
step 'I am a member of project "Shop"' do
@project = ::Project.find_by(name: "Shop")
@@ -34,7 +33,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
expect(page).to have_content @merge_request.source_branch
expect(page).to have_content @merge_request.target_branch
- wait_for_vue_resource
+ wait_for_requests
end
step 'I fill out a "Merge Request On Forked Project" merge request' do
@@ -48,7 +47,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
first('.dropdown-target-project a', text: @project.path_with_namespace)
first('.js-source-branch').click
- wait_for_ajax
+ wait_for_requests
first('.dropdown-source-branch .dropdown-content a', text: 'fix').click
click_button "Compare branches and continue"
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 8133760e619..3994eeb397e 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -7,11 +7,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
include SharedMarkdown
include SharedDiffNote
include SharedUser
- include WaitForAjax
- include WaitForVueResource
+ include WaitForRequests
after do
- wait_for_ajax if javascript_test?
+ wait_for_requests if javascript_test?
end
step 'I click link "New Merge Request"' do
@@ -46,23 +45,23 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.within '.merge-request' do
expect(page).to have_content "Wiki Feature"
end
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should see closed merge request "Bug NS-04"' do
expect(page).to have_content "Bug NS-04"
expect(page).to have_content "Closed by"
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should see merge request "Bug NS-04"' do
expect(page).to have_content "Bug NS-04"
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should see merge request "Feature NS-05"' do
expect(page).to have_content "Feature NS-05"
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should not see "master" branch' do
@@ -99,7 +98,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I click button "Unsubscribe"' do
click_on "Unsubscribe"
- wait_for_ajax
+ wait_for_requests
end
step 'I click link "Close"' do
@@ -353,7 +352,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see a discussion by user "John Doe" has started on diff' do
# Trigger a refresh of notes
execute_script("$(document).trigger('visibilitychange');")
- wait_for_ajax
+ wait_for_requests
page.within(".notes .discussion") do
page.should have_content "#{user_exists("John Doe").name} #{user_exists("John Doe").to_reference} started a discussion"
page.should have_content sample_commit.line_code_path
@@ -363,12 +362,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see a badge of "1" next to the discussion link' do
expect_discussion_badge_to_have_counter("1")
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should see a badge of "0" next to the discussion link' do
expect_discussion_badge_to_have_counter("0")
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should see a discussion has started on commit diff' do
@@ -376,7 +375,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.should have_content "#{current_user.name} #{current_user.to_reference} started a discussion on commit"
page.should have_content sample_commit.line_code_path
page.should have_content "Line is wrong"
- wait_for_vue_resource
+ wait_for_requests
end
end
@@ -384,7 +383,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.within(".notes .discussion") do
page.should have_content "#{current_user.name} #{current_user.to_reference} started a discussion on commit"
page.should have_content "One comment to rule them all"
- wait_for_vue_resource
+ wait_for_requests
end
end
@@ -410,7 +409,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see merged request' do
page.within '.status-box' do
expect(page).to have_content "Merged"
- wait_for_vue_resource
+ wait_for_requests
end
end
@@ -422,7 +421,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.within '.status-box' do
expect(page).to have_content "Open"
end
- wait_for_vue_resource
+ wait_for_requests
end
step 'I click link "Hide inline discussion" of the third file' do
@@ -446,7 +445,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see a comment like "Line is wrong" in the third file' do
page.within '.files>div:nth-child(3) .note-body > .note-text' do
expect(page).to have_visible_content "Line is wrong"
- wait_for_vue_resource
+ wait_for_requests
end
end
@@ -470,7 +469,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Comment"
end
- wait_for_ajax
+ wait_for_requests
page.within ".files>div:nth-child(2) .note-body > .note-text" do
expect(page).to have_content "Line is correct"
@@ -485,7 +484,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Comment"
end
- wait_for_ajax
+ wait_for_requests
end
step 'I should still see a comment like "Line is correct" in the second file' do
@@ -514,7 +513,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see comments on the side-by-side diff page' do
page.within '.files>div:nth-child(2) .parallel .note-body > .note-text' do
expect(page).to have_visible_content "Line is correct"
- wait_for_vue_resource
+ wait_for_requests
end
end
@@ -538,7 +537,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see new target branch changes' do
expect(page).to have_content 'Request to merge fix into feature'
expect(page).to have_content 'changed target branch from merge-test to feature'
- wait_for_ajax
+ wait_for_requests
end
step 'I click on "Email Patches"' do
@@ -572,7 +571,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect(page).to have_content /([0-9]+ commits behind)/
end
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should not see the diverged commits count' do
@@ -580,7 +579,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
expect(page).not_to have_content /([0-9]+ commit[s]? behind)/
end
- wait_for_vue_resource
+ wait_for_requests
end
def merge_request
@@ -597,7 +596,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button "Comment"
end
- wait_for_ajax
+ wait_for_requests
page.within(".notes_holder", visible: true) do
expect(page).to have_content message
diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb
index 3c976f675a2..023f9bef8e5 100644
--- a/features/steps/project/merge_requests/acceptance.rb
+++ b/features/steps/project/merge_requests/acceptance.rb
@@ -1,7 +1,7 @@
class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
include LoginHelpers
include GitlabRoutingHelper
- include WaitForVueResource
+ include WaitForRequests
step 'I am on the Merge Request detail page' do
visit merge_request_path(@merge_request)
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
# Wait for View Resource requests to complete so they don't blow up if they are
# only handled after `DatabaseCleaner` has already run
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should not see the Remove Source Branch button' do
@@ -32,7 +32,7 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
# Wait for View Resource requests to complete so they don't blow up if they are
# only handled after `DatabaseCleaner` has already run
- wait_for_vue_resource
+ wait_for_requests
end
step 'There is an open Merge Request' do
diff --git a/features/steps/project/merge_requests/revert.rb b/features/steps/project/merge_requests/revert.rb
index aa76d6f8c48..98d990f112f 100644
--- a/features/steps/project/merge_requests/revert.rb
+++ b/features/steps/project/merge_requests/revert.rb
@@ -1,7 +1,7 @@
class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
include LoginHelpers
include GitlabRoutingHelper
- include WaitForVueResource
+ include WaitForRequests
step 'I click on the revert button' do
find("a[href='#modal-revert-commit']").click
@@ -16,7 +16,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
step 'I should see the revert merge request notice' do
page.should have_content('The merge request has been successfully reverted.')
- wait_for_vue_resource
+ wait_for_requests
end
step 'I should not see the revert button' do
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 9c2196a8ef7..de32c9afcca 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -2,7 +2,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedPaths
- include WaitForAjax
+ include WaitForRequests
step 'change project settings' do
fill_in 'project_name_edit', with: 'NewName'
@@ -87,7 +87,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
step 'I should see project "Shop" README' do
- wait_for_ajax
+ wait_for_requests
page.within('.readme-holder') do
expect(page).to have_content 'testme'
end
diff --git a/features/steps/project/project_milestone.rb b/features/steps/project/project_milestone.rb
index dc1190b7eea..a7d3352b8c4 100644
--- a/features/steps/project/project_milestone.rb
+++ b/features/steps/project/project_milestone.rb
@@ -2,7 +2,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps
include SharedAuthentication
include SharedProject
include SharedPaths
- include WaitForAjax
+ include WaitForRequests
step 'milestone has issue "Bugfix1" with labels: "bug", "feature"' do
project = Project.find_by(name: "Shop")
@@ -35,7 +35,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps
end
step 'I should see the labels "bug", "enhancement" and "feature"' do
- wait_for_ajax
+ wait_for_requests
page.within('#tab-issues') do
expect(page).to have_content 'bug'
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index 60febd20104..e3f5e9e3ef3 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -3,7 +3,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
include SharedProject
include SharedNote
include SharedPaths
- include WaitForAjax
+ include WaitForRequests
step 'project "Shop" have "Snippet one" snippet' do
create(:project_snippet,
@@ -59,7 +59,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
find('.ace_editor').native.send_keys 'Content of snippet three'
end
click_button "Create snippet"
- wait_for_ajax
+ wait_for_requests
end
step 'I should see snippet "Snippet three"' do
@@ -81,7 +81,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
fill_in "note_note", with: "Good snippet!"
click_button "Comment"
end
- wait_for_ajax
+ wait_for_requests
end
step 'I should see comment "Good snippet!"' do
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index ef09bddddd8..6efd4374b32 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -4,7 +4,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
include SharedProject
include SharedPaths
include RepoHelpers
- include WaitForAjax
+ include WaitForRequests
step "I don't have write access" do
@project = create(:project, :repository, name: "Other Project", path: "other-project")
@@ -37,12 +37,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I should see its content' do
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content old_gitignore_content
end
step 'I should see its new content' do
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content new_gitignore_content
end
diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb
index ada0ff20585..0fee158d590 100644
--- a/features/steps/project/source/markdown_render.rb
+++ b/features/steps/project/source/markdown_render.rb
@@ -5,7 +5,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedMarkdown
- include WaitForAjax
+ include WaitForRequests
step 'I own project "Delta"' do
@project = ::Project.find_by(name: "Delta")
@@ -35,7 +35,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I should see correct document rendered' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "All API requests require authentication"
end
@@ -65,7 +65,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I should see correct maintenance file rendered' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/raketasks/maintenance.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "bundle exec rake gitlab:env:info RAILS_ENV=production"
end
@@ -97,7 +97,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I see correct file rendered' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "Contents"
expect(page).to have_link "Users"
expect(page).to have_link "Rake tasks"
@@ -120,7 +120,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
When 'I visit markdown branch' do
visit namespace_project_tree_path(@project.namespace, @project, "markdown")
- wait_for_ajax
+ wait_for_requests
end
When 'I visit markdown branch "README.md" blob' do
@@ -143,7 +143,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I see correct file rendered in markdown branch' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "Contents"
expect(page).to have_link "Users"
expect(page).to have_link "Rake tasks"
@@ -151,7 +151,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I should see correct document rendered for markdown branch' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "All API requests require authentication"
end
@@ -169,7 +169,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
# Expected link contents
step 'The link with text "empty" should have url "tree/markdown"' do
- wait_for_ajax
+ wait_for_requests
find('a', text: /^empty$/)['href'] == current_host + namespace_project_tree_path(@project.namespace, @project, "markdown")
end
@@ -205,7 +205,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'The link with text "ID" should have url "blob/markdown/README.mdID"' do
- wait_for_ajax
+ wait_for_requests
find('a', text: /^#id$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/README.md") + '#id'
end
@@ -300,12 +300,12 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I should see the correct markdown' do
expect(current_path).to eq namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/users.md")
- wait_for_ajax
+ wait_for_requests
expect(page).to have_content "List users"
end
step 'Header "Application details" should have correct id and link' do
- wait_for_ajax
+ wait_for_requests
header_should_have_correct_id_and_link(2, 'Application details', 'application-details')
end