def ng_serve(self, prod=False):
     NG.serve(project=self.app_name, prod=prod)
     self.chrome.open(DEFAULT_WEB_URL)
     welcome_element = self.chrome.driver.find_element_by_xpath('//h1')
     assert 'Welcome to' in welcome_element.text, 'Failed to find welcome message.'
     Log.info('Welcome page served successfully.')
     NG.kill()
    def setUpClass(cls):
        TnsTest.setUpClass()
        NG.kill()
        Folder.clean(cls.app_path)

        # Create app
        NG.new(collection=NS_SCHEMATICS, project=cls.app_name, shared=False)
        TnsAssert.created(app_name=cls.app_name, app_data=None)
    def setUpClass(cls):
        TnsTest.setUpClass()
        NG.kill()
        Folder.clean(cls.app_path)

        # Create app
        NG.new(collection=NS_SCHEMATICS, project=cls.app_name, shared=False)
        # TODO: Rollback theme=False when schematics use @nativescript/theme
        TnsAssert.created(app_name=cls.app_name, app_data=None, theme=False)
Exemple #4
0
 def ng_serve(self, prod=False):
     NG.serve(project=self.app_name, prod=prod)
     self.chrome.open(DEFAULT_WEB_URL)
     if "Angular CLI: 8.3" in NG.exec_command(command="version").output:
         element = self.chrome.driver.find_element(
             By.XPATH, '//*[contains(text(), "TestApp app is running!")]')
     else:
         element = self.chrome.driver.find_element(
             By.XPATH, '//*[contains(text(), "Welcome")]')
     assert element.is_displayed(), 'Failed to serve default NG project.'
     Log.info('Default NG web project loaded!')
     NG.kill()
 def tearDown(self):
     NG.kill()
     TnsTest.tearDown(self)
 def setUp(self):
     TnsTest.setUpClass()
     NG.kill()
Exemple #7
0
 def setUp(self):
     TnsRunTest.setUp(self)
     NG.kill()
Exemple #8
0
 def setUpClass(cls):
     TnsRunTest.setUpClass()
     NG.kill()
     NG.new(collection=None, project=cls.app_name)
     cls.chrome = Chrome()
Exemple #9
0
 def test_010_shared(self):
     NGNewTests.create_and_run(shared=True)
     NG.serve(project=self.app_name)
     NG.kill()
     NGNewTests.build_release()
     NG.serve(project=self.app_name, prod=True)
Exemple #10
0
 def setUp(self):
     TnsRunTest.setUp(self)
     NG.kill()
     Folder.clean(self.app_path)
 def setUpClass(cls):
     TnsRunTest.setUpClass()
     NG.kill()