diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 21:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 21:09:33 +0300 |
commit | d1be3e6f776e1c77976537548c1daa9af2fb2650 (patch) | |
tree | 387d3c8f06e18bbfa24a4b0b015a7245e166927c /qa | |
parent | 8f3a9dbb94b5a9ae4570a22bbc2a75e7572407c8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/Gemfile | 2 | ||||
-rw-r--r-- | qa/Gemfile.lock | 6 | ||||
-rw-r--r-- | qa/qa/page/organization/new.rb | 25 | ||||
-rw-r--r-- | qa/qa/page/organization/show.rb | 18 | ||||
-rw-r--r-- | qa/qa/page/sub_menus/create_new_menu.rb | 6 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/9_data_stores/organization/create_organization_spec.rb | 37 |
6 files changed, 90 insertions, 4 deletions
diff --git a/qa/Gemfile b/qa/Gemfile index 4ca65d78aac..72ce6cfe43c 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -39,7 +39,7 @@ gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1' # dependencies for jenkins client gem 'nokogiri', '~> 1.16' -gem 'deprecation_toolkit', '~> 2.0.4', require: false +gem 'deprecation_toolkit', '~> 2.1.0', require: false gem 'factory_bot', '~> 6.3.0' diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 0040424d7f4..126061e83cb 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -71,8 +71,8 @@ GEM crass (1.0.6) debug_inspector (1.1.0) declarative (0.0.20) - deprecation_toolkit (2.0.4) - activesupport (>= 5.2) + deprecation_toolkit (2.1.0) + activesupport (>= 7.0) diff-lcs (1.3) domain_name (0.6.20240107) erubi (1.12.0) @@ -348,7 +348,7 @@ DEPENDENCIES capybara-screenshot (~> 1.0.26) chemlab (~> 0.11, >= 0.11.1) chemlab-library-www-gitlab-com (~> 0.1, >= 0.1.1) - deprecation_toolkit (~> 2.0.4) + deprecation_toolkit (~> 2.1.0) factory_bot (~> 6.3.0) faker (~> 3.2, >= 3.2.3) faraday-retry (~> 2.2) diff --git a/qa/qa/page/organization/new.rb b/qa/qa/page/organization/new.rb new file mode 100644 index 00000000000..c72a3e6d1b4 --- /dev/null +++ b/qa/qa/page/organization/new.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module QA + module Page + module Organization + class New < QA::Page::Base + include QA::Page::Component::Dropdown + view 'app/assets/javascripts/organizations/shared/components/new_edit_form.vue' do + element 'organization-name' + element 'submit-button' + end + + # Sets the organization name + # @param name [string] name of organization + def organization_name=(name) + fill_element('organization-name', name) + end + + def create_organization + click_element('submit-button') + end + end + end + end +end diff --git a/qa/qa/page/organization/show.rb b/qa/qa/page/organization/show.rb new file mode 100644 index 00000000000..402d481bd0a --- /dev/null +++ b/qa/qa/page/organization/show.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module QA + module Page + module Organization + class Show < QA::Page::Base + include QA::Page::Component::Dropdown + view 'app/assets/javascripts/organizations/show/components/organization_avatar.vue' do + element 'organization-name' + end + + def has_organization?(name) + has_element?('organization-name', text: name) + end + end + end + end +end diff --git a/qa/qa/page/sub_menus/create_new_menu.rb b/qa/qa/page/sub_menus/create_new_menu.rb index aaf763ac33e..9adb4e5ac8e 100644 --- a/qa/qa/page/sub_menus/create_new_menu.rb +++ b/qa/qa/page/sub_menus/create_new_menu.rb @@ -35,6 +35,12 @@ module QA click_element(:create_menu_item, create_menu_item: 'general_new_group') end end + + def go_to_create_organization + within_new_item_menu do + click_element(:create_menu_item, create_menu_item: 'general_new_organization') + end + end end end end diff --git a/qa/qa/specs/features/browser_ui/9_data_stores/organization/create_organization_spec.rb b/qa/qa/specs/features/browser_ui/9_data_stores/organization/create_organization_spec.rb new file mode 100644 index 00000000000..d61403f40dd --- /dev/null +++ b/qa/qa/specs/features/browser_ui/9_data_stores/organization/create_organization_spec.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Data Stores', + :skip_live_env, + :requires_admin, + product_group: :tenant_scale, + feature_flag: { + name: 'ui_for_organizations', + scope: :global + } do + describe 'Organization' do + let(:organization_name) { "organization-#{SecureRandom.hex(8)}" } + + around do |example| + Runtime::Feature.enable(:ui_for_organizations) + example.run + Runtime::Feature.disable(:ui_for_organizations) + end + + it 'is created', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/436587' do + Flow::Login.sign_in + + Page::Main::Menu.perform(&:go_to_create_organization) + + Page::Organization::New.perform do |organization_new| + organization_new.organization_name = organization_name + organization_new.create_organization + end + + Page::Organization::Show.perform do |organization_show| + expect(organization_show).to have_organization(organization_name) + end + end + end + end +end |