summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 21:09:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 21:09:17 +0000
commit68f1860e6f1f9e8441c434f4e62238c359ce8c7c (patch)
treed12eab92b88fdcd0bdcea4586ec5352898b16e6c /qa
parent1af0d38d9c5a88d7123283c714857dc4da991371 (diff)
downloadgitlab-ce-68f1860e6f1f9e8441c434f4e62238c359ce8c7c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb1
-rw-r--r--qa/qa/page/component/breadcrumbs.rb19
-rw-r--r--qa/qa/page/project/show.rb11
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb9
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb6
7 files changed, 46 insertions, 10 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 57b622c7d93..547b8fb94af 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -385,6 +385,7 @@ module QA
# Classes describing components that are used by several pages.
#
module Component
+ autoload :Breadcrumbs, 'qa/page/component/breadcrumbs'
autoload :CiBadgeLink, 'qa/page/component/ci_badge_link'
autoload :ClonePanel, 'qa/page/component/clone_panel'
autoload :LazyLoader, 'qa/page/component/lazy_loader'
diff --git a/qa/qa/page/component/breadcrumbs.rb b/qa/qa/page/component/breadcrumbs.rb
new file mode 100644
index 00000000000..656aa380bbd
--- /dev/null
+++ b/qa/qa/page/component/breadcrumbs.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Component
+ module Breadcrumbs
+ def self.included(base)
+ base.view 'app/views/layouts/nav/_breadcrumbs.html.haml' do
+ element :breadcrumb_links_content
+ end
+ end
+
+ def has_breadcrumb?(text)
+ has_element?(:breadcrumb_links_content, text: text)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb
index 61047c42fcc..00298ff9fb5 100644
--- a/qa/qa/page/project/show.rb
+++ b/qa/qa/page/project/show.rb
@@ -5,8 +5,13 @@ module QA
module Project
class Show < Page::Base
include Page::Component::ClonePanel
+ include Page::Component::Breadcrumbs
include Page::Project::SubMenus::Settings
+ view 'app/assets/javascripts/repository/components/preview/index.vue' do
+ element :blob_viewer_content
+ end
+
view 'app/assets/javascripts/repository/components/table/row.vue' do
element :file_name_link
end
@@ -90,7 +95,7 @@ module QA
def click_file(filename)
within_element(:file_tree_table) do
- click_on filename
+ click_element(:file_name_link, text: filename)
end
end
@@ -115,6 +120,10 @@ module QA
has_element?(:project_name_content, text: name)
end
+ def has_readme_content?(text)
+ has_element?(:blob_viewer_content, text: text)
+ end
+
def last_commit_content
find_element(:commit_content).text
end
diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
index 6f75940e1f0..9eab03323a8 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
@@ -47,8 +47,8 @@ module QA
Page::Project::Settings::Main.perform(&:click_project)
Page::Project::Show.perform do |project|
- expect(project).to have_text(target_group.path)
- expect(project).to have_text(edited_readme_content)
+ expect(project).to have_breadcrumb(target_group.path)
+ expect(project).to have_readme_content(edited_readme_content)
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
index e845c3ca8ea..ec00091b3ce 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb
@@ -60,12 +60,15 @@ module QA
end
end
- project.visit!
project.wait_for_push_new_branch
+ project.visit!
- expect(page).to have_content(file_name)
- expect(page).to have_content(file_content)
expect(git_protocol_reported).to eq(git_protocol)
+
+ Page::Project::Show.perform do |show|
+ expect(show).to have_file(file_name)
+ expect(show).to have_readme_content(file_content)
+ end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
index c713f11af7d..d8aaffc3713 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb
@@ -24,8 +24,10 @@ module QA
Page::Project::Show.perform(&:wait_for_viewers_to_load)
- expect(page).to have_content('README.md')
- expect(page).to have_content('This is a test project')
+ Page::Project::Show.perform do |project|
+ expect(project).to have_file('README.md')
+ expect(project).to have_readme_content('This is a test project')
+ end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
index 9db5fe5292f..c2da5104930 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb
@@ -12,8 +12,10 @@ module QA
push.commit_message = 'Add README.md'
end.project.visit!
- expect(page).to have_content('README.md')
- expect(page).to have_content('This is a test project')
+ Page::Project::Show.perform do |project|
+ expect(project).to have_file('README.md')
+ expect(project).to have_readme_content('This is a test project')
+ end
end
end
end