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
Léo-Paul Géneau
gitlab-ce
Commits
e28e1f42
Commit
e28e1f42
authored
Jan 09, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Fix pagination specs
parent
7e3405d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
app/assets/javascripts/vue_shared/components/table_pagination.vue
...ts/javascripts/vue_shared/components/table_pagination.vue
+3
-4
spec/javascripts/vue_shared/components/table_pagination_spec.js
...avascripts/vue_shared/components/table_pagination_spec.js
+0
-1
No files found.
app/assets/javascripts/vue_shared/components/table_pagination.vue
View file @
e28e1f42
...
...
@@ -93,10 +93,9 @@
},
},
methods
:
{
changePage
(
e
)
{
if
(
e
.
target
.
parentElement
.
classList
.
contains
(
'
disabled
'
)
)
return
;
changePage
(
text
,
isDisabled
)
{
if
(
isDisabled
)
return
;
const
text
=
e
.
target
.
innerText
;
const
{
totalPages
,
nextPage
,
previousPage
}
=
this
.
pageInfo
;
switch
(
text
)
{
...
...
@@ -142,7 +141,7 @@
disabled: item.disabled
}"
>
<a
@
click.prevent=
"changePage(
$event
)"
>
<a
@
click.prevent=
"changePage(
item.title, item.disabled
)"
>
{{
item
.
title
}}
</a>
</li>
...
...
spec/javascripts/vue_shared/components/table_pagination_spec.js
View file @
e28e1f42
...
...
@@ -72,7 +72,6 @@ describe('Pagination component', () => {
});
component
.
$el
.
querySelector
(
'
.js-previous-button a
'
).
click
();
expect
(
spy
).
toHaveBeenCalledWith
(
1
);
});
});
...
...
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