Skip to content

Commit 5a22417

Browse files
committed
chore(*): fixing combo tests
1 parent 723288f commit 5a22417

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

projects/igniteui-angular/karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = function (config) {
99
frameworks: ['parallel', 'jasmine', '@angular-devkit/build-angular'],
1010
files: [
1111
{ pattern: '../../node_modules/hammerjs/hammer.min.js', watched: false },
12-
{ pattern: '../../node_modules/hammer-simulator/index.js', watched: false }
12+
{ pattern: '../../node_modules/hammer-simulator/index.js', watched: false },
13+
{ pattern: './test.css', watched: false }
1314
],
1415
plugins: [
1516
'karma-parallel',

projects/igniteui-angular/karma.watch.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = function (config) {
77
frameworks: ['jasmine', '@angular-devkit/build-angular'],
88
files: [
99
{ pattern: '../../node_modules/hammerjs/hammer.min.js', watched: false },
10-
{ pattern: '../../node_modules/hammer-simulator/index.js', watched: false }
10+
{ pattern: '../../node_modules/hammer-simulator/index.js', watched: false },
11+
{ pattern: './test.css', watched: false }
1112
],
1213
plugins: [
1314
'karma-jasmine',

projects/igniteui-angular/src/lib/combo/combo.component.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ describe('igxCombo', () => {
8686
});
8787
mockSelection.get.and.returnValue(new Set([]));
8888
const mockDocument = jasmine.createSpyObj('DOCUMENT', [], { 'defaultView': { getComputedStyle: () => null }});
89+
jasmine.getEnv().allowRespy(true);
90+
91+
afterAll(() => {
92+
jasmine.getEnv().allowRespy(false);
93+
});
8994

9095
it('should correctly implement interface methods - ControlValueAccessor ', () => {
9196
combo = new IgxComboComponent(

projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ describe('IgxSimpleCombo', () => {
7272
mockSelection.get.and.returnValue(new Set([]));
7373
const platformUtil = null;
7474
const mockDocument = jasmine.createSpyObj('DOCUMENT', [], { 'defaultView': { getComputedStyle: () => null }});
75+
jasmine.getEnv().allowRespy(true);
76+
77+
afterAll(() => {
78+
jasmine.getEnv().allowRespy(false);
79+
});
7580

7681
it('should properly call dropdown methods on toggle', () => {
7782
combo = new IgxSimpleComboComponent(
@@ -1910,8 +1915,6 @@ describe('IgxSimpleCombo', () => {
19101915
});
19111916

19121917
it('should not change selection when selectionChanging event is canceled', () => {
1913-
spyOn(combo.selectionChanging, 'emit').and.callThrough();
1914-
19151918
fixture.detectChanges();
19161919

19171920
combo.select('Connecticut');
@@ -1947,7 +1950,6 @@ describe('IgxSimpleCombo', () => {
19471950

19481951

19491952
it('should preserved the input value of the combo when selectionChanging event is canceled', () => {
1950-
spyOn(combo.selectionChanging, 'emit').and.callThrough();
19511953
fixture.detectChanges();
19521954

19531955
const comboInput = fixture.debugElement.query(By.css(`.igx-input-group__input`));

0 commit comments

Comments
 (0)