fix tests
This commit is contained in:
parent
8d40de4bfc
commit
745981e25f
2 changed files with 20 additions and 29 deletions
|
|
@ -38,11 +38,9 @@ describe('routes', () => {
|
||||||
const matchedComponents = router.currentRoute.value.matched
|
const matchedComponents = router.currentRoute.value.matched
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
Object.hasOwn(
|
matchedComponents[0].components.default.name,
|
||||||
matchedComponents[0].components.default.components,
|
).to.eql('AsyncComponentWrapper')
|
||||||
'UserCard',
|
|
||||||
),
|
|
||||||
).to.eql(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("user's profile at /users", async () => {
|
it("user's profile at /users", async () => {
|
||||||
|
|
@ -51,11 +49,8 @@ describe('routes', () => {
|
||||||
const matchedComponents = router.currentRoute.value.matched
|
const matchedComponents = router.currentRoute.value.matched
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
Object.hasOwn(
|
matchedComponents[0].components.default.name,
|
||||||
matchedComponents[0].components.default.components,
|
).to.eql('AsyncComponentWrapper')
|
||||||
'UserCard',
|
|
||||||
),
|
|
||||||
).to.eql(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('list view', async () => {
|
it('list view', async () => {
|
||||||
|
|
@ -64,11 +59,8 @@ describe('routes', () => {
|
||||||
const matchedComponents = router.currentRoute.value.matched
|
const matchedComponents = router.currentRoute.value.matched
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
Object.hasOwn(
|
matchedComponents[0].components.default.name,
|
||||||
matchedComponents[0].components.default.components,
|
).to.eql('AsyncComponentWrapper')
|
||||||
'ListsCard',
|
|
||||||
),
|
|
||||||
).to.eql(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('list timeline', async () => {
|
it('list timeline', async () => {
|
||||||
|
|
@ -77,11 +69,8 @@ describe('routes', () => {
|
||||||
const matchedComponents = router.currentRoute.value.matched
|
const matchedComponents = router.currentRoute.value.matched
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
Object.hasOwn(
|
matchedComponents[0].components.default.name,
|
||||||
matchedComponents[0].components.default.components,
|
).to.eql('AsyncComponentWrapper')
|
||||||
'Timeline',
|
|
||||||
),
|
|
||||||
).to.eql(true)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('list edit', async () => {
|
it('list edit', async () => {
|
||||||
|
|
@ -90,10 +79,7 @@ describe('routes', () => {
|
||||||
const matchedComponents = router.currentRoute.value.matched
|
const matchedComponents = router.currentRoute.value.matched
|
||||||
|
|
||||||
expect(
|
expect(
|
||||||
Object.hasOwn(
|
matchedComponents[0].components.default.name,
|
||||||
matchedComponents[0].components.default.components,
|
).to.eql('AsyncComponentWrapper')
|
||||||
'BasicUserCard',
|
|
||||||
),
|
|
||||||
).to.eql(true)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -166,10 +166,15 @@ describe('Draft saving', () => {
|
||||||
await textarea.setValue('mew mew')
|
await textarea.setValue('mew mew')
|
||||||
wrapper.vm.requestClose()
|
wrapper.vm.requestClose()
|
||||||
await nextTick()
|
await nextTick()
|
||||||
const saveButton = wrapper.findByText(
|
await flushPromises()
|
||||||
'button',
|
const saveButton = await vi.waitFor(() => {
|
||||||
$t('post_status.close_confirm_save_button'),
|
const button = wrapper.findByText(
|
||||||
)
|
'button',
|
||||||
|
$t('post_status.close_confirm_save_button'),
|
||||||
|
)
|
||||||
|
if (!button) throw new Error('Save button not present')
|
||||||
|
return button
|
||||||
|
})
|
||||||
expect(saveButton).to.be.ok
|
expect(saveButton).to.be.ok
|
||||||
await saveButton.trigger('click')
|
await saveButton.trigger('click')
|
||||||
console.info('clicked')
|
console.info('clicked')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue