def test_200_platform_update_android(self): """Update platform""" # Create project with tns-android@4 Tns.platform_add_android(version="4.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"4.0.0\""]) # Update platform to 5 Tns.platform_update(platform=Platform.ANDROID, version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""])
def test_220_platform_clean_android(self): """Prepare after `platform clean` should add the same version that was before clean""" # Create project with [email protected] Tns.platform_add_android(version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""]) # Clean platform and verify platform is 5.0.0 Tns.platform_clean(platform=Platform.ANDROID, attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""])
def test_130_platform_remove_and_platform_add_android_custom_version(self): """Verify platform add supports custom versions""" # Add custom version number Tns.platform_add_android(version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""]) # Add remove Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}) # Add custom version with tag Tns.platform_add_android(version="rc", attributes={"--path": self.app_name})
def test_220_platform_clean_android(self): """Prepare after `platform clean` should add the same version that was before clean""" # Create project with [email protected] Tns.platform_add_android(version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""]) # Clean platform and verify platform is 5.0.0 Tns.platform_clean(platform=Platform.ANDROID, attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""])
def test_200_platform_update_android(self): """Update platform""" # Create project with tns-android@4 Tns.platform_add_android(version="4.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"4.0.0\""]) # Update platform to 5 Tns.platform_update(platform=Platform.ANDROID, version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""])
def test_130_platform_remove_and_platform_add_android_custom_version(self): """Verify platform add supports custom versions""" # Add custom version number Tns.platform_add_android(version="5.0.0", attributes={"--path": self.app_name}) TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""]) # Add remove Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}) # Add custom version with tag Tns.platform_add_android(version="rc", attributes={"--path": self.app_name})
def test_230_tns_update(self): """ Default `tns platform add` command""" Tns.platform_add_android(attributes={"--path": self.app_name}, version="latest") output = Tns.update(attributes={"--path": self.app_name}) if USE_YARN == "False": self.verify_update(output) modules_version = Npm.get_version("tns-core-modules") TnsAsserts.package_json_contains(self.app_name, [modules_version]) output = Tns.update(attributes={ "5.0.0": "", "--path": self.app_name }) self.verify_update(output) TnsAsserts.package_json_contains(self.app_name, ["5.0.0"]) Tns.update(attributes={"next": "", "--path": self.app_name}) self.verify_update(output) modules_version = Npm.get_version("tns-android@next") android_version = Npm.get_version("tns-core-modules@next") TnsAsserts.package_json_contains( self.app_name, [modules_version, android_version]) else: self.verify_update(output)
def test_230_tns_update(self): """ Default `tns platform add` command""" Tns.platform_add_android(attributes={"--path": self.app_name}, version="latest") output = Tns.update(attributes={"--path": self.app_name}) if USE_YARN == "False": self.verify_update(output) modules_version = Npm.get_version("tns-core-modules") TnsAsserts.package_json_contains(self.app_name, [modules_version]) output = Tns.update(attributes={"5.0.0": "", "--path": self.app_name}) self.verify_update(output) TnsAsserts.package_json_contains(self.app_name, ["5.0.0"]) Tns.update(attributes={"next": "", "--path": self.app_name}) self.verify_update(output) modules_version = Npm.get_version("tns-android@next") android_version = Npm.get_version("tns-core-modules@next") TnsAsserts.package_json_contains(self.app_name, [modules_version, android_version]) else: self.verify_update(output)