Skip to content

Commit b47f99c

Browse files
committed
chore(*): update for failing tests with Ivy false
1 parent a398ea8 commit b47f99c

27 files changed

+261
-191
lines changed

projects/igniteui-angular/karma.azure.grid.conf.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ module.exports = function (config) {
4242
colors: true,
4343
logLevel: config.LOG_INFO,
4444
autoWatch: true,
45-
browsers: ['ChromeHeadless'],
45+
browsers: ['ChromeHeadlessNoSandbox'],
46+
customLaunchers: {
47+
ChromeHeadlessNoSandbox: {
48+
base: 'ChromeHeadless',
49+
flags: ['--no-sandbox', '--disable-gpu'],
50+
debug: false
51+
}
52+
},
4653
singleRun: true
4754
});
4855
};

projects/igniteui-angular/karma.azure.hierarchical-grid.conf.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
44+
browsers: ['ChromeHeadlessNoSandbox'],
45+
customLaunchers: {
46+
ChromeHeadlessNoSandbox: {
47+
base: 'ChromeHeadless',
48+
flags: ['--no-sandbox', '--disable-gpu'],
49+
debug: false
50+
}
51+
},
4552
singleRun: true
4653
});
4754
};

projects/igniteui-angular/karma.azure.non-grid.conf.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
44+
browsers: ['ChromeHeadlessNoSandbox'],
45+
customLaunchers: {
46+
ChromeHeadlessNoSandbox: {
47+
base: 'ChromeHeadless',
48+
flags: ['--no-sandbox', '--disable-gpu'],
49+
debug: false
50+
}
51+
},
4552
singleRun: true
4653
});
4754
};

projects/igniteui-angular/karma.azure.tree-grid.conf.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ module.exports = function (config) {
4141
colors: true,
4242
logLevel: config.LOG_INFO,
4343
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
44+
browsers: ['ChromeHeadlessNoSandbox'],
45+
customLaunchers: {
46+
ChromeHeadlessNoSandbox: {
47+
base: 'ChromeHeadless',
48+
flags: ['--no-sandbox', '--disable-gpu'],
49+
debug: false
50+
}
51+
},
4552
singleRun: true
4653
});
4754
};

projects/igniteui-angular/karma.conf.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ module.exports = function (config) {
3535
},
3636
reporters: ['spec'],
3737
specReporter: {
38-
suppressSkipped: true
38+
suppressSkipped: true,
39+
suppressErrorSummary: false,
40+
suppressFailed: false,
41+
suppressPassed: false,
42+
showSpecTiming: false,
43+
failFast: false
3944
},
4045
port: 9876,
4146
colors: true,

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,25 @@ module.exports = function (config) {
3636
},
3737
reporters: ['spec'],
3838
specReporter: {
39-
suppressSkipped: true
39+
suppressSkipped: true,
40+
suppressErrorSummary: false,
41+
suppressFailed: false,
42+
suppressPassed: false,
43+
showSpecTiming: false,
44+
failFast: false
4045
},
4146
port: 9876,
4247
colors: true,
4348
logLevel: config.LOG_INFO,
4449
autoWatch: true,
45-
browsers: ['ChromeHeadless'],
50+
browsers: ['ChromeHeadlessNoSandbox'],
51+
customLaunchers: {
52+
ChromeHeadlessNoSandbox: {
53+
base: 'ChromeHeadless',
54+
flags: ['--no-sandbox', '--disable-gpu'],
55+
debug: false
56+
}
57+
},
4658
singleRun: false
4759
});
4860
};

projects/igniteui-angular/karma.hierarchical-grid.conf.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ module.exports = function (config) {
3535
},
3636
reporters: ['spec'],
3737
specReporter: {
38-
suppressSkipped: true
38+
suppressSkipped: true,
39+
suppressErrorSummary: false,
40+
suppressFailed: false,
41+
suppressPassed: false,
42+
showSpecTiming: false,
43+
failFast: false
3944
},
4045
port: 9876,
4146
colors: true,
4247
logLevel: config.LOG_INFO,
4348
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
49+
browsers: ['ChromeHeadlessNoSandbox'],
50+
customLaunchers: {
51+
ChromeHeadlessNoSandbox: {
52+
base: 'ChromeHeadless',
53+
flags: ['--no-sandbox', '--disable-gpu'],
54+
debug: false
55+
}
56+
},
4557
singleRun: false
4658
});
4759
};

projects/igniteui-angular/karma.non-grid.conf.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ module.exports = function (config) {
3535
},
3636
reporters: ['spec'],
3737
specReporter: {
38-
suppressSkipped: true
38+
suppressSkipped: true,
39+
suppressErrorSummary: false,
40+
suppressFailed: false,
41+
suppressPassed: false,
42+
showSpecTiming: false,
43+
failFast: false
3944
},
4045
port: 9876,
4146
colors: true,
4247
logLevel: config.LOG_INFO,
4348
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
49+
browsers: ['ChromeHeadlessNoSandbox'],
50+
customLaunchers: {
51+
ChromeHeadlessNoSandbox: {
52+
base: 'ChromeHeadless',
53+
flags: ['--no-sandbox', '--disable-gpu'],
54+
debug: false
55+
}
56+
},
4557
singleRun: false
4658
});
4759
};

projects/igniteui-angular/karma.tree-grid.conf.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ module.exports = function (config) {
3535
},
3636
reporters: ['spec'],
3737
specReporter: {
38-
suppressSkipped: true
38+
suppressSkipped: true,
39+
suppressErrorSummary: false,
40+
suppressFailed: false,
41+
suppressPassed: false,
42+
showSpecTiming: false,
43+
failFast: false
3944
},
4045
port: 9876,
4146
colors: true,
4247
logLevel: config.LOG_INFO,
4348
autoWatch: true,
44-
browsers: ['ChromeHeadless'],
49+
browsers: ['ChromeHeadlessNoSandbox'],
50+
customLaunchers: {
51+
ChromeHeadlessNoSandbox: {
52+
base: 'ChromeHeadless',
53+
flags: ['--no-sandbox', '--disable-gpu'],
54+
debug: false
55+
}
56+
},
4557
singleRun: false
4658
});
4759
};

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

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
TestBed
55
} from '@angular/core/testing';
66
import { By } from '@angular/platform-browser';
7-
import { IgxTextSelectionModule} from './text-selection.directive';
7+
import { IgxTextSelectionModule } from './text-selection.directive';
88

99
import { configureTestSuite } from '../../test-utils/configure-suite';
1010

@@ -14,13 +14,14 @@ describe('IgxSelection', () => {
1414
TestBed.configureTestingModule({
1515
declarations: [
1616
TriggerTextSelectionComponent,
17-
TriggerTextSelectionOnClickComponent
17+
TriggerTextSelectionOnClickComponent,
18+
TriggerTextSelectionFalseOnClickComponent
1819
],
1920
imports: [IgxTextSelectionModule]
2021
});
2122
}));
2223

23-
it('Should select the text which is into the input', async() => {
24+
it('Should select the text which is into the input', async () => {
2425
const fix = TestBed.createComponent(TriggerTextSelectionComponent);
2526
fix.detectChanges();
2627

@@ -34,7 +35,7 @@ describe('IgxSelection', () => {
3435
});
3536
});
3637

37-
it('Should select the text when the input is clicked', async() => {
38+
it('Should select the text when the input is clicked', async () => {
3839
const fix = TestBed.createComponent(TriggerTextSelectionOnClickComponent);
3940
fix.detectChanges();
4041

@@ -52,26 +53,19 @@ describe('IgxSelection', () => {
5253
});
5354
});
5455

55-
it('Shouldn\'t make a selection when the state is set to false', () => {
56-
const template = ` <input type="text" [igxTextSelection]="false" #select="igxTextSelection"
57-
(click)="select.trigger()" value="Some custom value!" />`;
58-
59-
TestBed.overrideTemplateUsingTestingModule(TriggerTextSelectionOnClickComponent, template);
60-
61-
TestBed.compileComponents().then(() => {
62-
const fix = TestBed.createComponent(TriggerTextSelectionOnClickComponent);
63-
fix.detectChanges();
56+
it('Shouldn\'t make a selection when the state is set to false', async() => {
57+
const fix = TestBed.createComponent(TriggerTextSelectionFalseOnClickComponent);
58+
fix.detectChanges();
6459

65-
const input = fix.debugElement.query(By.css('input'));
66-
const inputNativeElem = input.nativeElement;
67-
const inputElem: HTMLElement = input.nativeElement;
60+
const input = fix.debugElement.query(By.css('input'));
61+
const inputNativeElem = input.nativeElement;
62+
const inputElem: HTMLElement = input.nativeElement;
6863

69-
inputElem.click();
70-
fix.detectChanges();
64+
inputElem.click();
65+
fix.detectChanges();
7166

72-
expect(inputNativeElem.selectionEnd).toEqual(0);
73-
expect(inputNativeElem.value.substring(inputNativeElem.selectionStart, inputNativeElem.selectionEnd)).toEqual('');
74-
});
67+
expect(inputNativeElem.selectionEnd).toEqual(0);
68+
expect(inputNativeElem.value.substring(inputNativeElem.selectionStart, inputNativeElem.selectionEnd)).toEqual('');
7569
});
7670
});
7771

@@ -81,12 +75,19 @@ describe('IgxSelection', () => {
8175
<input type="text" [igxTextSelection]="true" value="Some custom value!" />
8276
`
8377
})
84-
class TriggerTextSelectionComponent {}
78+
class TriggerTextSelectionComponent { }
8579

8680
@Component({
8781
template:
8882
`
8983
<input type="text" [igxTextSelection] #select="igxTextSelection" (click)="select.trigger()" value="Some custom value!" />
9084
`
9185
})
92-
class TriggerTextSelectionOnClickComponent {}
86+
class TriggerTextSelectionOnClickComponent { }
87+
@Component({
88+
template:
89+
`
90+
<input type="text" [igxTextSelection]="false" #select="igxTextSelection" (click)="select.trigger()" value="Some custom value!" />
91+
`
92+
})
93+
class TriggerTextSelectionFalseOnClickComponent { }

0 commit comments

Comments
 (0)