summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:40 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-21 12:06:40 +0000
commit0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1 (patch)
tree9ff7dd7b21a3f9642a8fbb45c922f71a433faf02 /qa
parenta048261403ea7e12992ccffe704f0779235712d7 (diff)
downloadgitlab-ce-0a6ffb540e569bd7a7c548d59b12bc55d4bf9cf1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/resource/deploy_token.rb8
-rw-r--r--qa/qa/resource/file.rb10
-rw-r--r--qa/qa/resource/fork.rb4
-rw-r--r--qa/qa/resource/kubernetes_cluster.rb36
-rw-r--r--qa/qa/resource/label.rb10
-rw-r--r--qa/qa/resource/merge_request.rb16
-rw-r--r--qa/qa/resource/personal_access_token.rb8
-rw-r--r--qa/qa/resource/project.rb22
-rw-r--r--qa/qa/resource/project_imported_from_github.rb16
-rw-r--r--qa/qa/resource/project_milestone.rb6
-rw-r--r--qa/qa/resource/snippet.rb14
-rw-r--r--qa/qa/resource/ssh_key.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb10
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb8
20 files changed, 99 insertions, 103 deletions
diff --git a/qa/qa/resource/deploy_token.rb b/qa/qa/resource/deploy_token.rb
index f0f0da27412..f97e76cc322 100644
--- a/qa/qa/resource/deploy_token.rb
+++ b/qa/qa/resource/deploy_token.rb
@@ -6,16 +6,16 @@ module QA
attr_accessor :name, :expires_at
attribute :username do
- Page::Project::Settings::Repository.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.expand_deploy_tokens do |token|
+ Page::Project::Settings::Repository.perform do |repository_page|
+ repository_page.expand_deploy_tokens do |token|
token.token_username
end
end
end
attribute :password do
- Page::Project::Settings::Repository.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.expand_deploy_tokens do |token|
+ Page::Project::Settings::Repository.perform do |repository_page|
+ repository_page.expand_deploy_tokens do |token|
token.token_password
end
end
diff --git a/qa/qa/resource/file.rb b/qa/qa/resource/file.rb
index a870e7d5d26..76c4c71c48d 100644
--- a/qa/qa/resource/file.rb
+++ b/qa/qa/resource/file.rb
@@ -27,11 +27,11 @@ module QA
Page::Project::Show.perform(&:create_first_new_file!)
- Page::File::Form.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_name(@name)
- page.add_content(@content)
- page.add_commit_message(@commit_message)
- page.commit_changes
+ Page::File::Form.perform do |form|
+ form.add_name(@name)
+ form.add_content(@content)
+ form.add_commit_message(@commit_message)
+ form.commit_changes
end
end
diff --git a/qa/qa/resource/fork.rb b/qa/qa/resource/fork.rb
index d203e8eb264..73f1b0b9695 100644
--- a/qa/qa/resource/fork.rb
+++ b/qa/qa/resource/fork.rb
@@ -41,8 +41,8 @@ module QA
fork_new.choose_namespace(user.name)
end
- Page::Layout::Banner.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.has_notice?('The project was successfully forked.')
+ Page::Layout::Banner.perform do |banner|
+ banner.has_notice?('The project was successfully forked.')
end
populate(:project)
diff --git a/qa/qa/resource/kubernetes_cluster.rb b/qa/qa/resource/kubernetes_cluster.rb
index 6778094cee4..1930e0465b2 100644
--- a/qa/qa/resource/kubernetes_cluster.rb
+++ b/qa/qa/resource/kubernetes_cluster.rb
@@ -24,36 +24,36 @@ module QA
Page::Project::Operations::Kubernetes::Add.perform(
&:add_existing_cluster)
- Page::Project::Operations::Kubernetes::AddExisting.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.set_cluster_name(@cluster.cluster_name)
- page.set_api_url(@cluster.api_url)
- page.set_ca_certificate(@cluster.ca_certificate)
- page.set_token(@cluster.token)
- page.uncheck_rbac! unless @cluster.rbac
- page.add_cluster!
+ Page::Project::Operations::Kubernetes::AddExisting.perform do |cluster_page|
+ cluster_page.set_cluster_name(@cluster.cluster_name)
+ cluster_page.set_api_url(@cluster.api_url)
+ cluster_page.set_ca_certificate(@cluster.ca_certificate)
+ cluster_page.set_token(@cluster.token)
+ cluster_page.uncheck_rbac! unless @cluster.rbac
+ cluster_page.add_cluster!
end
if @install_helm_tiller
- Page::Project::Operations::Kubernetes::Show.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
+ Page::Project::Operations::Kubernetes::Show.perform do |show|
# We must wait a few seconds for permissions to be set up correctly for new cluster
sleep 10
# Helm must be installed before everything else
- page.install!(:helm)
- page.await_installed(:helm)
+ show.install!(:helm)
+ show.await_installed(:helm)
- page.install!(:ingress) if @install_ingress
- page.install!(:prometheus) if @install_prometheus
- page.install!(:runner) if @install_runner
+ show.install!(:ingress) if @install_ingress
+ show.install!(:prometheus) if @install_prometheus
+ show.install!(:runner) if @install_runner
- page.await_installed(:ingress) if @install_ingress
- page.await_installed(:prometheus) if @install_prometheus
- page.await_installed(:runner) if @install_runner
+ show.await_installed(:ingress) if @install_ingress
+ show.await_installed(:prometheus) if @install_prometheus
+ show.await_installed(:runner) if @install_runner
if @install_ingress
populate(:ingress_ip)
- page.set_domain("#{ingress_ip}.nip.io")
- page.save_domain
+ show.set_domain("#{ingress_ip}.nip.io")
+ show.save_domain
end
end
end
diff --git a/qa/qa/resource/label.rb b/qa/qa/resource/label.rb
index a9177ef3df6..6b0b0184130 100644
--- a/qa/qa/resource/label.rb
+++ b/qa/qa/resource/label.rb
@@ -28,11 +28,11 @@ module QA
Page::Project::Menu.perform(&:go_to_labels)
Page::Label::Index.perform(&:click_new_label_button)
- Page::Label::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.fill_title(@title)
- page.fill_description(@description)
- page.fill_color(@color)
- page.click_label_create_button
+ Page::Label::New.perform do |new_page|
+ new_page.fill_title(@title)
+ new_page.fill_description(@description)
+ new_page.fill_color(@color)
+ new_page.click_label_create_button
end
end
diff --git a/qa/qa/resource/merge_request.rb b/qa/qa/resource/merge_request.rb
index 1a6de8de456..24fb96a20a2 100644
--- a/qa/qa/resource/merge_request.rb
+++ b/qa/qa/resource/merge_request.rb
@@ -65,17 +65,17 @@ module QA
project.visit!
Page::Project::Show.perform(&:new_merge_request)
- Page::MergeRequest::New.perform do |new|
- new.fill_title(@title)
- new.fill_description(@description)
- new.choose_milestone(@milestone) if @milestone
- new.assign_to_me if @assignee == 'me'
+ Page::MergeRequest::New.perform do |new_page|
+ new_page.fill_title(@title)
+ new_page.fill_description(@description)
+ new_page.choose_milestone(@milestone) if @milestone
+ new_page.assign_to_me if @assignee == 'me'
labels.each do |label|
- new.select_label(label)
+ new_page.select_label(label)
end
- new.add_approval_rules(approval_rules) if approval_rules
+ new_page.add_approval_rules(approval_rules) if approval_rules
- new.create_merge_request
+ new_page.create_merge_request
end
end
diff --git a/qa/qa/resource/personal_access_token.rb b/qa/qa/resource/personal_access_token.rb
index f5bebd25202..3b61b3f337c 100644
--- a/qa/qa/resource/personal_access_token.rb
+++ b/qa/qa/resource/personal_access_token.rb
@@ -16,10 +16,10 @@ module QA
Page::Main::Menu.perform(&:click_settings_link)
Page::Profile::Menu.perform(&:click_access_tokens)
- Page::Profile::PersonalAccessTokens.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.fill_token_name(name || 'api-test-token')
- page.check_api
- page.click_create_token_button
+ Page::Profile::PersonalAccessTokens.perform do |token_page|
+ token_page.fill_token_name(name || 'api-test-token')
+ token_page.check_api
+ token_page.click_create_token_button
end
end
end
diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb
index 3bebe2aaeda..b2b62184837 100644
--- a/qa/qa/resource/project.rb
+++ b/qa/qa/resource/project.rb
@@ -32,14 +32,14 @@ module QA
end
attribute :repository_ssh_location do
- Page::Project::Show.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.repository_clone_ssh_location
+ Page::Project::Show.perform do |show|
+ show.repository_clone_ssh_location
end
end
attribute :repository_http_location do
- Page::Project::Show.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.repository_clone_http_location
+ Page::Project::Show.perform do |show|
+ show.repository_clone_http_location
end
end
@@ -62,13 +62,13 @@ module QA
Page::Group::Show.perform(&:go_to_new_project)
end
- Page::Project::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.choose_test_namespace
- page.choose_name(@name)
- page.add_description(@description)
- page.set_visibility(@visibility)
- page.enable_initialize_with_readme if @initialize_with_readme
- page.create_new_project
+ Page::Project::New.perform do |new_page|
+ new_page.choose_test_namespace
+ new_page.choose_name(@name)
+ new_page.add_description(@description)
+ new_page.set_visibility(@visibility)
+ new_page.enable_initialize_with_readme if @initialize_with_readme
+ new_page.create_new_project
end
end
diff --git a/qa/qa/resource/project_imported_from_github.rb b/qa/qa/resource/project_imported_from_github.rb
index e4a9a8bcd3d..3e25235e6b8 100644
--- a/qa/qa/resource/project_imported_from_github.rb
+++ b/qa/qa/resource/project_imported_from_github.rb
@@ -17,18 +17,14 @@ module QA
Page::Group::Show.perform(&:go_to_new_project)
- Page::Project::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.click_import_project
- end
+ Page::Project::New.perform(&:click_import_project)
- Page::Project::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.click_github_link
- end
+ Page::Project::New.perform(&:click_github_link)
- Page::Project::Import::Github.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_personal_access_token(@personal_access_token)
- page.list_repos
- page.import!(@github_repository_path, @name)
+ Page::Project::Import::Github.perform do |import_page|
+ import_page.add_personal_access_token(@personal_access_token)
+ import_page.list_repos
+ import_page.import!(@github_repository_path, @name)
end
end
end
diff --git a/qa/qa/resource/project_milestone.rb b/qa/qa/resource/project_milestone.rb
index 39077b64a22..11aad4ae65f 100644
--- a/qa/qa/resource/project_milestone.rb
+++ b/qa/qa/resource/project_milestone.rb
@@ -18,9 +18,9 @@ module QA
def fabricate!
project.visit!
- Page::Project::Menu.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.click_issues
- page.click_milestones
+ Page::Project::Menu.perform do |menu|
+ menu.click_issues
+ menu.click_milestones
end
Page::Project::Milestone::Index.perform(&:click_new_milestone)
diff --git a/qa/qa/resource/snippet.rb b/qa/qa/resource/snippet.rb
index 23c17fdb32a..39be5e5cb7d 100644
--- a/qa/qa/resource/snippet.rb
+++ b/qa/qa/resource/snippet.rb
@@ -16,13 +16,13 @@ module QA
def fabricate!
Page::Dashboard::Snippet::Index.perform(&:go_to_new_snippet_page)
- Page::Dashboard::Snippet::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.fill_title(@title)
- page.fill_description(@description)
- page.set_visibility(@visibility)
- page.fill_file_name(@file_name)
- page.fill_file_content(@file_content)
- page.click_create_snippet_button
+ Page::Dashboard::Snippet::New.perform do |new_page|
+ new_page.fill_title(@title)
+ new_page.fill_description(@description)
+ new_page.set_visibility(@visibility)
+ new_page.fill_file_name(@file_name)
+ new_page.fill_file_content(@file_content)
+ new_page.click_create_snippet_button
end
end
end
diff --git a/qa/qa/resource/ssh_key.rb b/qa/qa/resource/ssh_key.rb
index 9b6494c11bc..c140cb9ca62 100644
--- a/qa/qa/resource/ssh_key.rb
+++ b/qa/qa/resource/ssh_key.rb
@@ -17,8 +17,8 @@ module QA
Page::Main::Menu.perform(&:click_settings_link)
Page::Profile::Menu.perform(&:click_ssh_keys)
- Page::Profile::SSHKeys.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_key(public_key, title)
+ Page::Profile::SSHKeys.perform do |profile_page|
+ profile_page.add_key(public_key, title)
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
index de33349a8b2..66c56c86fc8 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb
@@ -8,10 +8,10 @@ module QA
Page::Main::Login.perform(&:sign_in_using_credentials)
Page::Main::Menu.perform(&:go_to_groups)
- Page::Dashboard::Groups.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.click_new_group
+ Page::Dashboard::Groups.perform do |groups|
+ groups.click_new_group
- expect(page).to have_content(
+ expect(groups).to have_content(
/Create a Mattermost team for this group/
)
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
index babe6f7741f..e66c12c1301 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb
@@ -11,8 +11,8 @@ module QA
Runtime::Browser.visit(:mattermost, Page::Mattermost::Login)
Page::Mattermost::Login.perform(&:sign_in_using_oauth)
- Page::Mattermost::Main.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- expect(page).to have_content(/(Welcome to: Mattermost|Logout GitLab Mattermost)/)
+ Page::Mattermost::Main.perform do |mattermost|
+ expect(mattermost).to have_content(/(Welcome to: Mattermost|Logout GitLab Mattermost)/)
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
index 07298b8a9be..abb46463ed2 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
@@ -15,8 +15,8 @@ module QA
project.visit!
Page::Project::Menu.perform(&:go_to_members_settings)
- Page::Project::Settings::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_member(user.username)
+ Page::Project::Settings::Members.perform do |members|
+ members.add_member(user.username)
end
expect(page).to have_content(/@#{user.username}(\n| )?Given access/)
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
index 69389672a6d..494108dbefc 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
@@ -27,8 +27,8 @@ module QA
project.visit!
Page::Project::Show.perform(&:go_to_members_settings)
- Page::Project::Settings::Members.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.add_member(user.username)
+ Page::Project::Settings::Members.perform do |members|
+ members.add_member(user.username)
end
issue = Resource::Issue.fabricate_via_api! do |issue|
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
index e15afd1f576..400679365be 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
@@ -23,12 +23,12 @@ module QA
it 'user sees issue suggestions when creating a new issue' do
Page::Project::Show.perform(&:go_to_new_issue)
- Page::Project::Issue::New.perform do |new|
- new.add_title("issue")
- expect(new).to have_content(issue_title)
+ Page::Project::Issue::New.perform do |new_page|
+ new_page.add_title("issue")
+ expect(new_page).to have_content(issue_title)
- new.add_title("Issue Board")
- expect(new).not_to have_content(issue_title)
+ new_page.add_title("Issue Board")
+ expect(new_page).not_to have_content(issue_title)
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
index 318adc3c272..71b9971a0af 100644
--- a/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb
@@ -50,10 +50,10 @@ module QA
@project.visit!
Page::Project::Show.perform(&:open_web_ide!)
- Page::Project::WebIDE::Edit.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.create_new_file_from_template template[:file_name], template[:name]
+ Page::Project::WebIDE::Edit.perform do |ide|
+ ide.create_new_file_from_template template[:file_name], template[:name]
- expect(page.has_file?(template[:file_name])).to be_truthy
+ expect(ide.has_file?(template[:file_name])).to be_truthy
end
expect(page).to have_button('Undo')
diff --git a/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb b/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
index 2c3f2c86c23..770d66141eb 100644
--- a/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb
@@ -16,9 +16,9 @@ module QA
validate_content('My First Wiki Content')
Page::Project::Wiki::Edit.perform(&:click_edit)
- Page::Project::Wiki::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- page.set_content("My Second Wiki Content")
- page.save_changes
+ Page::Project::Wiki::New.perform do |wiki|
+ wiki.set_content("My Second Wiki Content")
+ wiki.save_changes
end
validate_content('My Second Wiki Content')
diff --git a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
index 167a68dab00..757d047b728 100644
--- a/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
+++ b/qa/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb
@@ -23,10 +23,10 @@ module QA
issue.title = 'Performance bar test'
end
- Page::Layout::PerformanceBar.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
- expect(page).to have_performance_bar
- expect(page).to have_detailed_metrics
- expect(page).to have_request_for('realtime_changes') # Always requested on issue pages
+ Page::Layout::PerformanceBar.perform do |bar_component|
+ expect(bar_component).to have_performance_bar
+ expect(bar_component).to have_detailed_metrics
+ expect(bar_component).to have_request_for('realtime_changes') # Always requested on issue pages
end
end
end