diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 03:06:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-17 03:06:07 +0000 |
commit | 3d67f14ecb37274f1c269c0d50b61615788c7f16 (patch) | |
tree | e6d1817f892b70bee5319236666dfe376c9d515a /qa | |
parent | 48c77599ca5d833ce01ca310af4887200875174f (diff) | |
download | gitlab-ce-3d67f14ecb37274f1c269c0d50b61615788c7f16.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/project/wiki/git_access.rb | 13 | ||||
-rw-r--r-- | qa/qa/resource/repository/wiki_push.rb | 9 | ||||
-rw-r--r-- | qa/qa/resource/wiki.rb | 9 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb | 25 |
5 files changed, 28 insertions, 29 deletions
@@ -275,6 +275,7 @@ module QA autoload :Edit, 'qa/page/project/wiki/edit' autoload :New, 'qa/page/project/wiki/new' autoload :Show, 'qa/page/project/wiki/show' + autoload :GitAccess, 'qa/page/project/wiki/git_access' end module WebIDE diff --git a/qa/qa/page/project/wiki/git_access.rb b/qa/qa/page/project/wiki/git_access.rb new file mode 100644 index 00000000000..28cb21be4e3 --- /dev/null +++ b/qa/qa/page/project/wiki/git_access.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module QA + module Page + module Project + module Wiki + class GitAccess < Page::Base + include Page::Component::LegacyClonePanel + end + end + end + end +end diff --git a/qa/qa/resource/repository/wiki_push.rb b/qa/qa/resource/repository/wiki_push.rb index 06cca85cbb2..8edaff70ac6 100644 --- a/qa/qa/resource/repository/wiki_push.rb +++ b/qa/qa/resource/repository/wiki_push.rb @@ -21,14 +21,7 @@ module QA end def repository_http_uri - @repository_http_uri ||= begin - wiki.visit! - Page::Project::Wiki::Show.act do - click_clone_repository - choose_repository_clone_http - repository_location.uri - end - end + @repository_http_uri ||= wiki.repository_http_location.uri end def repository_ssh_uri diff --git a/qa/qa/resource/wiki.rb b/qa/qa/resource/wiki.rb index 0a776f22e25..6e3648dba0b 100644 --- a/qa/qa/resource/wiki.rb +++ b/qa/qa/resource/wiki.rb @@ -12,6 +12,15 @@ module QA end end + attribute :repository_http_location do + Page::Project::Wiki::Show.perform(&:click_clone_repository) + + Page::Project::Wiki::GitAccess.perform do |git_access| + git_access.choose_repository_clone_http + git_access.repository_location + end + end + def fabricate! project.visit! diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb index 925c601f869..e3fd835bb01 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb @@ -3,29 +3,12 @@ module QA context 'Plan', :smoke do describe 'mention' do - let(:user) do - Resource::User.fabricate_via_api! do |user| - user.name = "bob" - user.password = "1234test" - end - end - before do - QA::Runtime::Env.personal_access_token = QA::Runtime::Env.admin_personal_access_token - - unless QA::Runtime::Env.personal_access_token - Runtime::Browser.visit(:gitlab, Page::Main::Login) - Page::Main::Login.perform(&:sign_in_using_admin_credentials) - end - - QA::Runtime::Env.personal_access_token = nil - - Page::Main::Menu.perform(&:sign_out) if Page::Main::Menu.perform { |p| p.has_personal_area?(wait: 0) } - Runtime::Browser.visit(:gitlab, Page::Main::Login) - Page::Main::Login.perform(&:sign_in_using_credentials) + @user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) + project = Resource::Project.fabricate_via_api! do |resource| resource.name = 'project-to-test-mention' end @@ -33,7 +16,7 @@ module QA Page::Project::Show.perform(&:go_to_members_settings) Page::Project::Settings::Members.perform do |members| - members.add_member(user.username) + members.add_member(@user.username) end issue = Resource::Issue.fabricate_via_api! do |issue| @@ -45,7 +28,7 @@ module QA it 'user mentions another user in an issue' do Page::Project::Issue::Show.perform do |show| - at_username = "@#{user.username}" + at_username = "@#{@user.username}" show.select_all_activities_filter show.comment(at_username) |