build: run fewer browsers on saucelabs (#5045)

This commit is contained in:
Paul Gschwendtner
2017-06-12 22:37:16 +02:00
committed by Kara
parent 97e35dfb95
commit b3c75bb4b0
4 changed files with 24 additions and 13 deletions
+5
View File
@@ -37,4 +37,9 @@ export class Platform {
// Trident on mobile adds the android platform to the userAgent to trick detections.
ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
// Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
// this and just place the Safari keyword in the userAgent. To be more safe about Safari every
// Safari browser should also use Webkit as its layout engine.
SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
}
+3 -4
View File
@@ -24,7 +24,6 @@ import {
} from './input-container-errors';
import {MD_PLACEHOLDER_GLOBAL_OPTIONS} from '../core/placeholder/placeholder-options';
describe('MdInputContainer', function () {
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -108,7 +107,7 @@ describe('MdInputContainer', function () {
it('should not be treated as empty if type is date',
inject([Platform], (platform: Platform) => {
if (!(platform.TRIDENT || platform.FIREFOX)) {
if (!(platform.TRIDENT || platform.FIREFOX || (platform.SAFARI && !platform.IOS))) {
let fixture = TestBed.createComponent(MdInputContainerDateTestController);
fixture.detectChanges();
@@ -118,10 +117,10 @@ describe('MdInputContainer', function () {
}
}));
// Firefox and IE don't support type="date" and fallback to type="text".
// Firefox, Safari Desktop and IE don't support type="date" and fallback to type="text".
it('should be treated as empty if type is date on Firefox and IE',
inject([Platform], (platform: Platform) => {
if (platform.TRIDENT || platform.FIREFOX) {
if (platform.TRIDENT || platform.FIREFOX || (platform.SAFARI && !platform.IOS)) {
let fixture = TestBed.createComponent(MdInputContainerDateTestController);
fixture.detectChanges();
+8 -8
View File
@@ -5,9 +5,9 @@
* Target can be either: BS (Browserstack) | SL (Saucelabs) | null (To not run at all)
*/
const browserConfig = {
'Chrome': { unitTest: {target: 'SL', required: true }},
'Firefox': { unitTest: {target: 'SL', required: true }},
'ChromeBeta': { unitTest: {target: 'SL', required: false }},
'Chrome': { unitTest: {target: 'BS', required: true }},
'Firefox': { unitTest: {target: 'BS', required: true }},
'ChromeBeta': { unitTest: {target: null, required: false }},
'FirefoxBeta': { unitTest: {target: null, required: false }},
'ChromeDev': { unitTest: {target: null, required: true }},
'FirefoxDev': { unitTest: {target: null, required: true }},
@@ -19,15 +19,15 @@ const browserConfig = {
'Android4.2': { unitTest: {target: null, required: false }},
'Android4.3': { unitTest: {target: null, required: false }},
'Android4.4': { unitTest: {target: null, required: false }},
'Android5': { unitTest: {target: 'SL', required: false }},
'Android5': { unitTest: {target: null, required: false }},
'Safari7': { unitTest: {target: null, required: false }},
'Safari8': { unitTest: {target: null, required: false }},
'Safari9': { unitTest: {target: 'BS', required: false }},
'Safari10': { unitTest: {target: 'SL', required: false }},
'Safari9': { unitTest: {target: 'SL', required: true }},
'Safari10': { unitTest: {target: 'BS', required: true }},
'iOS7': { unitTest: {target: null, required: false }},
'iOS8': { unitTest: {target: null, required: false }},
'iOS9': { unitTest: {target: 'BS', required: true }},
'WindowsPhone': { unitTest: {target: 'BS', required: false }}
'WindowsPhone': { unitTest: {target: null, required: false }}
};
/** Exports all available remote browsers. */
@@ -63,4 +63,4 @@ function decodeToken(token) {
if (process.env.TRAVIS) {
process.env.SAUCE_ACCESS_KEY = decodeToken(process.env.SAUCE_ACCESS_KEY);
process.env.BROWSER_STACK_ACCESS_KEY = decodeToken(process.env.BROWSER_STACK_ACCESS_KEY);
}
}
+8 -1
View File
@@ -167,6 +167,13 @@
"os": "OS X",
"os_version": "El Capitan"
},
"BS_SAFARI10": {
"base": "BrowserStack",
"browser": "safari",
"browser_version": "10.1",
"os": "OS X",
"os_version": "Sierra"
},
"BS_IOS7": {
"base": "BrowserStack",
"device": "iPhone 5S",
@@ -251,4 +258,4 @@
"os": "android",
"os_version": "4.1"
}
}
}