Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+1
-1
spec/features/projects/pipelines/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