diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-14 00:09:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-14 00:09:54 +0300 |
commit | 0fea036ba7c8d26ffeecc7f52bf770ea3a88689e (patch) | |
tree | 5937f3181e46bdc2c96ba9b530bc66d0ef46311f /spec/features | |
parent | 46e1fdb8bbdaf149371334f1a1757ba4d68fe020 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/environments/environments_folder_spec.rb | 24 |
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 |