diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 06:09:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-23 06:09:28 +0000 |
commit | 1635eacd2a9293cd04d21e82def6e2c14ed01242 (patch) | |
tree | 257df93e8de5920c325651811af841128f20f2bc /spec/features | |
parent | 5b51129e3356a12283f0ba2da15db897ee30cf1a (diff) | |
download | gitlab-ce-1635eacd2a9293cd04d21e82def6e2c14ed01242.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/container_registry_spec.rb | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/spec/features/projects/container_registry_spec.rb b/spec/features/projects/container_registry_spec.rb index de17d831fbd..76c28c17858 100644 --- a/spec/features/projects/container_registry_spec.rb +++ b/spec/features/projects/container_registry_spec.rb @@ -149,12 +149,36 @@ describe 'Container Registry', :js do end it('pagination navigate to the second page') do - pagination = find('.gl-pagination') - pagination.click_link('2') + visit_second_page expect(page).to have_content '20' end end end + + context 'when there are more than 10 images' do + before do + create_list(:container_repository, 12, project: project) + project.container_repositories << container_repository + visit_container_registry + end + + it 'shows pagination' do + expect(page).to have_css '.gl-pagination' + end + + it 'pagination goes to second page' do + visit_second_page + expect(page).to have_content 'my/image' + end + + it 'pagination is preserved after navigating back from details' do + visit_second_page + click_link 'my/image' + breadcrumb = find '.breadcrumbs' + breadcrumb.click_link 'Container Registry' + expect(page).to have_content 'my/image' + end + end end def visit_container_registry @@ -163,6 +187,11 @@ describe 'Container Registry', :js do def visit_container_registry_details(name) visit_container_registry - click_link(name) + click_link name + end + + def visit_second_page + pagination = find '.gl-pagination' + pagination.click_link '2' end end |