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_rename_existing_portrait_database_with_invalid_name( sb, login, name, setup_portrait_database_and_delete_portrait_database): PortraitPage.rename_portrait_database_by_name( sb, setup_portrait_database_and_delete_portrait_database['name'], name) PortraitPage.assert_element_text(sb, '.tips > span', '请输入分组名称') Dialog.click_dialog_footer_button_by_text(sb, '编辑', '取消')