Skip to content

Commit

Permalink
kernel.ui.swtbot.tests: Fix intermittent failing HelpMessageTest
Browse files Browse the repository at this point in the history
The info dialog has multiple labels where one contains the info message.
Use the expected value to get the label with the expected info message.

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Apr 9, 2024
1 parent 96abf59 commit d7a90a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public void testHelpMenus() {
shell.activate();
SWTBot helpShellBot = shell.bot();
assertEquals("Help", helpShellBot.canvas().getText());
assertEquals(entry.getValue(), helpShellBot.label(1).getText());
String text = helpShellBot.label(entry.getValue()).getText();
assertEquals(entry.getValue(), text);
helpShellBot.button().click();
SWTBotUtils.waitUntil(shellBot -> !shellBot.isOpen(), shell, "Help Dialog did not close.");
}
Expand Down

0 comments on commit d7a90a3

Please sign in to comment.