コード例 #1
0
 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Tns.create_app_ng(cls.app_name)
     Tns.platform_add_android(attributes={
         "--path": cls.app_name,
         "--frameworkPath": ANDROID_PACKAGE
     })
コード例 #2
0
 def test_401_prepare_project_with_many_dependencies(self):
     """
     Test for https://github.com/NativeScript/nativescript-cli/issues/2561
     """
     Folder.cleanup(self.app_name)
     Tns.create_app_ng(app_name=self.app_name, template_version="4", update_modules=False)
     if USE_YARN == "True":
         Npm.install(package="lodash", folder=self.app_name)
         Npm.install(package="moment", folder=self.app_name)
         Npm.install(package="nativescript-cardview", folder=self.app_name)
         Npm.install(package="nativescript-sqlite", folder=self.app_name)
         Npm.install(package="nativescript-statusbar", folder=self.app_name)
         Npm.install(package="nativescript-websockets", folder=self.app_name)
         Npm.install(package="number-generator", folder=self.app_name)
         Npm.install(package="eslint", folder=self.app_name)
         Npm.install(package="eslint-plugin-compat", folder=self.app_name)
     else:
         Npm.install(package="lodash", option="--save", folder=self.app_name)
         Npm.install(package="moment", option="--save", folder=self.app_name)
         Npm.install(package="nativescript-cardview", option="--save", folder=self.app_name)
         Npm.install(package="nativescript-sqlite", option="--save", folder=self.app_name)
         Npm.install(package="nativescript-statusbar", option="--save", folder=self.app_name)
         Npm.install(package="nativescript-websockets", option="--save", folder=self.app_name)
         Npm.install(package="number-generator", option="--save", folder=self.app_name)
         Npm.install(package="eslint", option="--save", folder=self.app_name)
         Npm.install(package="eslint-plugin-compat", option="--save", folder=self.app_name)
     Tns.platform_add_android(version="4", attributes={"--path": self.app_name})
     Tns.prepare_android(attributes={"--path": self.app_name}, log_trace=True)
コード例 #3
0
    def test_310_prepare_should_flatten_scoped_dependencies(self):
        Folder.cleanup(self.app_name)
        Tns.create_app_ng(self.app_name)
        Tns.platform_add_android(attributes={"--path": self.app_name, "--frameworkPath": ANDROID_PACKAGE})
        Tns.prepare_android(attributes={"--path": self.app_name})

        # Verify scoped dependencies are flattened (verify #1783 is fixed)
        ng_path = os.path.join(self.app_name, TnsAsserts.PLATFORM_ANDROID_NPM_MODULES_PATH, '@angular', 'core')
        assert File.exists(ng_path), "Scoped dependencies are flattened, please see #1783!"
コード例 #4
0
    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Emulator.stop()
        Device.uninstall_app(app_prefix="org.nativescript.", platform=Platform.ANDROID)
        Emulator.ensure_available()
        Folder.cleanup(cls.app_name)

        # Create default NG app (to get right dependencies from package.json)
        Tns.create_app_ng(cls.app_name)
        Tns.platform_add_android(attributes={'--path': cls.app_name, '--frameworkPath': ANDROID_PACKAGE}) 
コード例 #5
0
 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Xcode.cleanup_cache()
     Tns.create_app_ng(app_name=cls.app_name, update_modules=True)
     Tns.platform_add_ios(attributes={"--path": cls.app_name, "--frameworkPath": IOS_PACKAGE})