diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-edaa33dee2ff2f7ea3fac488d41558eb5f86d68c.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb new file mode 100644 index 00000000000..a18e22f52f1 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/1_manage/group/gitlab_migration_group_spec.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +module QA + describe 'Manage', :requires_admin do + describe 'Gitlab migration' do + let!(:admin_api_client) { Runtime::API::Client.as_admin } + let!(:user) do + Resource::User.fabricate_via_api! do |usr| + usr.api_client = admin_api_client + usr.hard_delete_on_api_removal = true + end + end + + let!(:api_client) { Runtime::API::Client.new(user: user) } + let!(:personal_access_token) { api_client.personal_access_token } + + let(:sandbox) do + Resource::Sandbox.fabricate_via_api! do |group| + group.api_client = admin_api_client + end + end + + let(:source_group) do + Resource::Sandbox.fabricate! do |group| + group.api_client = api_client + group.path = "source-group-for-import-#{SecureRandom.hex(4)}" + end + end + + let(:imported_group) do + Resource::BulkImportGroup.init do |group| + group.api_client = api_client + group.sandbox = sandbox + group.source_group = source_group + end + end + + before do + sandbox.add_member(user, Resource::Members::AccessLevel::MAINTAINER) + + Flow::Login.sign_in(as: user) + + source_group + + Page::Main::Menu.perform(&:go_to_create_group) + Page::Group::New.perform do |group| + group.switch_to_import_tab + group.connect_gitlab_instance(Runtime::Scenario.gitlab_address, personal_access_token) + end + end + + after do + user.remove_via_api! + end + + it( + 'imports group from UI', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347862', + issue_1: 'https://gitlab.com/gitlab-org/gitlab/-/issues/331252', + issue_2: 'https://gitlab.com/gitlab-org/gitlab/-/issues/333678', + issue_3: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332351', + except: { job: 'instance-image-slow-network' } + ) do + Page::Group::BulkImport.perform do |import_page| + import_page.import_group(imported_group.path, imported_group.sandbox.path) + + expect(import_page).to have_imported_group(imported_group.path, wait: 300) + + imported_group.reload!.visit! + Page::Group::Show.perform do |group| + expect(group).to have_content(imported_group.path) + end + end + end + end + end +end |