Skip to content

Commit f982f93

Browse files
committed
build: run tests with firefox headless
1 parent 9673f63 commit f982f93

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ addons:
1111
# we alias FIREBASE_ACCESS_TOKEN to $SAUCE_ACCESS_KEY in env.sh and set the SAUCE_ACCESS_KEY there
1212
- secure: "PKts/IbxuJRWWOEeiGbl8Z9zds0M+hIdCH/g/E4WbQ9yzSvSbdwzfmRfFccQFjxjsrY7+SJMVjsURZy+xUyBpzqgWYHUItnSVqjZb8DlyAU2IXyg8TM9BVLkGGe6k5k4PIFVmfMMMzQwWMM0X0W9w3oYmfHL5egxwSHvf9HIqLolLNXg8sqamIdS5d5KoCXf1c+oRjN/IMBktzNBR6N4OFOZQXVoepXNiIvTWAcTtOPBvFWdKP2n7RVioHKdm4a85aCUpDJp+LYGaLqiQZoRzmzfVTnAhTAPdd4ao5w/+jojrfZIHV55bqYF9rLnQMTneKsiyVNVYJzOLuxmARa/EEKfZld+J3rX4/o4cogrU38YSZF+T7J9g/7CTsnIZ3F6W6m+8iJbIBh55nGOQi5PVe458Q/nGb3fgQd2Z4+6lK9k479H4Ssh/Y7hbVQbepqEVIXzZKqWX6/ZE4iWoR/Q2dm0hySFmmB/R2etixX5JxhnHvgobTYIQ+1liJVp/3YFW1ru64Yg6yz/V291Bhh9g31znmTROCJ/usAmZZaLUqW1TDKnLIMP+M74MF9XERqcWKywXRFwxP4E5uDnx/vAyN49gL+SDfrBUxUtXrTkKZAlglwo9SgA7cOYEPWrionvKcGm87gCBYHFUmXZNQVzh212fpuJYXb/vy0sPDj8La4="
1313
chrome: stable
14+
firefox: latest
1415

1516
branches:
1617
only:

src/lib/list/selection-list.spec.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,12 @@ describe('MatSelectionList', () => {
347347
}));
348348

349349
it('should be focused when focus on nativeElements', () => {
350-
listOption.nativeElement.focus();
350+
dispatchFakeEvent(listOption.nativeElement, 'focus');
351351
fixture.detectChanges();
352352

353-
expect(listItemEl.nativeElement).toBe(document.activeElement);
354-
if (platform.SAFARI || platform.FIREFOX) {
355-
expect(listItemEl.nativeElement.className).toContain('mat-list-item-focus');
356-
}
353+
expect(listItemEl.nativeElement.className).toContain('mat-list-item-focus');
357354

358-
listOption.nativeElement.blur();
355+
dispatchFakeEvent(listOption.nativeElement, 'blur');
359356
fixture.detectChanges();
360357

361358
expect(listItemEl.nativeElement.className).not.toContain('mat-list-item-focus');

test/browser-providers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
const browserConfig = {
88
'ChromeHeadless_CI': { unitTest: {target: 'TC', required: true }},
9-
'Firefox': { unitTest: {target: 'BS', required: true }},
9+
'FirefoxHeadless': { unitTest: {target: 'TC', required: true }},
1010
'ChromeBeta': { unitTest: {target: null, required: false }},
1111
'FirefoxBeta': { unitTest: {target: null, required: false }},
1212
'ChromeDev': { unitTest: {target: null, required: true }},

test/remote_browsers.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"--window-size=1024,768"
1212
]
1313
},
14+
"FirefoxHeadless": {
15+
"base": "Firefox",
16+
"flags": [
17+
"-headless"
18+
]
19+
},
1420
"SL_CHROME": {
1521
"base": "SauceLabs",
1622
"browserName": "chrome",

0 commit comments

Comments
 (0)