def test_invalid_peer_floor(sb, login, setup_peer_floor_and_delete_floor, name): MenuBar.click_menu_item_by_text(sb, '配置', '地图管理') MapPage.add_floor_by_parent_name( sb, name, parent_name=setup_peer_floor_and_delete_floor['name'], is_peer=False) MapPage.assert_element_text(sb, '.el-form-item__error', '请输入分组名称') MapPage.click_cancel_in_dialog(sb)
def test_add_same_subordinate_floor( sb, login, setup_peer_floor_and_delete_floor, setup_subordinate_floor_name_and_delete_floor): MapPage.add_floor_by_parent_name( sb, setup_subordinate_floor_name_and_delete_floor['name'], parent_name=setup_peer_floor_and_delete_floor['name'], is_peer=False) MapPage.add_floor_by_parent_name( sb, setup_subordinate_floor_name_and_delete_floor['name'], parent_name=setup_peer_floor_and_delete_floor['name'], is_peer=False) MapPage.assert_alert_message(sb, '地图名已存在') MapPage.click_cancel_in_dialog(sb)
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)
def test_add_same_peer_floor(sb, login, setup_peer_floor_and_delete_floor): MapPage.add_floor_by_root_floor_name( sb, setup_peer_floor_and_delete_floor['name']) MapPage.assert_alert_message(sb, '地图名已存在') MapPage.click_cancel_in_dialog(sb)