forked from AkkomaGang/admin-fe
Add test to deleting a note
This commit is contained in:
parent
7d778db81d
commit
cbce6e7586
1 changed files with 13 additions and 0 deletions
|
@ -72,6 +72,19 @@ describe('Reports', () => {
|
||||||
expect(noteTextArea.isVisible()).toBe(false)
|
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', () => {
|
it('loads more reports on scroll', () => {
|
||||||
const wrapper = mount(Reports, {
|
const wrapper = mount(Reports, {
|
||||||
store,
|
store,
|
||||||
|
|
Loading…
Reference in a new issue