Skip to content

Commit 4ef6c6b

Browse files
authored
style(notification-container): Remove unnecessary white space (#204)
- Fix class set on wrong element causing unnecessary white space Closes #113.
1 parent 17723a5 commit 4ef6c6b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

projects/angular-notifier/src/lib/components/notifier-container.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<ul>
2-
<li class="notifier__container-list" *ngFor="let notification of notifications; trackBy: identifyNotification">
1+
<ul class="notifier__container-list">
2+
<li class="notifier__container-list-item" *ngFor="let notification of notifications; trackBy: identifyNotification">
33
<notifier-notification [notification]="notification" (ready)="onNotificationReady($event)" (dismiss)="onNotificationDismiss($event)">
44
</notifier-notification>
55
</li>

projects/angular-notifier/src/lib/components/notifier-container.component.spec.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Notifier Container Component', () => {
6161
type: 'SHOW',
6262
});
6363
componentFixture.detectChanges();
64-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
64+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
6565

6666
expect(listElements.length).toBe(1);
6767

@@ -353,7 +353,7 @@ describe('Notifier Container Component', () => {
353353
tick();
354354
componentFixture.detectChanges(); // Run a second change detection (to update the template)
355355

356-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
356+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
357357

358358
expect(listElements.length).toBe(0);
359359
expect(mockNotificationComponent.hide).toHaveBeenCalled();
@@ -397,7 +397,7 @@ describe('Notifier Container Component', () => {
397397
tick();
398398
componentFixture.detectChanges(); // Run a second change detection (to update the template)
399399

400-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
400+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
401401

402402
expect(listElements.length).toBe(1);
403403
expect(mockNotificationComponent.hide).not.toHaveBeenCalled();
@@ -454,7 +454,7 @@ describe('Notifier Container Component', () => {
454454
tick();
455455
componentFixture.detectChanges(); // Run a second change detection (to update the template)
456456

457-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
457+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
458458

459459
const expectedCallTimes = 3;
460460
expect(listElements.length).toBe(1);
@@ -512,7 +512,7 @@ describe('Notifier Container Component', () => {
512512
tick(testNotifierConfig.animations.hide.speed);
513513
componentFixture.detectChanges(); // Run a second change detection (to update the template)
514514

515-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
515+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
516516

517517
const expectedCallTimes = 3;
518518
expect(listElements.length).toBe(1);
@@ -566,7 +566,7 @@ describe('Notifier Container Component', () => {
566566
tick(testNotifierConfig.animations.hide.speed - <number>testNotifierConfig.animations.overlap);
567567
componentFixture.detectChanges(); // Run a second change detection (to update the template)
568568

569-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
569+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
570570

571571
const expectedCallTimes = 3;
572572
expect(listElements.length).toBe(1);
@@ -607,7 +607,7 @@ describe('Notifier Container Component', () => {
607607
tick();
608608
componentFixture.detectChanges();
609609

610-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
610+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
611611

612612
const expectedCallTimes = 2;
613613
expect(listElements.length).toBe(0);
@@ -665,7 +665,7 @@ describe('Notifier Container Component', () => {
665665
tick();
666666
componentFixture.detectChanges(); // Run a second change detection (to update the template)
667667

668-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
668+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
669669

670670
const expectedCallTimes = 3;
671671
expect(listElements.length).toBe(1);
@@ -744,7 +744,7 @@ describe('Notifier Container Component', () => {
744744
tick();
745745
componentFixture.detectChanges(); // Run a second change detection (to update the template)
746746

747-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
747+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
748748

749749
const expectedCallTimes = 3;
750750
expect(listElements.length).toBe(1);
@@ -824,7 +824,7 @@ describe('Notifier Container Component', () => {
824824
tick();
825825
componentFixture.detectChanges(); // Run a second change detection (to update the template)
826826

827-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
827+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
828828

829829
const expectedCallTimes = 3;
830830
expect(listElements.length).toBe(0);
@@ -876,7 +876,7 @@ describe('Notifier Container Component', () => {
876876
tick(testNotifierConfig.animations.hide.speed + numberOfNotifications * <number>testNotifierConfig.animations.hide.offset);
877877
componentFixture.detectChanges(); // Run a second change detection (to update the template)
878878

879-
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list'));
879+
const listElements: Array<DebugElement> = componentFixture.debugElement.queryAll(By.css('.notifier__container-list-item'));
880880

881881
const expectedCallTimes = 3;
882882
expect(listElements.length).toBe(0);

0 commit comments

Comments
 (0)