|
|
|
@@ -212,6 +212,7 @@ void testModeActionsControlEditingAvailability() |
|
|
|
QAction *offline_action = requiredChild<QAction>(window, "offlineModeAction"); |
|
|
|
QAction *online_action = requiredChild<QAction>(window, "onlineModeAction"); |
|
|
|
QAction *add_button_action = requiredChild<QAction>(window, "addButtonAction"); |
|
|
|
QAction *add_indicator_action = requiredChild<QAction>(window, "addIndicatorAction"); |
|
|
|
QAction *delete_control_action = requiredChild<QAction>(window, "deleteControlAction"); |
|
|
|
QAction *add_normally_open_action = requiredChild<QAction>( |
|
|
|
window, "addNormallyOpenAction"); |
|
|
|
@@ -269,6 +270,14 @@ void testModeActionsControlEditingAvailability() |
|
|
|
require(editor_service.findPage(page_id)->controls.empty(), |
|
|
|
"deleting a selected control must update the HMI page model"); |
|
|
|
|
|
|
|
add_indicator_action->trigger(); |
|
|
|
HmiControl runtime_indicator = *editor_service.findControl(page_id, "indicator-1"); |
|
|
|
runtime_indicator.binding = RegisterAddress{RegisterArea::M, 3}; |
|
|
|
require(editor_service.updateControl( |
|
|
|
page_id, runtime_indicator.id, runtime_indicator).succeeded, |
|
|
|
"a configured HMI control must be available for the runtime projection"); |
|
|
|
hmi_editor->reloadPage(); |
|
|
|
|
|
|
|
add_normally_open_action->trigger(); |
|
|
|
parallel_insert_action->trigger(); |
|
|
|
add_normal_coil_action->trigger(); |
|
|
|
@@ -326,6 +335,10 @@ void testModeActionsControlEditingAvailability() |
|
|
|
require(runtime_tab->isVisible() && runtime_hmi->isVisible() |
|
|
|
&& runtime_logic->isVisible() && free_monitor->isVisible(), |
|
|
|
"offline running must show HMI, ladder trace and free monitor together"); |
|
|
|
auto *runtime_hmi_view = qobject_cast<HmiEditorWidget *>(runtime_hmi); |
|
|
|
require(runtime_hmi_view != nullptr |
|
|
|
&& runtime_hmi_view->scene()->items().size() == 2, |
|
|
|
"offline runtime HMI must project the configured page control"); |
|
|
|
QLineEdit *monitor_address = requiredChild<QLineEdit>(window, "addressEdit"); |
|
|
|
QPushButton *monitor_add = requiredChild<QPushButton>(window, "addButton"); |
|
|
|
QTableWidget *monitor_table = requiredChild<QTableWidget>(window, "monitorTable"); |
|
|
|
|