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:
Diffstat (limited to 'spec/features/groups')
-rw-r--r--spec/features/groups/clusters/eks_spec.rb2
-rw-r--r--spec/features/groups/clusters/user_spec.rb4
-rw-r--r--spec/features/groups/dependency_proxy_spec.rb9
-rw-r--r--spec/features/groups/issues_spec.rb47
-rw-r--r--spec/features/groups/labels/subscription_spec.rb4
-rw-r--r--spec/features/groups/members/leave_group_spec.rb1
-rw-r--r--spec/features/groups/navbar_spec.rb17
-rw-r--r--spec/features/groups/packages_spec.rb4
-rw-r--r--spec/features/groups/settings/manage_applications_spec.rb1
9 files changed, 43 insertions, 46 deletions
diff --git a/spec/features/groups/clusters/eks_spec.rb b/spec/features/groups/clusters/eks_spec.rb
index c361c502cbb..fe62efbd3bf 100644
--- a/spec/features/groups/clusters/eks_spec.rb
+++ b/spec/features/groups/clusters/eks_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe 'Group AWS EKS Cluster', :js do
before do
visit group_clusters_path(group)
- click_link 'Integrate with a cluster certificate'
+ click_link 'Connect with a certificate'
end
context 'when user creates a cluster on AWS EKS' do
diff --git a/spec/features/groups/clusters/user_spec.rb b/spec/features/groups/clusters/user_spec.rb
index 2a7ededa39b..1788167c94c 100644
--- a/spec/features/groups/clusters/user_spec.rb
+++ b/spec/features/groups/clusters/user_spec.rb
@@ -25,7 +25,7 @@ RSpec.describe 'User Cluster', :js do
before do
visit group_clusters_path(group)
- click_link 'Integrate with a cluster certificate'
+ click_link 'Connect with a certificate'
click_link 'Connect existing cluster'
end
@@ -129,7 +129,7 @@ RSpec.describe 'User Cluster', :js do
it 'user sees creation form with the successful message' do
expect(page).to have_content('Kubernetes cluster integration was successfully removed.')
- expect(page).to have_link('Integrate with a cluster certificate')
+ expect(page).to have_link('Connect with a certificate')
end
end
end
diff --git a/spec/features/groups/dependency_proxy_spec.rb b/spec/features/groups/dependency_proxy_spec.rb
index d6b0bdc8ea4..623fb065bfc 100644
--- a/spec/features/groups/dependency_proxy_spec.rb
+++ b/spec/features/groups/dependency_proxy_spec.rb
@@ -56,9 +56,14 @@ RSpec.describe 'Group Dependency Proxy' do
visit settings_path
wait_for_requests
- click_button 'Enable Proxy'
+ proxy_toggle = find('[data-testid="dependency-proxy-setting-toggle"]')
+ proxy_toggle_button = proxy_toggle.find('button')
- expect(page).to have_button 'Enable Proxy', class: '!is-checked'
+ expect(proxy_toggle).to have_css("button.is-checked")
+
+ proxy_toggle_button.click
+
+ expect(proxy_toggle).not_to have_css("button.is-checked")
visit path
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb
index 489beb70ab3..4e59ab40d04 100644
--- a/spec/features/groups/issues_spec.rb
+++ b/spec/features/groups/issues_spec.rb
@@ -83,6 +83,18 @@ RSpec.describe 'Group issues page' do
end
end
+ it 'truncates issue counts if over the threshold', :clean_gitlab_redis_cache do
+ allow(Rails.cache).to receive(:read).and_call_original
+ allow(Rails.cache).to receive(:read).with(
+ ['group', group.id, 'issues'],
+ { expires_in: Gitlab::IssuablesCountForState::CACHE_EXPIRES_IN }
+ ).and_return({ opened: 1050, closed: 500, all: 1550 })
+
+ visit issues_group_path(group)
+
+ expect(page).to have_text('Open 1.1k Closed 500 All 1.6k')
+ end
+
context 'when project is archived' do
before do
::Projects::UpdateService.new(project, user_in_group, archived: true).execute
@@ -94,41 +106,6 @@ RSpec.describe 'Group issues page' do
expect(page).not_to have_content issue.title[0..80]
end
end
-
- context 'when cached issues state count is enabled', :clean_gitlab_redis_cache do
- before do
- stub_feature_flags(cached_issues_state_count: true)
- end
-
- it 'truncates issue counts if over the threshold' do
- allow(Rails.cache).to receive(:read).and_call_original
- allow(Rails.cache).to receive(:read).with(
- ['group', group.id, 'issues'],
- { expires_in: Gitlab::IssuablesCountForState::CACHE_EXPIRES_IN }
- ).and_return({ opened: 1050, closed: 500, all: 1550 })
-
- visit issues_group_path(group)
-
- expect(page).to have_text('Open 1.1k Closed 500 All 1.6k')
- end
- end
-
- context 'when cached issues state count is disabled', :clean_gitlab_redis_cache do
- before do
- stub_feature_flags(cached_issues_state_count: false)
- end
-
- it 'does not truncate counts if they are over the threshold' do
- allow_next_instance_of(IssuesFinder) do |finder|
- allow(finder).to receive(:count_by_state).and_return(true)
- .and_return({ opened: 1050, closed: 500, all: 1550 })
- end
-
- visit issues_group_path(group)
-
- expect(page).to have_text('Open 1,050 Closed 500 All 1,550')
- end
- end
end
context 'projects with issues disabled' do
diff --git a/spec/features/groups/labels/subscription_spec.rb b/spec/features/groups/labels/subscription_spec.rb
index dedded777ac..231c4b33bee 100644
--- a/spec/features/groups/labels/subscription_spec.rb
+++ b/spec/features/groups/labels/subscription_spec.rb
@@ -71,7 +71,7 @@ RSpec.describe 'Labels subscription' do
end
it 'does not show subscribed tab' do
- page.within('.nav-tabs') do
+ page.within('.gl-tabs-nav') do
expect(page).not_to have_link 'Subscribed'
end
end
@@ -86,7 +86,7 @@ RSpec.describe 'Labels subscription' do
end
def click_subscribed_tab
- page.within('.nav-tabs') do
+ page.within('.gl-tabs-nav') do
click_link 'Subscribed'
end
end
diff --git a/spec/features/groups/members/leave_group_spec.rb b/spec/features/groups/members/leave_group_spec.rb
index b73313745e9..e6bf1ffc2f7 100644
--- a/spec/features/groups/members/leave_group_spec.rb
+++ b/spec/features/groups/members/leave_group_spec.rb
@@ -10,6 +10,7 @@ RSpec.describe 'Groups > Members > Leave group' do
let(:group) { create(:group) }
before do
+ stub_feature_flags(bootstrap_confirmation_modals: false)
sign_in(user)
end
diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb
index 0a159056569..22409e9e7f6 100644
--- a/spec/features/groups/navbar_spec.rb
+++ b/spec/features/groups/navbar_spec.rb
@@ -15,6 +15,7 @@ RSpec.describe 'Group navbar' do
insert_package_nav(_('Kubernetes'))
stub_feature_flags(group_iterations: false)
+ stub_feature_flags(customer_relations: false)
stub_config(dependency_proxy: { enabled: false })
stub_config(registry: { enabled: false })
stub_group_wikis(false)
@@ -40,6 +41,22 @@ RSpec.describe 'Group navbar' do
it_behaves_like 'verified navigation bar'
end
+ context 'when customer_relations feature flag is enabled' do
+ before do
+ stub_feature_flags(customer_relations: true)
+
+ if Gitlab.ee?
+ insert_customer_relations_nav(_('Analytics'))
+ else
+ insert_customer_relations_nav(_('Packages & Registries'))
+ end
+
+ visit group_path(group)
+ end
+
+ it_behaves_like 'verified navigation bar'
+ end
+
context 'when dependency proxy is available' do
before do
stub_config(dependency_proxy: { enabled: true })
diff --git a/spec/features/groups/packages_spec.rb b/spec/features/groups/packages_spec.rb
index 0dfc7180187..3c2ade6b274 100644
--- a/spec/features/groups/packages_spec.rb
+++ b/spec/features/groups/packages_spec.rb
@@ -28,10 +28,6 @@ RSpec.describe 'Group Packages' do
context 'when feature is available', :js do
before do
- # we are simply setting the featrure flag to false because the new UI has nothing to test yet
- # when the refactor is complete or almost complete we will turn on the feature tests
- # see https://gitlab.com/gitlab-org/gitlab/-/issues/330846 for status of this work
- stub_feature_flags(package_list_apollo: false)
visit_group_packages
end
diff --git a/spec/features/groups/settings/manage_applications_spec.rb b/spec/features/groups/settings/manage_applications_spec.rb
index 5f84f61678d..277471cb304 100644
--- a/spec/features/groups/settings/manage_applications_spec.rb
+++ b/spec/features/groups/settings/manage_applications_spec.rb
@@ -6,6 +6,7 @@ RSpec.describe 'User manages applications' do
let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) }
let_it_be(:new_application_path) { group_settings_applications_path(group) }
+ let_it_be(:index_path) { group_settings_applications_path(group) }
before do
group.add_owner(user)