Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-10 00:17:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-10 00:17:00 +0300
commit617fb6c2b44c248443110a3a7101fcfca0eb68fe (patch)
tree67a9a05b7a8df5c998f7bd718d37e3a9f1486171 /qa
parentcd22685717501ac6f3c81e16418270123a2cccee (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/fixtures/files/one_bbin0 -> 512 bytes
-rw-r--r--qa/qa/page/alert/storage_limit.rb11
-rw-r--r--qa/qa/resource/group.rb18
-rw-r--r--qa/qa/specs/features/browser_ui/9_data_stores/cells/demo2_spec.rb98
-rw-r--r--qa/qa/specs/features/browser_ui/9_data_stores/cells/demo3_spec.rb150
5 files changed, 277 insertions, 0 deletions
diff --git a/qa/qa/fixtures/files/one_b b/qa/qa/fixtures/files/one_b
new file mode 100644
index 00000000000..ddd224c7520
--- /dev/null
+++ b/qa/qa/fixtures/files/one_b
Binary files differ
diff --git a/qa/qa/page/alert/storage_limit.rb b/qa/qa/page/alert/storage_limit.rb
new file mode 100644
index 00000000000..31f4bd249fb
--- /dev/null
+++ b/qa/qa/page/alert/storage_limit.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module QA
+ module Page
+ module Alert
+ class StorageLimit < Chemlab::Page
+ element :storage_limit_message
+ end
+ end
+ end
+end
diff --git a/qa/qa/resource/group.rb b/qa/qa/resource/group.rb
index c88cf4aca10..689570cde36 100644
--- a/qa/qa/resource/group.rb
+++ b/qa/qa/resource/group.rb
@@ -66,6 +66,24 @@ module QA
end
end
+ # Fabricate a Group using the UI from the Groups Dashboard page
+ # @param [String] group_name
+ # @return [Page::Group::New]
+ def fabricate_group!(group_name: nil)
+ Page::Main::Menu.perform(&:go_to_groups)
+ Page::Dashboard::Groups.perform do |groups|
+ groups.click_new_group
+
+ Page::Group::New.perform do |group_new|
+ group_new.click_create_group
+
+ group_new.set_path(group_name)
+
+ group_new.create
+ end
+ end
+ end
+
def fabricate_via_api!
resource_web_url(api_get)
rescue ResourceNotFoundError
diff --git a/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo2_spec.rb b/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo2_spec.rb
new file mode 100644
index 00000000000..2ba368ff353
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo2_spec.rb
@@ -0,0 +1,98 @@
+# frozen_string_literal: true
+
+# version of the login test that only runs against GDK
+# implements functionality in https://gitlab.com/gitlab-org/gitlab/-/issues/415207
+
+module QA
+ RSpec.describe 'Data Stores', :skip_live_env, :requires_admin, product_group: :tenant_scale do
+ describe 'Demo 2' do
+ let(:cell1_url) { ENV.fetch('CELL1_URL', 'http://gdk.test:3000/') }
+ let(:cell2_url) { ENV.fetch('CELL2_URL', 'http://gdk.test:3001/') }
+ let(:cell1_group_name) { "cell1-group-#{SecureRandom.hex(8)}" }
+ let(:cell2_group_name) { "cell2-group-#{SecureRandom.hex(8)}" }
+
+ before do
+ ENV['PERSONAL_ACCESS_TOKENS_DISABLED'] = 'true' # force off creating by api so walk through demo
+ end
+
+ it('walkthrough',
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/434421',
+ only: { condition: -> { !Runtime::Env.running_in_ci? } }
+ ) do
+ # Sign in Cell 1
+ Runtime::Scenario.define(:gitlab_address, cell1_url)
+ Flow::Login.sign_in
+ Page::Main::Menu.perform(&:go_to_groups)
+ # Create Group on Cell 1
+ Resource::Group.new.fabricate_group!(group_name: cell1_group_name)
+
+ # Cell 1 Group exists on Cell 1
+ Page::Group::Show.perform do |group_show|
+ # Ensure that the group was actually created
+ group_show.wait_until(sleep_interval: 1) do
+ expect(group_show).to have_text(cell1_group_name)
+ end
+ end
+
+ # Visit Cell 2
+ page.visit cell2_url
+ Runtime::Scenario.define(:gitlab_address, cell2_url)
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group does not show
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).not_to have_group(cell1_group_name)
+ end
+ end
+
+ # Create Group on Cell 2
+ Resource::Group.new.fabricate_group!(group_name: cell2_group_name)
+
+ # Cell 2 Group exists on Cell 2
+ Page::Group::Show.perform do |group_show|
+ # Ensure that the group was actually created
+ group_show.wait_until(sleep_interval: 1) do
+ expect(group_show).to have_text(cell2_group_name)
+ end
+ end
+
+ # Visit Cell 1
+ page.visit cell1_url
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group appears
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).to have_group(cell1_group_name)
+ end
+ end
+
+ # Cell 2 group does not appear
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).not_to have_group(cell2_group_name)
+ end
+ end
+
+ # Visit Cell 2
+ page.visit cell2_url
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group does not shows
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).not_to have_group(cell1_group_name)
+ end
+ end
+
+ # Cell 2 group does show
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).to have_group(cell2_group_name)
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo3_spec.rb b/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo3_spec.rb
new file mode 100644
index 00000000000..ee6fe03f935
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/9_data_stores/cells/demo3_spec.rb
@@ -0,0 +1,150 @@
+# frozen_string_literal: true
+
+# version of the login test that only runs against GDK
+# implements functionality in https://gitlab.com/gitlab-org/gitlab/-/issues/420118
+
+module QA
+ RSpec.describe 'Data Stores', :skip_live_env, :requires_admin, product_group: :tenant_scale do
+ describe 'Demo 3' do
+ let(:debug) { false }
+ let(:cell1_url) { ENV.fetch('CELL1_URL', 'http://gdk.test:3000/') }
+ let(:cell2_url) { ENV.fetch('CELL2_URL', 'http://gdk.test:3001/') }
+ let(:cell1_group_name) { "cell1-group-#{SecureRandom.hex(8)}" }
+ let(:cell2_group_name) { "cell2-group-#{SecureRandom.hex(8)}" }
+ let(:cell1_project_name) { "cell1-project-#{SecureRandom.hex(8)}" }
+ let(:cell2_project_name) { "cell2-project-#{SecureRandom.hex(8)}" }
+
+ def create_group(name)
+ Resource::Group.new.fabricate_group!(group_name: name)
+
+ Page::Group::Show.perform do |group_show|
+ # Ensure that the group was actually created
+ group_show.wait_until(sleep_interval: 1) do
+ expect(group_show).to have_text(name)
+ end
+ end
+ end
+
+ def create_project(group_name, project_name)
+ Page::Main::Menu.perform(&:go_to_create_project)
+ Page::Project::New.perform(&:click_blank_project_link)
+ Page::Project::New.perform do |project_page|
+ project_page.choose_namespace(group_name)
+ project_page.choose_name(project_name)
+ project_page.create_new_project
+ end
+ end
+
+ it('walkthrough',
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/434422',
+ only: { condition: -> { !Runtime::Env.running_in_ci? } }
+ ) do
+ Runtime::Scenario.define(:gitlab_address, cell1_url)
+ # Sign in Cell 1
+ Flow::Login.sign_in
+ Page::Main::Menu.perform(&:go_to_groups)
+ # Create Group on Cell 1
+ create_group(cell1_group_name)
+
+ # Create a Project in that group on Cell 1
+ create_project(cell1_group_name, cell1_project_name)
+
+ # Cell 1 Project shows
+ page.visit "#{cell1_url}#{cell1_group_name}/#{cell1_project_name}"
+ Page::Project::Show.perform do |project|
+ expect(project.has_name?(cell1_project_name)).to be true
+ end
+
+ # Visit Cell 2
+ page.visit cell2_url
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group does not show
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard.has_group?(cell1_group_name)).to be(false)
+ end
+ end
+
+ # Cell 1 project does not show
+ page.visit "#{cell2_url}#{cell1_group_name}/#{cell1_project_name}"
+ expect(page).to have_text('Page Not Found')
+
+ page.visit cell2_url
+ Page::Main::Menu.perform(&:go_to_groups)
+ # Create Group on Cell 2
+ create_group(cell2_group_name)
+
+ # Create a Project in that group on Cell 2
+ # TODO: this functionality is under development, uncomment when complete
+ # create_project(cell2_group_name,cell2_project_name)
+
+ # Cell 2 Project shows
+ # page.visit "#{cell2_url}#{cell2_group_name}/#{cell2_project_name}"
+ # Page::Project::Show.perform do |project|
+ # expect(project.has_name?(cell2_project_name)).to be true
+ # end
+
+ # Visit Cell 1
+ page.visit cell1_url
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group does shows
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).to have_group(cell1_group_name)
+ end
+ end
+
+ # Cell 1 Project shows
+ page.visit "#{cell1_url}#{cell1_group_name}/#{cell1_project_name}"
+ Page::Project::Show.perform do |project|
+ expect(project).to have_name(cell1_project_name)
+ end
+
+ # Cell 2 group does not shows
+ # TODO: this functionality is under development, uncomment when complete
+ # Page::Dashboard::Groups.perform do |group_dashboard|
+ # group_dashboard.wait_until(sleep_interval: 1) do
+ # expect(group_dashboard.has_group?(cell2_group_name)).to be(false)
+ # end
+ # end
+
+ # Cell 2 Project does not show
+ page.visit "#{cell1_url}#{cell2_group_name}/#{cell2_project_name}"
+ expect(page).to have_text('Page Not Found')
+
+ # Visit Cell 2
+ page.visit cell2_url
+ Page::Main::Menu.perform(&:go_to_groups)
+
+ # Cell 1 group does not shows
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).not_to have_group(cell1_group_name)
+ end
+ end
+
+ # Cell 1 project does not show
+ page.visit "#{cell2_url}#{cell1_group_name}/#{cell1_project_name}"
+ expect(page).to have_text('Page Not Found')
+
+ # Cell 2 group does show
+ page.visit cell2_url
+ Page::Main::Menu.perform(&:go_to_groups)
+ Page::Dashboard::Groups.perform do |group_dashboard|
+ group_dashboard.wait_until(sleep_interval: 1) do
+ expect(group_dashboard).to have_group(cell2_group_name)
+ end
+ end
+
+ # Cell 2 project does show
+ # TODO: this functionality is under development, uncomment when complete
+ # page.visit "#{cell2_url}#{cell2_group_name}/#{cell2_project_name}"
+ # Page::Project::Show.perform do |project|
+ # expect(project.has_name?(cell2_project_name)).to be true
+ # end
+ end
+ end
+ end
+end