mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Bugfix: ReportModal keeps showing success screen
This commit is contained in:
parent
dd6f9ddd25
commit
ff926ae35f
@ -131,6 +131,10 @@ describe('ReportModal.vue', () => {
|
||||
it('emits close', () => {
|
||||
expect(wrapper.emitted().close).toBeTruthy()
|
||||
})
|
||||
|
||||
it('resets success', () => {
|
||||
expect(wrapper.vm.success).toBe(false)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -94,9 +94,11 @@ export default {
|
||||
this.success = true
|
||||
this.$toast.success(this.$t('report.success'))
|
||||
setTimeout(() => {
|
||||
this.success = false
|
||||
this.$emit('close')
|
||||
}, 1500)
|
||||
} catch (err) {
|
||||
this.success = false
|
||||
this.$toast.error(err.message)
|
||||
} finally {
|
||||
this.loading = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user