diff --git a/test/views/reports/index.test.js b/test/views/reports/index.test.js index 87306d85..288b3b19 100644 --- a/test/views/reports/index.test.js +++ b/test/views/reports/index.test.js @@ -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,