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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-12 15:08:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-12 15:08:00 +0300
commit7045d3816aa7bab6619e9d841f45d5cb8d454f23 (patch)
treece43907d55b157728d1e920536418f41e661633f /spec/features
parent2d560e614a2d5feea84288c2d1f50b40d796f97a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/admin/admin_runners_spec.rb28
-rw-r--r--spec/features/groups/clusters/user_spec.rb2
-rw-r--r--spec/features/groups/group_runners_spec.rb28
-rw-r--r--spec/features/projects/branches/download_buttons_spec.rb8
-rw-r--r--spec/features/projects/clusters/user_spec.rb2
-rw-r--r--spec/features/projects/files/download_buttons_spec.rb12
-rw-r--r--spec/features/projects/show/download_buttons_spec.rb18
-rw-r--r--spec/features/projects/tags/download_buttons_spec.rb12
8 files changed, 10 insertions, 100 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb
index dad9a08fce1..653458710e3 100644
--- a/spec/features/admin/admin_runners_spec.rb
+++ b/spec/features/admin/admin_runners_spec.rb
@@ -12,8 +12,6 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
before do
sign_in(admin)
gitlab_enable_admin_mode_sign_in(admin)
-
- wait_for_requests
end
describe "Admin Runners page", :js do
@@ -22,7 +20,7 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
let_it_be(:namespace) { create(:namespace) }
let_it_be(:project) { create(:project, namespace: namespace, creator: user) }
- describe "runners creation" do
+ describe "runners creation and registration" do
before do
visit admin_runners_path
end
@@ -30,12 +28,6 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
it 'shows a create button' do
expect(page).to have_link s_('Runner|New instance runner'), href: new_admin_runner_path
end
- end
-
- describe "runners registration" do
- before do
- visit admin_runners_path
- end
it_behaves_like "shows and resets runner registration token" do
let(:dropdown_text) { s_('Runners|Register an instance runner') }
@@ -51,11 +43,7 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
visit admin_runners_path
end
- it_behaves_like 'shows runner in list' do
- let(:runner) { instance_runner }
- end
-
- it_behaves_like 'shows runner details from list' do
+ it_behaves_like 'shows runner summary and navigates to details' do
let(:runner) { instance_runner }
let(:runner_page_path) { admin_runner_path(instance_runner) }
end
@@ -405,11 +393,8 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
it_behaves_like 'shows no runners found'
- it 'shows active tab with no runner' do
+ it 'shows active tab' do
expect(page).to have_link('Instance', class: 'active')
-
- expect(page).not_to have_content 'runner-project'
- expect(page).not_to have_content 'runner-group'
end
end
end
@@ -444,10 +429,6 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
end
it_behaves_like 'shows no runners found'
-
- it 'shows no runner' do
- expect(page).not_to have_content 'runner-blue'
- end
end
it 'shows correct runner when tag is selected and search term is entered' do
@@ -602,8 +583,6 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
before do
visit edit_admin_runner_path(project_runner)
-
- wait_for_requests
end
it_behaves_like 'submits edit runner form' do
@@ -633,7 +612,6 @@ RSpec.describe "Admin Runners", feature_category: :fleet_visibility do
context 'when a runner is updated', :js do
before do
click_on _('Save changes')
- wait_for_requests
end
it 'show success alert and redirects to runner page' do
diff --git a/spec/features/groups/clusters/user_spec.rb b/spec/features/groups/clusters/user_spec.rb
index 00ba4e636ff..9089fba1886 100644
--- a/spec/features/groups/clusters/user_spec.rb
+++ b/spec/features/groups/clusters/user_spec.rb
@@ -136,7 +136,7 @@ RSpec.describe 'User Cluster', :js, feature_category: :environment_management do
end
it 'can visit the clusters index page', :aggregate_failures do
- expect(page).to have_title("Kubernetes Clusters · #{group.name} · GitLab")
+ expect(page).to have_title("Kubernetes Clusters · #{group.name} · #{_('GitLab')}")
expect(page).to have_content('Connect a cluster')
end
end
diff --git a/spec/features/groups/group_runners_spec.rb b/spec/features/groups/group_runners_spec.rb
index 36f469a4d2e..b9a68b75962 100644
--- a/spec/features/groups/group_runners_spec.rb
+++ b/spec/features/groups/group_runners_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
- before do
+ before_all do
group.add_owner(group_owner)
group.add_maintainer(group_maintainer)
end
@@ -45,11 +45,7 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
visit group_runners_path(group)
end
- it_behaves_like 'shows runner in list' do
- let(:runner) { group_runner }
- end
-
- it_behaves_like 'shows runner details from list' do
+ it_behaves_like 'shows runner summary and navigates to details' do
let(:runner) { group_runner }
let(:runner_page_path) { group_runner_path(group, group_runner) }
end
@@ -66,10 +62,6 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
end
it_behaves_like 'shows no runners found'
-
- it 'shows no runner' do
- expect(page).not_to have_content 'runner-foo'
- end
end
end
@@ -82,11 +74,7 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
visit group_runners_path(group)
end
- it_behaves_like 'shows runner in list' do
- let(:runner) { project_runner }
- end
-
- it_behaves_like 'shows runner details from list' do
+ it_behaves_like 'shows runner summary and navigates to details' do
let(:runner) { project_runner }
let(:runner_page_path) { group_runner_path(group, project_runner) }
end
@@ -110,15 +98,9 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
context "when selecting 'Show only inherited'" do
before do
find("[data-testid='runner-membership-toggle'] button").click
-
- wait_for_requests
- end
-
- it_behaves_like 'shows runner in list' do
- let(:runner) { instance_runner }
end
- it_behaves_like 'shows runner details from list' do
+ it_behaves_like 'shows runner summary and navigates to details' do
let(:runner) { instance_runner }
let(:runner_page_path) { group_runner_path(group, instance_runner) }
end
@@ -287,7 +269,6 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
before do
visit edit_group_runner_path(group, group_runner)
- wait_for_requests
end
it_behaves_like 'submits edit runner form' do
@@ -301,7 +282,6 @@ RSpec.describe "Group Runners", feature_category: :fleet_visibility do
before do
visit edit_group_runner_path(group, project_runner)
- wait_for_requests
end
it_behaves_like 'submits edit runner form' do
diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb
index 10d1d61a341..89d9cfff1e0 100644
--- a/spec/features/projects/branches/download_buttons_spec.rb
+++ b/spec/features/projects/branches/download_buttons_spec.rb
@@ -40,17 +40,11 @@ RSpec.describe 'Download buttons in branches page', feature_category: :groups_an
let(:path_to_visit) { project_branches_filtered_path(project, state: 'all', search: ref) }
end
- context 'with artifacts' do
+ context 'with download source code button' do
before do
visit project_branches_filtered_path(project, state: 'all', search: 'binary-encoding')
end
- it 'shows download artifacts button' do
- href = latest_succeeded_project_artifacts_path(project, 'binary-encoding/download', job: 'build')
-
- expect(page).to have_link build.name, href: href
- end
-
it 'passes axe automated accessibility testing', :js do
find_by_testid('download-source-code-button').click
expect(page).to be_axe_clean.within('.project-action-button')
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index b6848b10013..067963e06e0 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -126,7 +126,7 @@ RSpec.describe 'User Cluster', :js, feature_category: :deployment_management do
end
it 'can visit the clusters index page', :aggregate_failures do
- expect(page).to have_title("Kubernetes Clusters · #{project.full_name} · GitLab")
+ expect(page).to have_title("Kubernetes Clusters · #{project.full_name} · #{_('GitLab')}")
expect(page).to have_content('Connect a cluster')
end
end
diff --git a/spec/features/projects/files/download_buttons_spec.rb b/spec/features/projects/files/download_buttons_spec.rb
index 81bd0523c70..c731cdab1ad 100644
--- a/spec/features/projects/files/download_buttons_spec.rb
+++ b/spec/features/projects/files/download_buttons_spec.rb
@@ -22,16 +22,4 @@ RSpec.describe 'Projects > Files > Download buttons in files tree', feature_cate
it_behaves_like 'archive download buttons' do
let(:path_to_visit) { project_tree_path(project, project.default_branch) }
end
-
- context 'with artifacts' do
- before do
- visit project_tree_path(project, project.default_branch)
- end
-
- it 'shows download artifacts button' do
- href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
-
- expect(page).to have_link build.name, href: href
- end
- end
end
diff --git a/spec/features/projects/show/download_buttons_spec.rb b/spec/features/projects/show/download_buttons_spec.rb
index 8e27b4b2ede..2616d474991 100644
--- a/spec/features/projects/show/download_buttons_spec.rb
+++ b/spec/features/projects/show/download_buttons_spec.rb
@@ -36,23 +36,5 @@ RSpec.describe 'Projects > Show > Download buttons', feature_category: :groups_a
describe 'when checking project main page' do
it_behaves_like 'archive download buttons'
-
- context 'with artifacts' do
- before do
- visit project_path(project)
- end
-
- it 'shows download artifacts button' do
- href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
-
- expect(page).to have_link build.name, href: href
- end
-
- it 'download links have download attribute' do
- page.all('a', text: 'Download').each do |link|
- expect(link[:download]).to eq ''
- end
- end
- end
end
end
diff --git a/spec/features/projects/tags/download_buttons_spec.rb b/spec/features/projects/tags/download_buttons_spec.rb
index 275d364f267..f025ffba85a 100644
--- a/spec/features/projects/tags/download_buttons_spec.rb
+++ b/spec/features/projects/tags/download_buttons_spec.rb
@@ -38,17 +38,5 @@ RSpec.describe 'Download buttons in tags page', feature_category: :source_code_m
let(:path_to_visit) { project_tags_path(project) }
let(:ref) { tag }
end
-
- context 'with artifacts' do
- before do
- visit project_tags_path(project)
- end
-
- it 'shows download artifacts button' do
- href = latest_succeeded_project_artifacts_path(project, "#{tag}/download", job: 'build')
-
- expect(page).to have_link build.name, href: href
- end
- end
end
end