Adds signal testing to UI elements

Extends UI element tests to include signal emission verification.

This ensures that UI elements correctly emit signals upon user interaction,
improving the reliability and responsiveness of the UI.

Adds QSignalSpy to track signal emissions for various UI components like
buttons, checkboxes, comboboxes, items, sliders, textboxes and thermos.
This commit is contained in:
2026-02-14 14:32:17 +01:00
parent 2a7959936a
commit 89ca146e97
10 changed files with 64 additions and 4 deletions
+2
View File
@@ -15,6 +15,8 @@ TEST(UI_thermo, to_from_json)
TEST(UI_thermo, set_value)
{
UI_thermo thermo("thermo_text", Color(255, 255, 255), Color(0, 0, 0), 0, 100, 50);
QSignalSpy spy(&thermo, &UI_thermo::ui_changed);
thermo.set_value(75);
EXPECT_EQ(thermo.value(), 75);
EXPECT_EQ(spy.count(), 1);
}