Skip to content

Commit 47d7527

Browse files
committed
chore(*): fixing more build errors
1 parent 758aa26 commit 47d7527

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

projects/igniteui-angular/src/lib/directives/toggle/toggle.directive.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ describe('IgxToggle', () => {
471471
fixture.detectChanges();
472472
spyOn(IgxToggleDirective.prototype, 'toggle');
473473

474-
const defaults = /*<OverlaySettings>*/{
475-
positionStrategy: jasmine.any(ConnectedPositioningStrategy),
474+
const defaults: OverlaySettings = {
475+
positionStrategy: new ConnectedPositioningStrategy(),
476476
closeOnOutsideClick: true,
477477
modal: false,
478-
scrollStrategy: jasmine.any(AbsoluteScrollStrategy),
478+
scrollStrategy: new AbsoluteScrollStrategy(),
479479
excludePositionTarget: true
480480
};
481481

@@ -494,11 +494,11 @@ describe('IgxToggle', () => {
494494
fixture.detectChanges();
495495
spyOn(IgxToggleDirective.prototype, 'toggle');
496496

497-
const settings = /*<OverlaySettings>*/{
498-
positionStrategy: jasmine.any(ConnectedPositioningStrategy),
497+
const settings: OverlaySettings = {
498+
positionStrategy: new ConnectedPositioningStrategy(),
499499
closeOnOutsideClick: true,
500500
modal: false,
501-
scrollStrategy: jasmine.any(AbsoluteScrollStrategy),
501+
scrollStrategy: new AbsoluteScrollStrategy(),
502502
excludePositionTarget: true
503503
};
504504

@@ -510,7 +510,7 @@ describe('IgxToggle', () => {
510510
fixture.componentInstance.settings.modal = true;
511511
fixture.componentInstance.settings.positionStrategy = new AutoPositionStrategy();
512512
settings.modal = true;
513-
settings.positionStrategy = jasmine.any(AutoPositionStrategy);
513+
settings.positionStrategy = new AutoPositionStrategy();
514514
fixture.detectChanges();
515515
fixture.componentInstance.toggleAction.onClick();
516516
expect(IgxToggleDirective.prototype.toggle).toHaveBeenCalledWith(settings);
@@ -529,11 +529,11 @@ describe('IgxToggle', () => {
529529
const toggleSpy = spyOn(IgxToggleDirective.prototype, 'toggle');
530530
const button = fixture.debugElement.query(By.directive(IgxToggleActionDirective)).nativeElement;
531531

532-
const settings = /*<OverlaySettings>*/{
533-
positionStrategy: jasmine.any(ConnectedPositioningStrategy),
532+
const settings: OverlaySettings = {
533+
positionStrategy: new ConnectedPositioningStrategy(),
534534
closeOnOutsideClick: true,
535535
modal: false,
536-
scrollStrategy: jasmine.any(AbsoluteScrollStrategy),
536+
scrollStrategy: new AbsoluteScrollStrategy(),
537537
excludePositionTarget: true
538538
};
539539
fixture.componentInstance.settings.positionStrategy = new ConnectedPositioningStrategy();
@@ -587,12 +587,12 @@ describe('IgxToggle', () => {
587587
const toggleSpy = spyOn(IgxToggleDirective.prototype, 'toggle');
588588
fixture.detectChanges();
589589

590-
const settings = /*<OverlaySettings>*/{
591-
positionStrategy: jasmine.any(ConnectedPositioningStrategy),
590+
const settings: OverlaySettings = {
591+
positionStrategy: new ConnectedPositioningStrategy(),
592592
closeOnOutsideClick: true,
593593
modal: false,
594-
scrollStrategy: jasmine.any(AbsoluteScrollStrategy),
595-
outlet: jasmine.any(IgxOverlayOutletDirective),
594+
scrollStrategy: new AbsoluteScrollStrategy(),
595+
outlet: outlet,
596596
excludePositionTarget: true
597597
};
598598

projects/igniteui-angular/src/lib/drop-down/drop-down.component.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,22 @@ describe('IgxDropDown ', () => {
101101
dropdown.selectItem(data[1]);
102102
expect(dropdown.selectedItem).toEqual(data[1]);
103103
expect(dropdown.onSelection.emit).toHaveBeenCalledTimes(1);
104-
expect(dropdown.onSelection.emit).toHaveBeenCalledWith(
105-
{
106-
oldSelection: null,
107-
newSelection: data[1],
108-
cancel: false
109-
});
104+
let args: ISelectionEventArgs = {
105+
oldSelection: null,
106+
newSelection: data[1],
107+
cancel: false
108+
};
109+
expect(dropdown.onSelection.emit).toHaveBeenCalledWith(args);
110110

111111
dropdown.clearSelection();
112112
expect(dropdown.selectedItem).toBeNull();
113113
expect(dropdown.onSelection.emit).toHaveBeenCalledTimes(2);
114-
expect(dropdown.onSelection.emit).toHaveBeenCalledWith(
115-
{
116-
oldSelection: { value: data[1].value, index: data[1].index, selected: false },
117-
newSelection: null,
118-
cancel: false
119-
});
114+
args = {
115+
oldSelection: { value: data[1].value, index: data[1].index, selected: false },
116+
newSelection: null,
117+
cancel: false
118+
};
119+
expect(dropdown.onSelection.emit).toHaveBeenCalledWith(args);
120120
});
121121
it('setSelectedItem should return selected item', () => {
122122
const selectionService = new IgxSelectionAPIService();

0 commit comments

Comments
 (0)