Skip to content

Commit 7ab8c56

Browse files
committed
test(draw): cover text confirmation preview rendering
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c07b50a commit 7ab8c56

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/tests/components/Draw/TextInput.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ vi.mock('@nextcloud/vue/components/NcDialog', () => ({
5353
},
5454
}))
5555

56+
vi.mock('../../../components/PreviewSignature/PreviewSignature.vue', () => ({
57+
default: {
58+
name: 'PreviewSignature',
59+
template: '<div class="preview-signature-stub" />',
60+
props: ['src'],
61+
},
62+
}))
63+
5664
vi.mock('@fontsource/dancing-script', () => ({}))
5765

5866
describe('TextInput.vue - Text Signature Component', () => {
@@ -180,7 +188,9 @@ describe('TextInput.vue - Text Signature Component', () => {
180188
await wrapper.vm.$nextTick()
181189
wrapper.vm.value = 'John Doe'
182190
wrapper.vm.confirmSignature()
191+
await wrapper.vm.$nextTick()
183192
expect(wrapper.vm.modal).toBe(true)
193+
expect(wrapper.find('.preview-signature-stub').exists()).toBe(true)
184194
})
185195

186196
it('handles modal state correctly', async () => {

0 commit comments

Comments
 (0)