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
b29f6c51
Commit
b29f6c51
authored
Feb 15, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `page` query parameter instead of `p` to keep consistency with all URLs
Fix rubocop error
parent
87f4767e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+2
-2
spec/features/projects/pipelines/pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+22
-0
No files found.
app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
View file @
b29f6c51
...
...
@@ -28,7 +28,7 @@ require('../vue_shared/components/pipelines_table');
},
props: ['scope', 'store', 'svgs'],
created() {
const pagenum = gl.utils.getParameterByName('p');
const pagenum = gl.utils.getParameterByName('p
age
');
const scope = gl.utils.getParameterByName('scope');
if (pagenum) this.pagenum = pagenum;
if (scope) this.apiScope = scope;
...
...
@@ -36,7 +36,7 @@ require('../vue_shared/components/pipelines_table');
},
methods: {
change(pagenum, apiScope) {
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 @
b29f6c51
...
...
@@ -277,6 +277,28 @@ describe 'Pipelines', :feature, :js do
end
end
end
context
'with pagination'
do
before
do
create_list
(
:ci_empty_pipeline
,
40
,
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
)
end
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
)
end
end
end
describe
'POST /:project/pipelines'
do
...
...
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