@@ -556,12 +556,16 @@ def build_android(attributes={}, assert_success=True, tns_path=None, log_trace=F
556556 apk_path = apk_path .replace ("\" " , "" ) # Handle projects with space
557557 assert File .exists (apk_path ), "Apk file does not exist at " + apk_path
558558
559- assert "Webpack compilation complete" in output
560- assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "bundle.js" ))
561- assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "package.json" ))
562- assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "starter.js" ))
563- assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "vendor.js" ))
564- assert not Folder .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_NPM_MODULES_PATH ))
559+ # Verify final package contains right modules (or verify bundle when it is used)
560+ if "--bundle" not in attributes .keys ():
561+ assert "Webpack compilation complete" not in output
562+ else :
563+ assert "Webpack compilation complete" in output
564+ assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "bundle.js" ))
565+ assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "package.json" ))
566+ assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "starter.js" ))
567+ assert File .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_APP_PATH , "vendor.js" ))
568+ assert not Folder .exists (os .path .join (app_name , TnsAsserts .PLATFORM_ANDROID_NPM_MODULES_PATH ))
565569
566570 return output
567571
@@ -649,7 +653,10 @@ def build_ios(attributes={}, assert_success=True, tns_path=None, log_trace=False
649653 assert id1 or id2 in xcode_project , "TeamID not passed to Xcode!"
650654
651655 # Verify final package contains right modules (or verify bundle when it is used)
652- assert "Webpack compilation complete" in output
656+ if "--bundle" not in attributes .keys ():
657+ assert "Webpack compilation complete" not in output
658+ else :
659+ assert "Webpack compilation complete" in output
653660
654661 return output
655662
0 commit comments