Files
gitea/web_src/js/modules/toast.test.ts
T
7ac505ff0d enhance(ui): restyle toasts (#38842)
Restyle toasts, add success toast to match the alerts.

<img width="500" alt="Screenshot 2026-08-09 at 11 33 44"
src="https://github.com/user-attachments/assets/d36422b8-0030-41dd-8056-b2d10d86280d"
/>

Alternatively we could also tint to match the alerts, but I do prefer
untinted.

<img width="500" alt="Screenshot 2026-08-09 at 11 34 44"
src="https://github.com/user-attachments/assets/73fcfde4-618b-424f-9aa9-4ada5c2904f6"
/>

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-08-09 22:17:28 +02:00

22 lines
683 B
TypeScript

import {showSuccessToast, showInfoToast, showErrorToast, showWarningToast} from './toast.ts';
test('showSuccessToast', async () => {
showSuccessToast('success', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showInfoToast', async () => {
showInfoToast('info', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showWarningToast', async () => {
showWarningToast('warning', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showErrorToast', async () => {
showErrorToast('error', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});