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
d4a2c9e6
Commit
d4a2c9e6
authored
Dec 13, 2016
by
Regis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prev next tests for pagination
parent
f9db61fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
spec/javascripts/vue_pagination/pagination_spec.js.es6
spec/javascripts/vue_pagination/pagination_spec.js.es6
+23
-9
No files found.
spec/javascripts/vue_pagination/pagination_spec.js.es6
View file @
d4a2c9e6
...
...
@@ -37,7 +37,7 @@ describe('Pagination component', () => {
expect(changeChanges.two).toEqual('all');
});
it('should
change page to 2 and previous should go cak to 1
', () => {
it('should
go to the previous page
', () => {
fixture.set('<div class="test-pagination-container"></div>');
component = new window.gl.VueGlPagination({
...
...
@@ -45,23 +45,37 @@ describe('Pagination component', () => {
propsData: {
pageInfo: {
totalPages: 10,
nextPage:
2
,
previousPage:
''
,
nextPage:
3
,
previousPage:
1
,
},
change,
},
});
expect(component.$el.classList).toContain('gl-pagination');
component.changepage({ target: { innerText: '2' } });
component.changepage({ target: { innerText: 'Prev' } });
expect(changeChanges.one).toEqual(
2
);
expect(changeChanges.one).toEqual(
1
);
expect(changeChanges.two).toEqual('all');
});
component.changepage({ target: { innerText: 'Prev' } });
it('should go to the next page', () => {
fixture.set('<div class="test-pagination-container"></div>');
expect(changeChanges.one).toEqual(1);
component = new window.gl.VueGlPagination({
el: document.querySelector('.test-pagination-container'),
propsData: {
pageInfo: {
totalPages: 10,
nextPage: 5,
previousPage: 3,
},
change,
},
});
component.changepage({ target: { innerText: 'Next' } });
expect(changeChanges.one).toEqual(5);
expect(changeChanges.two).toEqual('all');
});
});
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