diff --git a/src/app/components/notification/notification.scss b/src/app/components/notification/notification.scss index 9938680..b630683 100644 --- a/src/app/components/notification/notification.scss +++ b/src/app/components/notification/notification.scss @@ -5,7 +5,7 @@ 40% { opacity: 1; } - 80% { + 70% { opacity: 1; } 100% { @@ -22,13 +22,13 @@ border-radius: 10px; box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.5); padding: 1rem 3rem; - position: absolute; + position: fixed; right: 1rem; top: 1rem; z-index: 999; &--fade-in-out { - animation: fade-in-out 0.8s ease-in-out forwards; + animation: fade-in-out ease-in-out 1s forwards; } &--success { diff --git a/src/app/services/notifier.spec.ts b/src/app/services/notifier.spec.ts index 44a7cde..579a401 100644 --- a/src/app/services/notifier.spec.ts +++ b/src/app/services/notifier.spec.ts @@ -15,13 +15,13 @@ describe('Notifier', () => { expect(service).toBeTruthy(); }); - it('should set notification on notify and clean it after 800ms', fakeAsync(() => { + it('should set notification on notify and clean it after 1100ms', fakeAsync(() => { TestBed.tick(); const NOTIFICATION_MOCK = new Notification('MOCK NOTIFICATION'); service.notify(NOTIFICATION_MOCK); expect(service.notification$()).toEqual(NOTIFICATION_MOCK); TestBed.tick(); - tick(1000); + tick(1100); expect(service.notification$()).toEqual(null); })); }); diff --git a/src/app/services/notifier.ts b/src/app/services/notifier.ts index f6e88a6..5cae24a 100644 --- a/src/app/services/notifier.ts +++ b/src/app/services/notifier.ts @@ -11,7 +11,7 @@ export class Notifier { if (this.notification$()) { setTimeout(() => { this.cleanup(); - }, 800); + }, 1100); } }); }