mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Add toasts to UI (#25449)
Fixes https://github.com/go-gitea/gitea/issues/24353 In some case like async success/error, it is useful to show toasts in UI.
This commit is contained in:
1 parent
72c60f94c1
commit
c71e8abbc3
15 files changed
+220
-20
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import {test, expect} from 'vitest';
|
||||
import {showInfoToast, showErrorToast, showWarningToast} from './toast.js';
|
||||
|
||||
test('showInfoToast', async () => {
|
||||
await showInfoToast('success 😀', {duration: -1});
|
||||
expect(document.querySelector('.toastify')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('showWarningToast', async () => {
|
||||
await showWarningToast('warning 😐', {duration: -1});
|
||||
expect(document.querySelector('.toastify')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('showErrorToast', async () => {
|
||||
await showErrorToast('error 🙁', {duration: -1});
|
||||
expect(document.querySelector('.toastify')).toBeTruthy();
|
||||
});
|
||||
Reference in new issue
Block a user