@@ -17,22 +17,40 @@ describe('Browser names', function () {
1717 } ) ;
1818
1919 it ( 'Should return list of common browsers and devices' , function ( ) {
20+ const IS_AUTOMATE = process . env [ 'BROWSERSTACK_USE_AUTOMATE' ] && process . env [ 'BROWSERSTACK_USE_AUTOMATE' ] !== '0' ;
21+
22+ const REST_BROWSER_NAMES = [
23+ 'chrome@51.0:OS X Mavericks' ,
24+ 'firefox@45.0:OS X Yosemite' ,
25+ 'safari@9.1:OS X El Capitan' ,
26+ 'ie@9.0:Windows 7' ,
27+ 'ie@10.0:Windows 8' ,
28+ 'ie@11.0:Windows 8.1' ,
29+ 'edge@15.0:Windows 10' ,
30+ 'iPhone 7@10.3' ,
31+ 'iPhone SE@11.2' ,
32+ 'iPhone XR@12.1' ,
33+ 'Google Nexus 6@6.0'
34+ ] ;
35+
36+ const AUTOMATE_BROWSER_NAMES = [
37+ 'chrome@51.0:OS X Mavericks' ,
38+ 'firefox@45.0:OS X Yosemite' ,
39+ 'safari@9.1:OS X El Capitan' ,
40+ 'ie@9.0:Windows 7' ,
41+ 'ie@10.0:Windows 8' ,
42+ 'ie@11.0:Windows 8.1' ,
43+ 'edge@15.0:Windows 10' ,
44+ 'iPhone 7@10' ,
45+ 'iPhone SE@11' ,
46+ 'iPhone XR@12' ,
47+ 'Google Nexus 6@6.0'
48+ ] ;
49+
2050 return browserStackProvider
2151 . getBrowserList ( )
2252 . then ( function ( list ) {
23- expect ( list ) . to . include . members ( [
24- 'chrome@51.0:OS X Mavericks' ,
25- 'firefox@45.0:OS X Yosemite' ,
26- 'safari@9.1:OS X El Capitan' ,
27- 'ie@9.0:Windows 7' ,
28- 'ie@10.0:Windows 8' ,
29- 'ie@11.0:Windows 8.1' ,
30- 'edge@15.0:Windows 10' ,
31- 'iPhone 7@10.3' ,
32- 'iPhone SE@11.2' ,
33- 'iPhone XR@12.1' ,
34- 'Google Nexus 6@6.0'
35- ] ) ;
53+ expect ( list ) . to . include . members ( IS_AUTOMATE ? AUTOMATE_BROWSER_NAMES : REST_BROWSER_NAMES ) ;
3654 } ) ;
3755 } ) ;
3856
0 commit comments