fix tests

This commit is contained in:
Henry Jameson 2026-06-04 22:44:19 +03:00
commit 745981e25f
2 changed files with 20 additions and 29 deletions

View file

@ -166,10 +166,15 @@ describe('Draft saving', () => {
await textarea.setValue('mew mew')
wrapper.vm.requestClose()
await nextTick()
const saveButton = wrapper.findByText(
'button',
$t('post_status.close_confirm_save_button'),
)
await flushPromises()
const saveButton = await vi.waitFor(() => {
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
await saveButton.trigger('click')
console.info('clicked')