Skip to content
Snippets Groups Projects
Commit 7d778db8 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Add test to loading more reports on scroll

parent 0e22183c
Branches
Tags
1 merge request!11Add ability to read reports
......@@ -71,4 +71,15 @@ describe('Reports', () => {
wrapper.find('.new-note .el-icon-close').trigger('click')
expect(noteTextArea.isVisible()).toBe(false)
})
it('loads more reports on scroll', () => {
const wrapper = mount(Reports, {
store,
localVue
})
expect(store.state.reports.fetchedReports.length).toEqual(3)
window.dispatchEvent(new CustomEvent('scroll', { detail: 2000 }))
expect(store.state.reports.fetchedReports.length).toEqual(6)
})
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment