diff --git a/apps/web/composables/useNotification/__tests__/useNotification.spec.ts b/apps/web/composables/useNotification/__tests__/useNotification.spec.ts index ac8ad71f8..7f7907b6c 100644 --- a/apps/web/composables/useNotification/__tests__/useNotification.spec.ts +++ b/apps/web/composables/useNotification/__tests__/useNotification.spec.ts @@ -74,7 +74,7 @@ describe('useNotification', () => { expect(data.value.length).toBe(5); }); - it('should remove a notification after default timeout (3000ms)', async () => { + it('should remove a notification after default timeout (5000ms)', async () => { const { data, send } = useNotification(); send({ @@ -83,8 +83,8 @@ describe('useNotification', () => { }); expect(data.value.length).toBe(1); - - await new Promise((resolve) => setTimeout(resolve, 2000)); + + await new Promise((resolve) => setTimeout(resolve, 4000)); expect(data.value.length).toBe(1); await new Promise((resolve) => setTimeout(resolve, 1100)); diff --git a/apps/web/composables/useNotification/useNotification.ts b/apps/web/composables/useNotification/useNotification.ts index fc8504825..92f8d6121 100644 --- a/apps/web/composables/useNotification/useNotification.ts +++ b/apps/web/composables/useNotification/useNotification.ts @@ -1,7 +1,7 @@ import type { UseNotificationState, UseNotificationReturn, Notification } from './types'; const maxVisibleNotifications = 5; -const dismissTimeout = 3000; +const dismissTimeout = 5000; /** * @description Composable to display ui notifications diff --git a/apps/web/vitest.config.ts b/apps/web/vitest.config.ts index a25b1baa7..57e1afaa0 100644 --- a/apps/web/vitest.config.ts +++ b/apps/web/vitest.config.ts @@ -9,6 +9,7 @@ export default defineVitestConfig({ coverage: { reporter: ['text', 'html', 'json-summary', 'json'], }, + testTimeout: 6000, environment: 'nuxt', globals: true, clearMocks: true, diff --git a/docs/changelog/changelog_en.md b/docs/changelog/changelog_en.md index b396771ea..9b614deb3 100644 --- a/docs/changelog/changelog_en.md +++ b/docs/changelog/changelog_en.md @@ -37,6 +37,7 @@ - Manufacturer visual improvments - Changed manufacturer translation text. - In cases where the basket is empty during the checkout process, the system will now redirect to `/cart` and display a notification. +- Increased default notification timeout from 3 to 5 seconds. ## v1.6.0 (2024-10-10) Overview of all changes