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-14 00:09:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-14 00:09:54 +0300
commit0fea036ba7c8d26ffeecc7f52bf770ea3a88689e (patch)
tree5937f3181e46bdc2c96ba9b530bc66d0ef46311f /spec/features
parent46e1fdb8bbdaf149371334f1a1757ba4d68fe020 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/environments/environments_folder_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/environments/environments_folder_spec.rb b/spec/features/environments/environments_folder_spec.rb
index 9e2932e315f..da9de6fba0c 100644
--- a/spec/features/environments/environments_folder_spec.rb
+++ b/spec/features/environments/environments_folder_spec.rb
@@ -99,6 +99,30 @@ RSpec.describe 'Environments Folder page', :js, feature_category: :environment_m
expect(page).not_to have_content(get_env_name(stopped_env))
end
end
+
+ describe 'pagination' do
+ # rubocop:disable RSpec/FactoryBot/ExcessiveCreateList -- need >20 items to test pagination
+ let!(:envs) { create_list(:environment, 25, :with_folders, project: project, folder: folder_name) }
+
+ # rubocop:enable RSpec/FactoryBot/ExcessiveCreateList
+ it 'shows pagination' do
+ pagination = find('.pagination')
+
+ expect(pagination).to have_content('2')
+ end
+
+ it 'can navigate to the next page and updates the url' do
+ pagination = find('.pagination')
+ pagination.scroll_to(:bottom)
+ within(pagination) do
+ click_link 'Next'
+ end
+
+ wait_for_requests
+
+ expect(current_url).to include('page=2')
+ end
+ end
end
describe 'legacy folders page' do