diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-02-16 23:17:12 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-02-17 01:51:38 +0300 |
commit | 9f00c2b0d2362232b49ef260e0500b14b975e574 (patch) | |
tree | 33cdb01eb5e301c95b01a6478dc6e48032d06ea6 /spec/features/projects/pipelines/pipelines_spec.rb | |
parent | e1af42ce4e2a5097374e0e0e6c37a3291abb8835 (diff) |
Reduce number of pipelines created to test pagination
stub pagination in tests
Diffstat (limited to 'spec/features/projects/pipelines/pipelines_spec.rb')
-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 |