Add test to deleting a note

This commit is contained in:
Angelina Filippova 2019-04-03 23:12:01 +03:00
parent 7d778db81d
commit cbce6e7586

View file

@ -72,6 +72,19 @@ describe('Reports', () => {
expect(noteTextArea.isVisible()).toBe(false)
})
it('deletes a note', () => {
const wrapper = mount(Reports, {
store,
localVue
})
const notes = store.state.reports.fetchedReports[0].notes
expect(notes.length).toBe(3)
wrapper.find('.el-icon-close').trigger('click')
const updatedNotes = store.state.reports.fetchedReports[0].notes
expect(updatedNotes.length).toBe(2)
})
it('loads more reports on scroll', () => {
const wrapper = mount(Reports, {
store,