12 lines
367 B
TypeScript
12 lines
367 B
TypeScript
import {t} from '@/scripts/i18n';
|
|
import {showModal} from '@/scripts/modal';
|
|
|
|
it('show modal', async () => {
|
|
Promise.resolve().then(() => {
|
|
expect(document.querySelector('.modal-title')!.textContent).toBe(t('general.tip'));
|
|
document.querySelector<HTMLButtonElement>('.btn-primary')!.click();
|
|
});
|
|
const {value} = await showModal();
|
|
expect(value).toBe('');
|
|
});
|