Add tests

This commit is contained in:
Sol Fisher Romanoff 2022-06-18 18:15:51 +03:00
parent a6136f6cb2
commit ba4656312a
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
3 changed files with 115 additions and 3 deletions

View file

@ -37,4 +37,28 @@ describe('routes', () => {
expect(matchedComponents[0].components.default.components.hasOwnProperty('UserCard')).to.eql(true)
})
it('list view', async () => {
await router.push('/lists')
const matchedComponents = router.currentRoute.value.matched
expect(matchedComponents[0].components.default.components.hasOwnProperty('ListCard')).to.eql(true)
})
it('list timeline', async () => {
await router.push('/lists/1')
const matchedComponents = router.currentRoute.value.matched
expect(matchedComponents[0].components.default.components.hasOwnProperty('Timeline')).to.eql(true)
})
it('list edit', async () => {
await router.push('/lists/1/edit')
const matchedComponents = router.currentRoute.value.matched
expect(matchedComponents[0].components.default.components.hasOwnProperty('BasicUserCard')).to.eql(true)
})
})