File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -180,16 +180,15 @@ GNEDialog::openDialog() {
180
180
// show in the center of app
181
181
show (PLACEMENT_OWNER);
182
182
// continue depending on whether we are testing or not
183
- if (myApplicationWindow->getInternalTest ()) {
183
+ const auto internalTest = myApplicationWindow->getInternalTest ();
184
+ if (internalTest) {
184
185
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 ());
193
192
}
194
193
} else {
195
194
myTesting = false ;
You can’t perform that action at this time.
0 commit comments