@@ -31,10 +31,10 @@ if (!testConfigFile) {
31
31
*/
32
32
const browserMap = {
33
33
// Desktop
34
- // Chrome_Windows: seleniumLauncher('chrome', 'Windows 10', 'latest'),
35
- // Firefox_Windows: seleniumLauncher('firefox', 'Windows 10', 'latest'),
36
- // Safari_macOS: seleniumLauncher('safari', 'macOS 10.13', 'latest'),
37
- // Edge_Windows: seleniumLauncher('MicrosoftEdge', 'Windows 10', 'latest'),
34
+ Chrome_Windows : seleniumLauncher ( 'chrome' , 'Windows 10' , 'latest' ) ,
35
+ Firefox_Windows : seleniumLauncher ( 'firefox' , 'Windows 10' , 'latest' ) ,
36
+ Safari_macOS : seleniumLauncher ( 'safari' , 'macOS 10.13' , 'latest' ) ,
37
+ Edge_Windows : seleniumLauncher ( 'MicrosoftEdge' , 'Windows 10' , 'latest' ) ,
38
38
IE_Windows : seleniumLauncher ( 'internet explorer' , 'Windows 10' , 'latest' )
39
39
40
40
// Mobile
@@ -50,15 +50,16 @@ const packageConfigs = {
50
50
// Messaging currently only supports these browsers.
51
51
browsers : [ 'Chrome_Windows' , 'Firefox_Windows' , 'Edge_Windows' ]
52
52
} ,
53
- // Firestore has large number of IE test failures, need to spend time to fix.
54
- // firestore: {
55
- // browsers: [
56
- // 'Chrome_Windows',
57
- // 'Firefox_Windows',
58
- // 'Edge_Windows',
59
- // 'Safari_macOS'
60
- // ]
61
- // },
53
+ // Firestore unit tests have OOM problems compiling with Babel for IE.
54
+ // Firestore integration/firestore tests do run on all browsers.
55
+ 'packages/firestore' : {
56
+ browsers : [
57
+ 'Chrome_Windows' ,
58
+ 'Firefox_Windows' ,
59
+ 'Edge_Windows' ,
60
+ 'Safari_macOS'
61
+ ]
62
+ } ,
62
63
// Installations has IE errors related to `idb` library that need to be figured out.
63
64
installations : {
64
65
browsers : [
@@ -75,11 +76,14 @@ const packageConfigs = {
75
76
*
76
77
* @param {string } packageName Name of package being tested (e.g., "firestore")
77
78
*/
78
- function getSauceLabsBrowsers ( packageName ) {
79
- if ( packageConfigs [ packageName ] ) {
79
+ function getSauceLabsBrowsers ( packageName , packageType ) {
80
+ const packageConfig =
81
+ packageConfigs [ packageName ] ||
82
+ packageConfigs [ `${ packageType } /${ packageName } ` ] ;
83
+ if ( packageConfig ) {
80
84
const filteredBrowserMap = { } ;
81
85
for ( const browserKey in browserMap ) {
82
- if ( packageConfigs [ packageName ] . browsers . includes ( browserKey ) ) {
86
+ if ( packageConfig . browsers . includes ( browserKey ) ) {
83
87
filteredBrowserMap [ browserKey ] = browserMap [ browserKey ] ;
84
88
}
85
89
}
@@ -109,10 +113,14 @@ function getPackageLabels() {
109
113
*/
110
114
function getTestFiles ( ) {
111
115
let root = path . resolve ( __dirname , '..' ) ;
112
- const { name : packageName } = getPackageLabels ( ) ;
116
+ const { name : packageName , type : packageType } = getPackageLabels ( ) ;
113
117
let patterns = require ( path . join ( root , testConfigFile ) ) . files ;
114
118
let dirname = path . dirname ( testConfigFile ) ;
115
- return { packageName, files : patterns . map ( p => path . join ( dirname , p ) ) } ;
119
+ return {
120
+ packageName,
121
+ packageType,
122
+ files : patterns . map ( p => path . join ( dirname , p ) )
123
+ } ;
116
124
}
117
125
118
126
function seleniumLauncher ( browserName , platform , version ) {
@@ -156,8 +164,8 @@ function appiumLauncher(
156
164
}
157
165
158
166
module . exports = function ( config ) {
159
- const { packageName, files : testFiles } = getTestFiles ( ) ;
160
- const sauceLabsBrowsers = getSauceLabsBrowsers ( packageName ) ;
167
+ const { packageName, packageType , files : testFiles } = getTestFiles ( ) ;
168
+ const sauceLabsBrowsers = getSauceLabsBrowsers ( packageName , packageType ) ;
161
169
162
170
const sauceLabsConfig = {
163
171
tunnelIdentifier : process . env . TRAVIS_JOB_NUMBER + '-' + packageName ,
0 commit comments