def test_env_delete_button_sure(self): env = SysEnvironmentPage(self.driver) self.url = '/managecenter/system/environment' env.open(self.url) env.login_action('admin', 'admin') time.sleep(3) env.new_environment('test_delete_successful', 'test_delete_successful', '1', '1', 'test_delete_successful') time.sleep(3) env.input_variable_name('test_delete_successful') time.sleep(3) env.checkbox_one() time.sleep(3) env.butto_delect_click() time.sleep(3) env.delete_sure_button() time.sleep(3) env.input_variable_name('env_delete_button_sure') try: self.assertEqual(env.show_no_content_error(), '暂无内容') log().info('Judge success, and the result is:' + env.show_no_content_error()) except Exception as e: log().exception('Failing judgment, the result is:') log().exception(e) insert_img(self.driver, 'test_delete_button_sure.jpg')
def test_env_editor_page_save(self): env = SysEnvironmentPage(self.driver) self.url = '/managecenter/system/environment' env.open(self.url) env.login_action('admin', 'admin') time.sleep(3) env.new_environment('test_editor_successful', 'test_editor_successful', '1', '1', 'test_editor_successful') time.sleep(3) env.input_variable_name('test_editor_successful') time.sleep(3) env.checkbox_one() time.sleep(3) env.button_editor_click() time.sleep(3) env.editor_environment('change_test_editor_successful', '2', '2', 'change_test_editor_successful') time.sleep(3) try: self.assertEqual(env.test_newpage_editor_save_error(), 'change_test_editor_successful') log().info('Judge success, and the result is:' + env.test_newpage_editor_save_error()) except Exception as e: log().exception('Failing judgment, the result is:') log().exception(e) insert_img(self.driver, 'env_editor_page_save.jpg')
def test_env_variable_query(self): env = SysEnvironmentPage(self.driver) self.url = '/managecenter/system/environment' env.open(self.url) env.login_action('admin', 'admin') time.sleep(3) env.input_variable_name('DB_') time.sleep(3) try: self.assertEqual(env.env_new_page_save_error(), 'DB_VERSION') log().info('Judge success, and the result is:' + env.env_new_page_save_error()) except Exception as e: log().exception('Failing judgment, the result is:') log().exception(e) insert_img(self.driver, 'env_variable_query.jpg')