/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GNEInternalTest.cpp14/// @author Pablo Alvarez Lopez15/// @date Mar 202516///17// Internal test system used for testing netedit18/****************************************************************************/1920#include <netedit/GNEApplicationWindow.h>21#include <netedit/GNEViewNet.h>22#include <netedit/GNEViewParent.h>23#include <netedit/dialogs/fix/GNEFixAdditionalElementsDialog.h>24#include <netedit/dialogs/fix/GNEFixDemandElementsDialog.h>25#include <netedit/dialogs/fix/GNEFixNetworkElements.h>26#include <netedit/frames/GNETLSTable.h>2728#include "GNEInternalTest.h"2930// ===========================================================================31// member method definitions32// ===========================================================================3334GNEInternalTest::GNEInternalTest(const std::string& testFile) :35InternalTest(testFile) {36}373839GNEInternalTest::~GNEInternalTest() {}404142void43GNEInternalTest::runNeteditInternalTests(GNEApplicationWindow* applicationWindow) {44if (!myTestFinished) {45myRunning = true;46const auto viewNet = applicationWindow->getViewNet();47const auto viewParent = viewNet->getViewParent();48// process every step49while (getCurrentStep() && myRunning) {50// get current step and set next step51const auto testStep = setNextStep();52// check if we have to process it in main windows, abstract view or specific view53if (testStep->getCategory() == InternalTestStep::Category::APP) {54applicationWindow->handle(this, testStep->getSelector(), testStep->getEvent());55} else if (testStep->getCategory() == InternalTestStep::Category::VIEW) {56viewNet->handle(this, testStep->getSelector(), testStep->getEvent());57} else if (testStep->getCategory() == InternalTestStep::Category::TLS_PHASES) {58viewParent->getTLSEditorFrame()->getTLSPhases()->handle(this, testStep->getSelector(), testStep->getEvent());59} else if (testStep->getCategory() == InternalTestStep::Category::TLS_PHASETABLE) {60viewParent->getTLSEditorFrame()->getTLSPhases()->getPhaseTable()->testTable(testStep->getTLSTableTest());61} else if (testStep->getCategory() == InternalTestStep::Category::FINISH) {62myTestFinished = true;63}64// check if update view after execute step65if (testStep->updateView()) {66viewNet->handle(this, FXSEL(SEL_PAINT, 0), nullptr);67}68}69}70}7172/****************************************************************************/737475