|
|
|
@@ -2031,12 +2031,26 @@ void testRuntimeMonitorWindowLifecycle() |
|
|
|
require(runtime_window->isVisible() && runtime_window->isMaximized() |
|
|
|
&& runtime_hmi->scene()->items().size() == 4, |
|
|
|
"a later runtime session must reopen and refresh the monitor window"); |
|
|
|
|
|
|
|
const Qt::WindowFlags runtime_window_flags = runtime_window->windowFlags(); |
|
|
|
require(!(runtime_window_flags & Qt::WindowMinimizeButtonHint) |
|
|
|
&& !(runtime_window_flags & Qt::WindowMaximizeButtonHint) |
|
|
|
&& !(runtime_window_flags & Qt::WindowCloseButtonHint), |
|
|
|
"runtime monitor must not expose native window control buttons"); |
|
|
|
|
|
|
|
runtime_window->close(); |
|
|
|
QApplication::processEvents(); |
|
|
|
require(mode_service.mode() == ApplicationMode::OfflineRunning, |
|
|
|
"closing the runtime monitor window must not leave offline running mode"); |
|
|
|
require(runtime_window->isVisible(), |
|
|
|
"closing the runtime monitor window must not hide the runtime surface"); |
|
|
|
|
|
|
|
requiredChild<QToolButton>(window, "exitRuntimeButton")->click(); |
|
|
|
QApplication::processEvents(); |
|
|
|
require(mode_service.mode() == ApplicationMode::Editing, |
|
|
|
"closing the runtime monitor window must request editing mode"); |
|
|
|
"the runtime monitor exit button must be the editing transition"); |
|
|
|
require(!runtime_window->isVisible(), |
|
|
|
"closing the runtime monitor window must leave no visible runtime surface"); |
|
|
|
"the runtime monitor exit button must hide the runtime surface"); |
|
|
|
} |
|
|
|
|
|
|
|
void testApplicationExitClosesRuntimeMonitorWindow() |
|
|
|
|