Commit e28e1f42 authored by Filipa Lacerda's avatar Filipa Lacerda

[ci skip] Fix pagination specs

parent 7e3405d7
......@@ -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>
......
......@@ -72,7 +72,6 @@ describe('Pagination component', () => {
});
component.$el.querySelector('.js-previous-button a').click();
expect(spy).toHaveBeenCalledWith(1);
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment