Skip to content

Commit 9b97629

Browse files
committed
Updated running test in GNEDialog. Refs #16790
1 parent 93326b3 commit 9b97629

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/netedit/dialogs/GNEDialog.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,15 @@ GNEDialog::openDialog() {
180180
// show in the center of app
181181
show(PLACEMENT_OWNER);
182182
// continue depending on whether we are testing or not
183-
if (myApplicationWindow->getInternalTest()) {
183+
const auto internalTest = myApplicationWindow->getInternalTest();
184+
if (internalTest) {
184185
myTesting = true;
185-
// execute every modal dialog test step
186-
for (const auto& modalStep : myApplicationWindow->getInternalTest()->getCurrentStep()->getModalDialogTestSteps()) {
187-
// this will be unified
188-
if (modalStep->getEvent()) {
189-
handle(myApplicationWindow->getInternalTest(), modalStep->getSelector(), modalStep->getEvent());
190-
} else if (modalStep->getDialogArguments()) {
191-
handle(myApplicationWindow->getInternalTest(), modalStep->getSelector(), modalStep->getDialogArguments());
192-
}
186+
// execute every dialog step
187+
while (internalTest->getCurrentStep() && internalTest->getCurrentStep()->getCategory() == InternalTestStep::Category::DIALOG) {
188+
// get current step and set next step
189+
const auto testStep = internalTest->setNextStep();
190+
// handle the step
191+
handle(internalTest, testStep->getSelector(), testStep->getEvent());
193192
}
194193
} else {
195194
myTesting = false;

0 commit comments

Comments
 (0)