diff options
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 06f953a50d7..8d1214dedb4 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -288,23 +288,22 @@ describe 'Pipelines', :feature, :js do context 'with pagination' do before do - create_list(:ci_empty_pipeline, 40, project: project) + allow(Ci::Pipeline).to receive(:default_per_page).and_return(1) + create(:ci_empty_pipeline, project: project) end it 'should render pagination' do visit namespace_project_pipelines_path(project.namespace, project) wait_for_vue_resource - expect(page).to have_css('.gl-pagination') - expect(page.find_all('tbody tr').length).to eq(20) + expect(page).to have_selector('.gl-pagination') end - it "should render second page of pipelines" do + it 'should render second page of pipelines' do visit namespace_project_pipelines_path(project.namespace, project, page: '2') wait_for_vue_resource - expect(page).to have_css('.gl-pagination') - expect(page.find_all('tbody tr').length).to eq(20) + expect(page).to have_selector('.gl-pagination .page', count: 2) end end end |