def test_YYSC_0008(self): """个人专区进入应用介绍页添加应用""" # 确保不存在指定个人应用 app_name = "政企优惠" Preconditions.ensure_not_exists_personal_app_by_name(app_name) # 添加工作台里的应用 wbp = WorkbenchPage() wbp.click_app_store() asp = AppStorePage() asp.wait_for_page_load() # 1.点击个人专区 asp.click_personal_area() asp.wait_for_personal_area_page_load() # 进入应用介绍页 asp.page_up() asp.click_text(app_name) # 2.等待应用介绍详情页加载 asp.wait_for_app_details_page_load() time.sleep(2) # 3.点击添加 asp.click_join() time.sleep(2) asp.click_sure() time.sleep(2) asp.click_back() asp.wait_for_personal_area_page_load() # 4.添加成功,添加按钮是否变化为打开按钮 self.assertEquals(asp.get_app_button_text_by_name(app_name), "打开") asp.click_back() wbp.wait_for_workbench_page_load() # 5.工作台新增个人应用分组,是否存在指定应用图标 self.assertEquals(wbp.is_exists_app_by_name("个人应用"), True) self.assertEquals(wbp.is_exists_app_by_name(app_name), True)
def test_YYSC_0007(self): """个人专区添加应用""" # 确保不存在指定个人应用 app_name = "帮助中心" Preconditions.ensure_not_exists_personal_app_by_name(app_name) # Preconditions.ensure_not_exists_app_by_name(app_name) # 添加工作台里的应用 wbp = WorkbenchPage() wbp.click_app_store() asp = AppStorePage() asp.wait_for_page_load() # 1.点击个人专区 asp.click_personal_area() asp.wait_for_personal_area_page_load() # 2.添加指定应用 asp.add_app_by_name(app_name) time.sleep(2) # asp.click_add_app() asp.click_sure() # 3.添加成功,添加按钮是否变化为打开按钮 # self.assertEquals(asp.is_toast_exist("添加应用成功"), True) asp.wait_for_personal_area_page_load() self.assertEquals(asp.get_app_button_text_by_name(app_name), "打开") asp.click_back() wbp.wait_for_workbench_page_load() # 4.工作台新增个人应用分组,是否存在指定应用图标 # self.assertEquals(wbp.is_exists_app_by_name("个人应用"), True) self.assertEquals(wbp.is_exists_app_by_name(app_name), True)