Skip to content

Commit

Permalink
Updated netedit tests. Refs #3045
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Sep 11, 2024
1 parent e7352b0 commit ac04e00
Show file tree
Hide file tree
Showing 16,619 changed files with 1,866 additions and 940,357 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-09-11 10:38:49 by Eclipse SUMO netedit Version v1_20_0+1948-ce62a4c7b19
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file 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
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<!-- Vehicles, persons and containers (sorted by depart) -->
<container id="c_0" depart="0.00">
<transport from="Edge0" busStop="busStopA" lines="ANY"/>
<tranship busStop="busStopB" duration="7.50"/>
</container>
</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
# Copyright (C) 2009-2024 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 2019-07-16

# 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)

# go to demand mode
netedit.supermodeDemand()

# go to container mode
netedit.containerMode()

# change container plan
netedit.changeContainerPlan("transport", False)

# create route using one edge
netedit.leftClick(referencePosition, netedit.positions.elements.edge0)
netedit.leftClick(referencePosition, netedit.positions.elements.demands.busStop)

# press enter to create route
netedit.typeEnter()

# go to tranship.busStop.busStop mode
netedit.containerPlanMode()

# go to tranship.busStop.busStop mode
netedit.changeContainerPlanMode("tranship")

# create tranship.busStop.busStop
netedit.leftClick(referencePosition, netedit.positions.elements.demands.busStopB)

# set invalid container number
netedit.changeDefaultValue(netedit.attrs.tranship.busStop.busStop.create.duration, "dummy")

# press enter to create route
netedit.typeEnter()

# set invalid container number
netedit.changeDefaultValue(netedit.attrs.tranship.busStop.busStop.create.duration, "-12")

# press enter to create route
netedit.typeEnter()

# set invalid container number
netedit.changeDefaultValue(netedit.attrs.tranship.busStop.busStop.create.duration, "7.5")

# press enter to create route
netedit.typeEnter()

# Check undo redo
netedit.checkUndoRedo(referencePosition)

# save Netedit config
netedit.saveNeteditConfig(referencePosition)

# quit netedit
netedit.quit(neteditProcess)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
TestFunctions: Netedit opened successfully
Finding reference
TestFunctions: 'reference.png' found. Position: 304 - 168
transport
TestFunctions: Clicked over position 685 - 611
TestFunctions: Clicked over position 600 - 179
tranship
TestFunctions: Clicked over position 644 - 368
dummy
-12
7.5
TestFunctions: Clicked over position 304 - 168
TestFunctions: Clicked over position 304 - 168
TestFunctions: Netedit closed successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-09-11 10:42:21 by Eclipse SUMO netedit Version v1_20_0+1948-ce62a4c7b19
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file 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
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<!-- Vehicles, persons and containers (sorted by depart) -->
<container id="c_0" depart="0.00">
<transport from="Edge0" to="Edge0" lines="ANY"/>
<tranship to="Edge2" duration="7.50"/>
</container>
</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
# Copyright (C) 2009-2024 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 2019-07-16

# 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)

# go to demand mode
netedit.supermodeDemand()

# go to container mode
netedit.containerMode()

# change container plan
netedit.changeContainerPlan("transport", False)

# create route using one edge
netedit.leftClick(referencePosition, netedit.positions.elements.edge0)

# press enter to create route
netedit.typeEnter()

# go to tranship.edge.edge mode
netedit.containerPlanMode()

# go to tranship.edge.edge mode
netedit.changeContainerPlanMode("tranship")

# create tranship.edge.edge
netedit.leftClick(referencePosition, netedit.positions.elements.edge2)

# press enter to create route
netedit.typeEnter()

# go to inspect mode
netedit.inspectMode()

# now inspect plan top
netedit.leftClick(referencePosition, netedit.positions.elements.demands.planEdge2Ped)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspect.duration, "dummy", False)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspect.duration, "-12", False)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspect.duration, "7.5", False)
# Check undo redo
netedit.checkUndoRedo(referencePosition)

# save Netedit config
netedit.saveNeteditConfig(referencePosition)

# quit netedit
netedit.quit(neteditProcess)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
TestFunctions: Netedit opened successfully
Finding reference
TestFunctions: 'reference.png' found. Position: 304 - 168
transport
TestFunctions: Clicked over position 685 - 611
tranship
TestFunctions: Clicked over position 798 - 194
TestFunctions: Clicked over position 904 - 172
dummy
-12
7.5
TestFunctions: Clicked over position 304 - 168
TestFunctions: Clicked over position 304 - 168
TestFunctions: Netedit closed successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2024-09-11 10:54:11 by Eclipse SUMO netedit Version v1_20_0+1948-ce62a4c7b19
This data file and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
This file 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
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<!-- VTypes -->
<vType id="customType"/>
<vType id="type1"/>
<vType id="type2"/>
<!-- Vehicles, persons and containers (sorted by depart) -->
<container id="c_0" depart="0.00">
<transport from="Edge0" to="Edge1"/>
<tranship to="Edge2" departPos="37.00" speed="7.50" duration="11.00"/>
</container>
<container id="c_1" depart="0.00">
<transport from="EdgeBike0" to="EdgeCenter0"/>
<tranship to="Edge5" departPos="11.00" speed="7.50" duration="12.70"/>
</container>
</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on 2022-10-11 08:43:44 by Eclipse SUMO netedit Version v1_14_1+1563-f3c96901f69
-->

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<!-- VTypes -->
<vType id="type1"/>
<vType id="type2"/>
<vType id="customType"/>
<!-- Vehicles, persons and containers (sorted by depart) -->
<container id="c_0" depart="0.00">
<transport from="Edge0" to="Edge1"/>
<tranship to="Edge2" arrivalPos="37.00" duration="11"/>
</container>

<container id="c_1" depart="0.00">
<transport from="EdgeBike0" to="EdgeCenter0"/>
<tranship to="Edge5" arrivalPos="11.00" duration="12.7"/>
</container>
</routes>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TestFunctions: Netedit opened successfully
Finding reference
TestFunctions: 'reference.png' found. Position: 304 - 168
TestFunctions: Clicked over position 904 - 172
dummy
-12
7.5
TestFunctions: Clicked over position 304 - 168
TestFunctions: Clicked over position 304 - 168
TestFunctions: Netedit closed successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
# Copyright (C) 2009-2024 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 2019-07-16

# 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)

# go to demand mode
netedit.supermodeDemand()

# select two-way mode
netedit.changeEditMode(netedit.attrs.modes.demand.showContainerPlans)

# go to select mode
netedit.selectMode()

# select all using invert
netedit.selectionInvert()

# go to inspect mode
netedit.inspectMode()

# now inspect plan top
netedit.leftClick(referencePosition, netedit.positions.elements.demands.planEdge2Ped)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspectSelection.speed, "dummy", False)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspectSelection.speed, "-12", False)

# change depart with an invalid value
netedit.modifyAttribute(netedit.attrs.tranship.edge.edge.inspectSelection.speed, "7.5", False)

# Check undo redo
netedit.checkUndoRedo(referencePosition)

# save Netedit config
netedit.saveNeteditConfig(referencePosition)

# quit netedit
netedit.quit(neteditProcess)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
speed

duration
Loading

0 comments on commit ac04e00

Please sign in to comment.