@@ -1005,6 +1005,33 @@ describe('SpecReporter', () => {
1005
1005
'appium:appActivity' : '.MainActivity'
1006
1006
} , false ) ) . toBe ( 'com.example.android Android' )
1007
1007
} )
1008
+
1009
+ it ( 'should prefer bundleId over app path' , ( ) => {
1010
+ expect ( tmpReporter . getEnviromentCombo ( {
1011
+ platformName : 'Android' ,
1012
+ 'appium:automationName' : 'uiautomator2' ,
1013
+ 'appium:bundleId' : 'com.example.android' ,
1014
+ 'appium:appActivity' : '.MainActivity' ,
1015
+ 'appium:app' : '/foo/bar/loo.apk'
1016
+ } , false ) ) . toBe ( 'com.example.android Android' )
1017
+ } )
1018
+
1019
+ it ( 'prefers app activity over app path' , ( ) => {
1020
+ expect ( tmpReporter . getEnviromentCombo ( {
1021
+ platformName : 'Android' ,
1022
+ 'appium:automationName' : 'uiautomator2' ,
1023
+ 'appium:appActivity' : '.MainActivity' ,
1024
+ 'appium:app' : '/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/loo.apk'
1025
+ } , false ) ) . toBe ( '.MainActivity Android' )
1026
+ } )
1027
+
1028
+ it ( 'uses file name as app path instead of long path' , ( ) => {
1029
+ expect ( tmpReporter . getEnviromentCombo ( {
1030
+ platformName : 'Android' ,
1031
+ 'appium:automationName' : 'uiautomator2' ,
1032
+ 'appium:app' : '/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/foo/bar/loo.apk'
1033
+ } , false ) ) . toBe ( 'loo.apk Android' )
1034
+ } )
1008
1035
} )
1009
1036
1010
1037
describe ( 'add real time report' , ( ) => {
0 commit comments