Skip to content

Commit f7eb85b

Browse files
sd5869mgol
authored andcommitted
Build: Fix config for iOS 11.4 & 12.0, re-enable testing in them
Closes #434
1 parent a9fc696 commit f7eb85b

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Gruntfile.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ module.exports = function( grunt ) {
5151
browsers.ios = [
5252
"bs_ios-5.1", "bs_ios-6.0", "bs_ios-7.0", "bs_ios-8.3", "bs_ios-9.3", "bs_ios-10.3",
5353

54-
// iOS 11.* & 12.0 launchers don't work so they have to be skipped for now.
55-
// "bs_ios-11.4", "bs_ios-12.0",
54+
"bs_ios-11.4", "bs_ios-12.0",
5655
];
5756
browsers.android = [
5857
"bs_android-4.0", "bs_android-4.1", "bs_android-4.2",

test/karma/karma.conf.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ var grunt = require( "grunt" );
44

55
module.exports = function( config ) {
66
var isTravis = process.env.TRAVIS,
7-
dateString = grunt.config( "dateString" );
7+
dateString = grunt.config( "dateString" ),
8+
isBrowserStack = !!( process.env.BROWSER_STACK_USERNAME &&
9+
process.env.BROWSER_STACK_ACCESS_KEY ),
10+
hostName = isBrowserStack? "bs-local.com" : "localhost";
811

912
config.set({
1013
browserStack: {
@@ -72,6 +75,7 @@ module.exports = function( config ) {
7275

7376
colors: !isTravis,
7477

78+
hostname: hostName,
7579
port: 9876,
7680

7781
// Possible values:
@@ -98,8 +102,7 @@ module.exports = function( config ) {
98102

99103
// You can't get access to secure environment variables from pull requests
100104
// so we don't have browserstack from them, but travis has headless Firefox so use that
101-
if ( !(process.env.BROWSER_STACK_USERNAME && process.env.BROWSER_STACK_ACCESS_KEY) &&
102-
process.env.TRAVIS_PULL_REQUEST ) {
105+
if ( !isBrowserStack && process.env.TRAVIS_PULL_REQUEST ) {
103106
config.browsers.push( "Firefox" );
104107
}
105108
}

test/karma/launchers.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,15 @@ module.exports = {
257257
base: "BrowserStack",
258258
device: "iPhone 6S",
259259
os: "ios",
260-
os_version: "11.4"
260+
os_version: "11.4",
261+
real_mobile: true
261262
},
262263
"bs_ios-12.0": {
263264
base: "BrowserStack",
264265
device: "iPhone XS",
265266
os: "ios",
266-
os_version: "12.0"
267+
os_version: "12.0",
268+
real_mobile: true
267269
},
268270

269271
"bs_android-2.3": {

0 commit comments

Comments
 (0)