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 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 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)