Skip to content

Commit

Permalink
Merge pull request #5012 from nextcloud-libraries/fix/noid/modal-test
Browse files Browse the repository at this point in the history
[next] fix(test): correctly provide props in test
  • Loading branch information
ShGKme authored Dec 30, 2023
2 parents 7b7d07f + 9a52259 commit 179aaf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/components/NcModal/modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import NcModal from '../../../../src/components/NcModal/NcModal.vue'

describe('NcModal', () => {
it('closes on click outside with `canClose`', async () => {
const wrapper = mount(NcModal, { propsData: { canClose: true, title: 'modal' } })
const wrapper = mount(NcModal, { props: { canClose: true, title: 'modal' } })
expect(wrapper.html().includes('modal-wrapper')).toBe(true)

expect(wrapper.emitted('update:show')).toBe(undefined)
Expand All @@ -37,7 +37,7 @@ describe('NcModal', () => {
})

it('not closes on click outside when `canClose` is false', async () => {
const wrapper = mount(NcModal, { propsData: { canClose: false, title: 'modal' } })
const wrapper = mount(NcModal, { props: { canClose: false, title: 'modal' } })
expect(wrapper.html().includes('modal-wrapper')).toBe(true)

expect(wrapper.emitted('update:show')).toBe(undefined)
Expand All @@ -48,7 +48,7 @@ describe('NcModal', () => {
})

it('not closes on click outside when `canClose` is true but `closeOnClickOutside` is false', async () => {
const wrapper = mount(NcModal, { propsData: { canClose: true, closeOnClickOutside: false, title: 'modal' } })
const wrapper = mount(NcModal, { props: { canClose: true, closeOnClickOutside: false, title: 'modal' } })
expect(wrapper.html().includes('modal-wrapper')).toBe(true)

expect(wrapper.emitted('update:show')).toBe(undefined)
Expand Down

0 comments on commit 179aaf1

Please sign in to comment.