diff --git a/tests/netedit/netElements/edges/create/errors.netedit b/tests/netedit/netElements/edges/create/basic/errors.netedit similarity index 100% rename from tests/netedit/netElements/edges/create/errors.netedit rename to tests/netedit/netElements/edges/create/basic/errors.netedit diff --git a/tests/netedit/netElements/edges/create/errors.neteditcheckoutput b/tests/netedit/netElements/edges/create/basic/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/netElements/edges/create/errors.neteditcheckoutput rename to tests/netedit/netElements/edges/create/basic/errors.neteditcheckoutput diff --git a/tests/netedit/netElements/edges/create/gui-settings.xml b/tests/netedit/netElements/edges/create/basic/gui-settings.xml similarity index 100% rename from tests/netedit/netElements/edges/create/gui-settings.xml rename to tests/netedit/netElements/edges/create/basic/gui-settings.xml diff --git a/tests/netedit/netElements/edges/create/guisettingsoutput.netedit b/tests/netedit/netElements/edges/create/basic/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/netElements/edges/create/guisettingsoutput.netedit rename to tests/netedit/netElements/edges/create/basic/guisettingsoutput.netedit diff --git a/tests/netedit/netElements/edges/create/log.netedit b/tests/netedit/netElements/edges/create/basic/log.netedit similarity index 100% rename from tests/netedit/netElements/edges/create/log.netedit rename to tests/netedit/netElements/edges/create/basic/log.netedit diff --git a/tests/netedit/netElements/edges/create/net.netedit b/tests/netedit/netElements/edges/create/basic/net.netedit similarity index 100% rename from tests/netedit/netElements/edges/create/net.netedit rename to tests/netedit/netElements/edges/create/basic/net.netedit diff --git a/tests/netedit/netElements/edges/create/output.netedit b/tests/netedit/netElements/edges/create/basic/output.netedit similarity index 100% rename from tests/netedit/netElements/edges/create/output.netedit rename to tests/netedit/netElements/edges/create/basic/output.netedit diff --git a/tests/netedit/netElements/edges/create/output.neteditcheckoutput b/tests/netedit/netElements/edges/create/basic/output.neteditcheckoutput similarity index 100% rename from tests/netedit/netElements/edges/create/output.neteditcheckoutput rename to tests/netedit/netElements/edges/create/basic/output.neteditcheckoutput diff --git a/tests/netedit/netElements/edges/create/sumo.sumocfg b/tests/netedit/netElements/edges/create/basic/sumo.sumocfg similarity index 100% rename from tests/netedit/netElements/edges/create/sumo.sumocfg rename to tests/netedit/netElements/edges/create/basic/sumo.sumocfg diff --git a/tests/netedit/netElements/edges/create/test.py b/tests/netedit/netElements/edges/create/basic/test.py old mode 100755 new mode 100644 similarity index 100% rename from tests/netedit/netElements/edges/create/test.py rename to tests/netedit/netElements/edges/create/basic/test.py diff --git a/tests/netedit/netElements/edges/create/split_multiple/errors.netedit b/tests/netedit/netElements/edges/create/split_multiple/errors.netedit new file mode 100644 index 000000000000..104474a5a04b --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/errors.netedit @@ -0,0 +1,113 @@ +Debug: Selected item 'DEFAULT_PEDTYPE' in DemandElementSelector +Debug: net has to be saved +Debug: Current saving Status: net unsaved, additionals saved, demand elements saved, data sets saved +Debug: Key F5 (Compute) pressed +Debug: Enabled auto opposite edge throught alt + 5 +Debug: Adding junction 'gneJ0' into net +Debug: net has to be saved +Debug: Current saving Status: net unsaved, additionals saved, demand elements saved, data sets saved +Debug: Adding junction 'gneJ1' into net +Debug: Adding edge 'gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Adding edge '-gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Adding junction 'gneJ2' into net +Debug: Adding edge '-gneE0.40' from net +Debug: Setting new attribute to 'gneJ2' into edge '-gneE0' +Debug: Setting new attribute shapeEnd '' into edge '-gneE0' +Debug: Adding connection '-gneE0_0->-gneE0.40_0' into edge '-gneE0' +Debug: Created connection 'from-gneE0_0to-gneE0.40_0' in retrieveGNEConnection() +Debug: Adding edge 'gneE0.39' from net +Debug: Setting new attribute to 'gneJ2' into edge 'gneE0' +Debug: Setting new attribute shapeEnd '' into edge 'gneE0' +Debug: Adding connection 'gneE0_0->gneE0.39_0' into edge 'gneE0' +Debug: Created connection 'fromgneE0_0togneE0.39_0' in retrieveGNEConnection() +Debug: Key F5 (Compute) pressed +Debug: Created connection 'from-gneE0.40_0togneE0_0' in retrieveGNEConnection() +Debug: Created connection 'fromgneE0.39_0to-gneE0_0' in retrieveGNEConnection() +Debug: Keys Ctrl+Z (Undo) pressed +Debug: Calling GNEUndoList::undo() +Debug: Removing connection 'gneE0_0->gneE0.39_0' from edge 'gneE0' +Debug: Deleting unreferenced connection 'fromgneE0_0togneE0.39_0' in removeConnection() +Debug: Setting previous attribute shapeEnd '90.00,50.00' into edge 'gneE0' +Debug: Setting previous attribute to 'gneJ1' into edge 'gneE0' +Debug: Removing edge 'gneE0.39' from net +Debug: Removing connection '-gneE0_0->-gneE0.40_0' from edge '-gneE0' +Debug: Deleting unreferenced connection 'from-gneE0_0to-gneE0.40_0' in removeConnection() +Debug: Setting previous attribute shapeEnd '10.00,50.00' into edge '-gneE0' +Debug: Setting previous attribute to 'gneJ0' into edge '-gneE0' +Debug: Removing edge '-gneE0.40' from net +Debug: Removing junction 'gneJ2' from net +Debug: Keys Ctrl+Z (Undo) pressed +Debug: Calling GNEUndoList::undo() +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Removing edge '-gneE0' from net +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Removing edge 'gneE0' from net +Debug: Removing junction 'gneJ1' from net +Debug: Removing junction 'gneJ0' from net +Debug: Keys Ctrl+Y (Redo) pressed +Debug: Calling GNEUndoList::redo() +Debug: Adding junction 'gneJ0' into net +Debug: Adding junction 'gneJ1' into net +Debug: Adding edge 'gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Adding edge '-gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Keys Ctrl+Y (Redo) pressed +Debug: Calling GNEUndoList::redo() +Debug: Adding junction 'gneJ2' into net +Debug: Adding edge '-gneE0.40' from net +Debug: Setting new attribute to 'gneJ2' into edge '-gneE0' +Debug: Setting new attribute shapeEnd '' into edge '-gneE0' +Debug: Adding connection '-gneE0_0->-gneE0.40_0' into edge '-gneE0' +Debug: Created connection 'from-gneE0_0to-gneE0.40_0' in retrieveGNEConnection() +Debug: Adding edge 'gneE0.39' from net +Debug: Setting new attribute to 'gneJ2' into edge 'gneE0' +Debug: Setting new attribute shapeEnd '' into edge 'gneE0' +Debug: Adding connection 'gneE0_0->gneE0.39_0' into edge 'gneE0' +Debug: Created connection 'fromgneE0_0togneE0.39_0' in retrieveGNEConnection() +Debug: Key F5 (Compute) pressed +Debug: Deleting unreferenced edge '-gneE0' in AttributeCarriers destructor +Debug: Deleting unreferenced lane '-gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'from-gneE0_0to-gneE0.40_0' in GNEEdge destructor +Debug: Deleting unreferenced edge '-gneE0.40' in AttributeCarriers destructor +Debug: Deleting unreferenced lane '-gneE0.40_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'from-gneE0.40_0togneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced edge 'gneE0' in AttributeCarriers destructor +Debug: Deleting unreferenced lane 'gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'fromgneE0_0togneE0.39_0' in GNEEdge destructor +Debug: Deleting unreferenced edge 'gneE0.39' in AttributeCarriers destructor +Debug: Deleting unreferenced lane 'gneE0.39_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'fromgneE0.39_0to-gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced junction 'gneJ0' in AttributeCarriers destructor +Debug: Deleting unreferenced junction 'gneJ1' in AttributeCarriers destructor +Debug: Deleting unreferenced junction 'gneJ2' in AttributeCarriers destructor +Debug: Deleting unreferenced vType 'DEFAULT_BIKETYPE' in AttributeCarriers destructor +Debug: Deleting unreferenced vType 'DEFAULT_VEHTYPE' in AttributeCarriers destructor +Debug: Deleting unreferenced pType 'DEFAULT_PEDTYPE' in AttributeCarriers destructor +Debug: Deleting net builder in GNENet destructor diff --git a/tests/netedit/netElements/edges/create/split_multiple/errors.neteditcheckoutput b/tests/netedit/netElements/edges/create/split_multiple/errors.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/netElements/edges/create/split_multiple/gui-settings.xml b/tests/netedit/netElements/edges/create/split_multiple/gui-settings.xml new file mode 100644 index 000000000000..a65546686a85 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/gui-settings.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/netedit/netElements/edges/create/split_multiple/guisettingsoutput.netedit b/tests/netedit/netElements/edges/create/split_multiple/guisettingsoutput.netedit new file mode 100644 index 000000000000..788385b4a48e --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/guisettingsoutput.netedit @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/netElements/edges/create/split_multiple/log.netedit b/tests/netedit/netElements/edges/create/split_multiple/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/netElements/edges/create/split_multiple/net.netedit b/tests/netedit/netElements/edges/create/split_multiple/net.netedit new file mode 100644 index 000000000000..30876edfa975 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/net.netedit @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/netElements/edges/create/split_multiple/output.netedit b/tests/netedit/netElements/edges/create/split_multiple/output.netedit new file mode 100644 index 000000000000..c0f6e56c173f --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/output.netedit @@ -0,0 +1,9 @@ +TestFunctions: Netedit opened successfully +Finding reference +TestFunctions: 'reference.png' found. Position: 304 - 168 +TestFunctions: Clicked over position 417 - 407 +TestFunctions: Clicked over position 841 - 409 +TestFunctions: Clicked with Shift key pressed over position 629 - 398 +TestFunctions: Clicked over position 304 - 168 +TestFunctions: Clicked over position 304 - 168 +TestFunctions: Netedit closed successfully diff --git a/tests/netedit/netElements/edges/create/split_multiple/output.neteditcheckoutput b/tests/netedit/netElements/edges/create/split_multiple/output.neteditcheckoutput new file mode 100644 index 000000000000..02ab009c0e02 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/output.neteditcheckoutput @@ -0,0 +1 @@ +Loading configuration ... done. diff --git a/tests/netedit/netElements/edges/create/split_multiple/sumo.sumocfg b/tests/netedit/netElements/edges/create/split_multiple/sumo.sumocfg new file mode 100644 index 000000000000..0ee2afbc326a --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/sumo.sumocfg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/netedit/netElements/edges/create/split_multiple/test.py b/tests/netedit/netElements/edges/create/split_multiple/test.py new file mode 100644 index 000000000000..1d015719cfbd --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_multiple/test.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +# Copyright (C) 2009-2020 German Aerospace Center (DLR) and others. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/ +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the Eclipse +# Public License 2.0 are satisfied: GNU General Public License, version 2 +# or later which is available at +# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + +# @file test.py +# @author Pablo Alvarez Lopez +# @date 2016-11-25 + +# import common functions for netedit tests +import os +import sys + +testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests') +neteditTestRoot = os.path.join( + os.environ.get('TEXTTEST_HOME', testRoot), 'netedit') +sys.path.append(neteditTestRoot) +import neteditTestFunctions as netedit # noqa + +# Open netedit +neteditProcess, referencePosition = netedit.setupAndStart(neteditTestRoot, ['--new']) + +# rebuild network +netedit.rebuildNetwork() + +# Change to create mode +netedit.createEdgeMode() + +# select two-way mode +netedit.changeEditMode('5') + +# Create two nodes +netedit.leftClick(referencePosition, 113, 239) +netedit.leftClick(referencePosition, 537, 241) + +# split both edge +netedit.leftClickShift(referencePosition, 325, 230) + +# rebuild network +netedit.rebuildNetwork() + +# Check undo and redo +netedit.undo(referencePosition, 2) +netedit.redo(referencePosition, 2) + +# rebuild network +netedit.rebuildNetwork() + +# save network +netedit.saveNetwork(referencePosition) + +# quit netedit +netedit.quit(neteditProcess) diff --git a/tests/netedit/netElements/edges/create/split_single/errors.netedit b/tests/netedit/netElements/edges/create/split_single/errors.netedit new file mode 100644 index 000000000000..d5ff79368be6 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/errors.netedit @@ -0,0 +1,97 @@ +Debug: Selected item 'DEFAULT_PEDTYPE' in DemandElementSelector +Debug: net has to be saved +Debug: Current saving Status: net unsaved, additionals saved, demand elements saved, data sets saved +Debug: Key F5 (Compute) pressed +Debug: Enabled auto opposite edge throught alt + 5 +Debug: Adding junction 'gneJ0' into net +Debug: net has to be saved +Debug: Current saving Status: net unsaved, additionals saved, demand elements saved, data sets saved +Debug: Adding junction 'gneJ1' into net +Debug: Adding edge 'gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Adding edge '-gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Adding junction 'gneJ2' into net +Debug: Adding edge '-gneE0.40' from net +Debug: Setting new attribute to 'gneJ2' into edge '-gneE0' +Debug: Setting new attribute shapeEnd '' into edge '-gneE0' +Debug: Adding connection '-gneE0_0->-gneE0.40_0' into edge '-gneE0' +Debug: Created connection 'from-gneE0_0to-gneE0.40_0' in retrieveGNEConnection() +Debug: Key F5 (Compute) pressed +Debug: Created connection 'from-gneE0.40_0togneE0_0' in retrieveGNEConnection() +Debug: Created connection 'fromgneE0_0to-gneE0_0' in retrieveGNEConnection() +Debug: Keys Ctrl+Z (Undo) pressed +Debug: Calling GNEUndoList::undo() +Debug: Removing connection '-gneE0_0->-gneE0.40_0' from edge '-gneE0' +Debug: Deleting unreferenced connection 'from-gneE0_0to-gneE0.40_0' in removeConnection() +Debug: Setting previous attribute shapeEnd '10.00,50.00' into edge '-gneE0' +Debug: Setting previous attribute to 'gneJ0' into edge '-gneE0' +Debug: Removing edge '-gneE0.40' from net +Debug: Removing junction 'gneJ2' from net +Debug: Keys Ctrl+Z (Undo) pressed +Debug: Calling GNEUndoList::undo() +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Deleting unreferenced connection 'fromgneE0_0to-gneE0_0' in clearGNEConnections() +Debug: Removing edge '-gneE0' from net +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting previous attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Removing edge 'gneE0' from net +Debug: Removing junction 'gneJ1' from net +Debug: Removing junction 'gneJ0' from net +Debug: Keys Ctrl+Y (Redo) pressed +Debug: Calling GNEUndoList::redo() +Debug: Adding junction 'gneJ0' into net +Debug: Adding junction 'gneJ1' into net +Debug: Adding edge 'gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Adding edge '-gneE0' from net +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge 'gneE0' +Debug: invalidating (removing) connections of edge 'gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ1' +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into edge '-gneE0' +Debug: invalidating (removing) connections of edge '-gneE0' due it were guessed +Debug: Setting new attribute modificationStatusNotForPrinting 'guessed' into junction 'gneJ0' +Debug: Keys Ctrl+Y (Redo) pressed +Debug: Calling GNEUndoList::redo() +Debug: Adding junction 'gneJ2' into net +Debug: Adding edge '-gneE0.40' from net +Debug: Setting new attribute to 'gneJ2' into edge '-gneE0' +Debug: Setting new attribute shapeEnd '' into edge '-gneE0' +Debug: Adding connection '-gneE0_0->-gneE0.40_0' into edge '-gneE0' +Debug: Created connection 'from-gneE0_0to-gneE0.40_0' in retrieveGNEConnection() +Debug: Key F5 (Compute) pressed +Debug: Created connection 'fromgneE0_0to-gneE0_0' in retrieveGNEConnection() +Debug: Deleting unreferenced edge '-gneE0' in AttributeCarriers destructor +Debug: Deleting unreferenced lane '-gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'from-gneE0_0to-gneE0.40_0' in GNEEdge destructor +Debug: Deleting unreferenced edge '-gneE0.40' in AttributeCarriers destructor +Debug: Deleting unreferenced lane '-gneE0.40_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'from-gneE0.40_0togneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced edge 'gneE0' in AttributeCarriers destructor +Debug: Deleting unreferenced lane 'gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced connection 'fromgneE0_0to-gneE0_0' in GNEEdge destructor +Debug: Deleting unreferenced junction 'gneJ0' in AttributeCarriers destructor +Debug: Deleting unreferenced junction 'gneJ1' in AttributeCarriers destructor +Debug: Deleting unreferenced junction 'gneJ2' in AttributeCarriers destructor +Debug: Deleting unreferenced vType 'DEFAULT_BIKETYPE' in AttributeCarriers destructor +Debug: Deleting unreferenced vType 'DEFAULT_VEHTYPE' in AttributeCarriers destructor +Debug: Deleting unreferenced pType 'DEFAULT_PEDTYPE' in AttributeCarriers destructor +Debug: Deleting net builder in GNENet destructor diff --git a/tests/netedit/netElements/edges/create/split_single/errors.neteditcheckoutput b/tests/netedit/netElements/edges/create/split_single/errors.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/netElements/edges/create/split_single/gui-settings.xml b/tests/netedit/netElements/edges/create/split_single/gui-settings.xml new file mode 100644 index 000000000000..a65546686a85 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/gui-settings.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/netedit/netElements/edges/create/split_single/guisettingsoutput.netedit b/tests/netedit/netElements/edges/create/split_single/guisettingsoutput.netedit new file mode 100644 index 000000000000..788385b4a48e --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/guisettingsoutput.netedit @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/netElements/edges/create/split_single/log.netedit b/tests/netedit/netElements/edges/create/split_single/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/netElements/edges/create/split_single/net.netedit b/tests/netedit/netElements/edges/create/split_single/net.netedit new file mode 100644 index 000000000000..471adfe46cf4 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/net.netedit @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/netElements/edges/create/split_single/output.netedit b/tests/netedit/netElements/edges/create/split_single/output.netedit new file mode 100644 index 000000000000..ff3065395595 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/output.netedit @@ -0,0 +1,9 @@ +TestFunctions: Netedit opened successfully +Finding reference +TestFunctions: 'reference.png' found. Position: 304 - 168 +TestFunctions: Clicked over position 417 - 407 +TestFunctions: Clicked over position 841 - 409 +TestFunctions: Clicked with alt and shift key pressed over position 629 - 398 +TestFunctions: Clicked over position 304 - 168 +TestFunctions: Clicked over position 304 - 168 +TestFunctions: Netedit closed successfully diff --git a/tests/netedit/netElements/edges/create/split_single/output.neteditcheckoutput b/tests/netedit/netElements/edges/create/split_single/output.neteditcheckoutput new file mode 100644 index 000000000000..02ab009c0e02 --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/output.neteditcheckoutput @@ -0,0 +1 @@ +Loading configuration ... done. diff --git a/tests/netedit/netElements/edges/create/split_single/sumo.sumocfg b/tests/netedit/netElements/edges/create/split_single/sumo.sumocfg new file mode 100644 index 000000000000..0ee2afbc326a --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/sumo.sumocfg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/netedit/netElements/edges/create/split_single/test.py b/tests/netedit/netElements/edges/create/split_single/test.py new file mode 100644 index 000000000000..4d54ef40ef9e --- /dev/null +++ b/tests/netedit/netElements/edges/create/split_single/test.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo +# Copyright (C) 2009-2020 German Aerospace Center (DLR) and others. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/ +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the Eclipse +# Public License 2.0 are satisfied: GNU General Public License, version 2 +# or later which is available at +# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + +# @file test.py +# @author Pablo Alvarez Lopez +# @date 2016-11-25 + +# import common functions for netedit tests +import os +import sys + +testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests') +neteditTestRoot = os.path.join( + os.environ.get('TEXTTEST_HOME', testRoot), 'netedit') +sys.path.append(neteditTestRoot) +import neteditTestFunctions as netedit # noqa + +# Open netedit +neteditProcess, referencePosition = netedit.setupAndStart(neteditTestRoot, ['--new']) + +# rebuild network +netedit.rebuildNetwork() + +# Change to create mode +netedit.createEdgeMode() + +# select two-way mode +netedit.changeEditMode('5') + +# Create two nodes +netedit.leftClick(referencePosition, 113, 239) +netedit.leftClick(referencePosition, 537, 241) + +# split single edge +netedit.leftClickAltShift(referencePosition, 325, 230) + +# rebuild network +netedit.rebuildNetwork() + +# Check undo and redo +netedit.undo(referencePosition, 2) +netedit.redo(referencePosition, 2) + +# rebuild network +netedit.rebuildNetwork() + +# save network +netedit.saveNetwork(referencePosition) + +# quit netedit +netedit.quit(neteditProcess) diff --git a/tests/netedit/netElements/edges/create/testsuite.netedit b/tests/netedit/netElements/edges/create/testsuite.netedit new file mode 100644 index 000000000000..a2c5cdfcee03 --- /dev/null +++ b/tests/netedit/netElements/edges/create/testsuite.netedit @@ -0,0 +1,5 @@ +basic + +split_single + +split_multiple \ No newline at end of file diff --git a/tests/netedit/netElements/edges/create/testsuite.neteditcheckoutput b/tests/netedit/netElements/edges/create/testsuite.neteditcheckoutput new file mode 100644 index 000000000000..a2c5cdfcee03 --- /dev/null +++ b/tests/netedit/netElements/edges/create/testsuite.neteditcheckoutput @@ -0,0 +1,5 @@ +basic + +split_single + +split_multiple \ No newline at end of file diff --git a/tests/netedit/neteditTestFunctions.py b/tests/netedit/neteditTestFunctions.py index 582a1aa691ae..43fdd9b5d020 100644 --- a/tests/netedit/neteditTestFunctions.py +++ b/tests/netedit/neteditTestFunctions.py @@ -214,7 +214,7 @@ def leftClickControl(referencePosition, positionx, positiony): """ @brief do left click over a position relative to referencePosition (pink square) while control key is pressed """ - # Leave Shift key pressed + # Leave Control key pressed pyautogui.keyDown('ctrl') # wait before every operation time.sleep(DELAY_MOUSE) @@ -228,12 +228,40 @@ def leftClickControl(referencePosition, positionx, positiony): pyautogui.click(button='left') # show debug print("TestFunctions: Clicked with Control key pressed over position", clickedPosition[0], '-', clickedPosition[1]) - # Release Shift key + # Release Control key pyautogui.keyUp('ctrl') # wait after key up time.sleep(DELAY_KEY) +def leftClickAltShift(referencePosition, positionx, positiony): + """ + @brief do left click over a position relative to referencePosition (pink square) while alt key is pressed + """ + # Leave alt key pressed + pyautogui.keyDown('alt') + # Leave shift key pressed + pyautogui.keyDown('shift') + # wait before every operation + time.sleep(DELAY_MOUSE) + # obtain clicked position + clickedPosition = [referencePosition[0] + positionx, referencePosition[1] + positiony] + # move mouse to position + pyautogui.moveTo(clickedPosition) + # wait + time.sleep(DELAY_MOVE) + # click over position + pyautogui.click(button='left') + # show debug + print("TestFunctions: Clicked with alt and shift key pressed over position", clickedPosition[0], '-', clickedPosition[1]) + # Release alt key + pyautogui.keyUp('alt') + # Release shift key + pyautogui.keyUp('shift') + # wait after key up + time.sleep(DELAY_KEY) + + def dragDrop(referencePosition, x1, y1, x2, y2): """ @brief drag and drop from position 1 to position 2