diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2021-12-30 16:24:44 +0300 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2022-01-03 12:27:39 +0300 |
commit | 1f9cef437a71fadb9ccbb2c3447a9b9dbd78e62d (patch) | |
tree | bc4e273a784f5f9fbee48bdc76af4f0b9c8fdefb /src/tests | |
parent | 342952d2c60d2ac82ec13afe2722c6603fdfef4f (diff) |
add basic tests for ImageView.vue
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/nodes/ImageView.spec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tests/nodes/ImageView.spec.js b/src/tests/nodes/ImageView.spec.js index 13a0b2456..db1ac3e00 100644 --- a/src/tests/nodes/ImageView.spec.js +++ b/src/tests/nodes/ImageView.spec.js @@ -64,4 +64,18 @@ describe('Image View src attribute based on markdown', () => { expect(wrapper.find('.image__main').attributes('src')) .toBe('https://nextcloud/index.php/apps/files_sharing/publicpreview/CSYoWifBzrsMWeA?file=/deck11-calendar.png&x=1760&y=990&a=true') }) + + test('image served by the Text app API', () => { + const wrapper = factory({src: 'text://image?imageFileName=1640709467-a%60a%60a.png'}) + expect(wrapper.vm.isSupportedImage).toBe(true) + expect(wrapper.find('.image__main').attributes('src')) + .toContain('apps/text/image?documentId=') + }) + + test('image served by the Text app API', () => { + const wrapper = factory({src: 'text://image?imageFileName=1640709467-a%60a%60a.png'}) + expect(wrapper.vm.isSupportedImage).toBe(true) + expect(wrapper.find('.image__main').attributes('src')) + .toContain('imageFileName=1640709467-a%60a%60a.png') + }) }) |