diff options
Diffstat (limited to 'spec/features/projects/container_registry_spec.rb')
-rw-r--r-- | spec/features/projects/container_registry_spec.rb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/spec/features/projects/container_registry_spec.rb b/spec/features/projects/container_registry_spec.rb index 45bf35a6aab..5231e8d5550 100644 --- a/spec/features/projects/container_registry_spec.rb +++ b/spec/features/projects/container_registry_spec.rb @@ -94,7 +94,8 @@ RSpec.describe 'Container Registry', :js do end it('pagination navigate to the second page') do - visit_second_page + visit_details_second_page + expect(page).to have_content '20' end end @@ -116,22 +117,23 @@ RSpec.describe 'Container Registry', :js do context 'when there are more than 10 images' do before do - create_list(:container_repository, 12, project: project) project.container_repositories << container_repository + create_list(:container_repository, 12, project: project) + visit_container_registry end it 'shows pagination' do - expect(page).to have_css '.gl-pagination' + expect(page).to have_css '.gl-keyset-pagination' end it 'pagination goes to second page' do - visit_second_page + visit_list_next_page expect(page).to have_content 'my/image' end it 'pagination is preserved after navigating back from details' do - visit_second_page + visit_list_next_page click_link 'my/image' breadcrumb = find '.breadcrumbs' breadcrumb.click_link 'Container Registry' @@ -148,7 +150,12 @@ RSpec.describe 'Container Registry', :js do click_link name end - def visit_second_page + def visit_list_next_page + pagination = find '.gl-keyset-pagination' + pagination.click_button 'Next' + end + + def visit_details_second_page pagination = find '.gl-pagination' pagination.click_link '2' end |