def test_search_existing_portrait_database( sb, login, setup_portrait_database_and_delete_portrait_database): PortraitPage.search_portrait_database_by_name( sb, setup_portrait_database_and_delete_portrait_database['name']) sb.is_element_visible( f'//div[@title="{setup_portrait_database_and_delete_portrait_database["name"]}"]' )
def test_rename_existing_portrait_database(sb, login, setup_portrait_database): new_name = f'{setup_portrait_database["name"]}N' PortraitPage.rename_portrait_database_by_name( sb, setup_portrait_database['name'], new_name) PortraitPage.search_portrait_database_by_name( sb, setup_portrait_database['name']) sb.is_element_visible(f'//div[@title="{new_name}"]') PortraitPage.delete_portrait_database_by_name(sb, new_name)
def test_add_portrait_database( sb, login, portrait_type, setup_portrait_database_name_and_delete_portrait_database): PortraitPage.add_portrait_database_by_name( sb, setup_portrait_database_name_and_delete_portrait_database['name'], type=portrait_type) PortraitPage.assert_alert_message(sb, '创建下一级分组成功') PortraitPage.search_portrait_database_by_name( sb, setup_portrait_database_name_and_delete_portrait_database['name']) sb.is_element_visible( f'//div[@title="{setup_portrait_database_name_and_delete_portrait_database["name"]}"]' )
def test_search_not_existing_portrait_database(sb, login, setup_portrait_database_name): PortraitPage.search_portrait_database_by_name( sb, setup_portrait_database_name['name']) sb.is_element_visible('//span[text()="暂无数据"]')