BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9f00c2b0
Commit
9f00c2b0
authored
Feb 16, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce number of pipelines created to test pagination
stub pagination in tests
parent
e1af42ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+1
-1
pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+5
-6
No files found.
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
View file @
9f00c2b0
...
...
@@ -56,7 +56,7 @@ const CommitPipelinesStoreWithTimeAgo = require('../commit/pipelines/pipelines_s
*/
change(pagenum, apiScope) {
if (!apiScope) apiScope = 'all';
gl.utils.visitUrl(`?scope=${apiScope}&p=${pagenum}`);
gl.utils.visitUrl(`?scope=${apiScope}&p
age
=${pagenum}`);
},
},
template: `
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
9f00c2b0
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment