def test_rename_subordinate_floor(sb, login, setup_peer_floor_and_delete_floor): old_name = f"{setup_peer_floor_and_delete_floor['name']}O" new_name = f"{setup_peer_floor_and_delete_floor['name']}N" MapPage.add_floor_by_parent_name( sb, old_name, parent_name=setup_peer_floor_and_delete_floor['name'], is_peer=False) MapPage.rename_floor_by_parent_name( sb, old_name, new_name, parent_name=setup_peer_floor_and_delete_floor['name']) MapPage.assert_alert_message(sb, '重命名成功!') MapPage.delete_floor_by_name(sb, new_name)
def test_rename_same_subordinate_floor(sb, login, setup_peer_floor_and_delete_floor): subordinate_name = f"{setup_peer_floor_and_delete_floor['name']}S" MapPage.add_floor_by_parent_name( sb, subordinate_name, parent_name=setup_peer_floor_and_delete_floor['name'], is_peer=False) MapPage.rename_floor_by_parent_name( sb, subordinate_name, 'Default', parent_name=setup_peer_floor_and_delete_floor['name']) MapPage.assert_alert_message(sb, '地图名已存在') MapPage.click_cancel_in_dialog(sb) MapPage.delete_floor_by_name(sb, subordinate_name)