From c8e3ea57ef8b10bc028e470fd8bfe6cb074a8e74 Mon Sep 17 00:00:00 2001 From: Ziyu Zhu Date: Mon, 15 Jun 2026 12:22:23 -0500 Subject: [PATCH] test: relax headless GUI layout thresholds --- .../gui/labkit/launcher/LauncherGuiTest.m | 12 ++++++++---- .../labkit/ui/GuiLayoutUiDeclarativeAppTest.m | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/tests/cases/gui/labkit/launcher/LauncherGuiTest.m b/tests/cases/gui/labkit/launcher/LauncherGuiTest.m index cb66287..8935587 100644 --- a/tests/cases/gui/labkit/launcher/LauncherGuiTest.m +++ b/tests/cases/gui/labkit/launcher/LauncherGuiTest.m @@ -51,10 +51,14 @@ function assertLauncherTextAreasHaveRoom(fig) pause(0.5); drawnow; ui = getappdata(fig, 'labkitUiRegistry'); - assert(ui.controls.selectedDetails.textArea.Position(4) >= 105, ... - 'Selected App details should have enough default height for multiple lines.'); - assert(ui.controls.statusLine.textArea.Position(4) >= 80, ... - 'Launcher action status should have enough default height for long messages.'); + selectedHeight = ui.controls.selectedDetails.textArea.Position(4); + statusHeight = ui.controls.statusLine.textArea.Position(4); + assert(selectedHeight >= 90, ... + 'Selected App details should have enough default height for multiple lines; found %.0f px.', ... + selectedHeight); + assert(statusHeight >= 75, ... + 'Launcher action status should have enough default height for long messages; found %.0f px.', ... + statusHeight); end function assertNoPanelTitle(fig, blockedTitles) diff --git a/tests/cases/gui/labkit/ui/GuiLayoutUiDeclarativeAppTest.m b/tests/cases/gui/labkit/ui/GuiLayoutUiDeclarativeAppTest.m index f411ae8..7e61caf 100644 --- a/tests/cases/gui/labkit/ui/GuiLayoutUiDeclarativeAppTest.m +++ b/tests/cases/gui/labkit/ui/GuiLayoutUiDeclarativeAppTest.m @@ -165,16 +165,22 @@ function captureEvent(~, event) function assertTextPanelsHaveDefaultRoom(ui) settleLayout(); - assert(ui.controls.notesText.textArea.Position(4) >= 105, ... - 'statusPanel controls should start with enough height for multiple lines.'); + notesHeight = ui.controls.notesText.textArea.Position(4); + assert(notesHeight >= 90, ... + 'statusPanel controls should start with enough height for multiple lines; found %.0f px.', ... + notesHeight); ui.logTab.Parent.SelectedTab = ui.logTab; settleLayout(); - assert(ui.controls.logPanel.textArea.Position(4) >= 180, ... - 'logPanel controls should start with enough height for useful log history.'); + logHeight = ui.controls.logPanel.textArea.Position(4); + assert(logHeight >= 170, ... + 'logPanel controls should start with enough height for useful log history; found %.0f px.', ... + logHeight); ui.setupTab.Parent.SelectedTab = ui.setupTab; settleLayout(); - assert(ui.controls.sourceImages.listbox.Position(4) >= 95, ... - 'pathPanel lists should start with enough height for several entries.'); + listHeight = ui.controls.sourceImages.listbox.Position(4); + assert(listHeight >= 90, ... + 'pathPanel lists should start with enough height for several entries; found %.0f px.', ... + listHeight); end function settleLayout()