Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoneill committed Jun 26, 2020
1 parent 6780019 commit 83d50f6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/__mocks__/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions test/iiifannotation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,18 @@ describe('Component', () => {
expect(wrapper.html()).toContain('"bees2.json" did not render. Please ensure your annotation link is correct.')
})

test('test with regular image', async () => {
const wrapper = mount(iiifAnnotation,{
propsData: {
annotationlist: 'regular.json'
}
})
await wrapper.vm.$nextTick()
await flushPromises()
const annotations = wrapper.vm.$data.annotation_items[0]
expect(annotations.image).toEqual(["<div id=\"regular0_canvas_img0\"></div>"])
expect(Object.keys(annotations).length).toBe(9)
expect(annotations.fullImage).toEqual("/annotate/assets/images/custom/spencer-davis-7ZpvOE2psxM-unsplash.jpg")
})

})
26 changes: 26 additions & 0 deletions test/storyboard.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 83d50f6

Please sign in to comment.