def test_delete_existing_portrait_in_two_portrait_databases_from_current_portrait_database( sb, login, setup_portrait_with_two_portrait_databases_and_delete_portrait_databases ): PortraitPage.search_portrait_by_keyword( sb, setup_portrait_with_two_portrait_databases_and_delete_portrait_databases[ 'name']) PortraitPage.click_portrait_database_by_name( sb, setup_portrait_with_two_portrait_databases_and_delete_portrait_databases[ 'portrait_databases'][0]) PortraitPage.delete_portrait_by_name( sb, setup_portrait_with_two_portrait_databases_and_delete_portrait_databases[ 'name'], from_current_group=True) PortraitPage.assert_alert_message(sb, '删除人像成功') PortraitPage.search_portrait_by_keyword( sb, setup_portrait_with_two_portrait_databases_and_delete_portrait_databases[ 'name']) sb.is_element_visible( f'//div[@title="{setup_portrait_with_two_portrait_databases_and_delete_portrait_databases["portrait_databases"][1]}" and text()="{setup_portrait_with_two_portrait_databases_and_delete_portrait_databases["portrait_databases"][1]} (1)"]' )
def test_delete_existing_portrait_in_one_portrait_database_from_global_portrait_database( sb, login, setup_portrait_with_portrait_database_and_delete_portrait_database): PortraitPage.search_portrait_by_keyword( sb, setup_portrait_with_portrait_database_and_delete_portrait_database[ 'name']) PortraitPage.delete_portrait_by_name( sb, setup_portrait_with_portrait_database_and_delete_portrait_database[ 'name']) PortraitPage.assert_alert_message(sb, '删除人像成功') PortraitPage.search_portrait_by_keyword( sb, setup_portrait_with_portrait_database_and_delete_portrait_database[ 'name']) sb.is_element_visible('//span[text()="暂无数据"]')