Skip to content

Fix UI test failures in clean install build - #173

Merged
krperry merged 1 commit into
mainfrom
fix-ui-test-display
Oct 18, 2026
Merged

krperry merged 1 commit into
mainfrom
fix-ui-test-display

Conversation

@krperry

@krperry krperry commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Problem

mvnw clean install fails in brailleblaster-core with two test
failures since the six-key table editor test (#169) was added:

  • TableEditorSixKeyTest.sixKeyMenuAndCellInputTrackSharedMode:
    expected [f] but found []
  • SettingsChangeTest.changePageSettingsTest:
    SWTException: Invalid thread access

Causes and fixes

TableEditorSixKeyTest. SWTBot typeText posts OS-level
keystrokes, which go to whichever window has OS focus. On Windows
builds that is not the test shell, so the cell stays empty. The test
now sends key down/up events directly to the cell widget, which still
runs the real StyledText and SixKeyHandler code.

SettingsChangeTest. WPManager.display was created once in a
static initializer, but BBTestInit.cleanupBB() disposes the display
after every passing test. The next UI test in the same JVM created its
shell on the disposed display. This was hidden while
SettingsChangeTest was the only enabled UI test.
WPManager.display is now a getter that creates a new display if the
previous one was disposed. The app only disposes the display at exit,
so runtime behaviour is unchanged. The Java caller
(CorrectTranslationDialog) uses WPManager.getDisplay().

Testing

  • mvnw clean install on Windows: BUILD SUCCESS, all modules,
    0 failures (brailleblaster-core: 128 tests).
  • The two tests also pass when run together in isolation.

mvnw clean install failed in brailleblaster-core with two test
failures once the six-key table editor test was added.

TableEditorSixKeyTest typed into the cell with SWTBot typeText, which
posts OS-level keystrokes. Those go to whichever window has OS focus,
so on Windows builds the cell stayed empty. The test now sends key
down/up events straight to the cell widget, which still exercises the
StyledText and SixKeyHandler code paths.

SettingsChangeTest then failed with "Invalid thread access" because
WPManager.display was created once in a static initializer, while
BBTestInit disposes the display after every passing test. The next UI
test built its shell on the disposed display. WPManager.display is now
a getter that creates a new display if the previous one was disposed.
The application only disposes the display at exit, so runtime
behaviour is unchanged. Java callers use WPManager.getDisplay().
@krperry
krperry merged commit 42dc0cc into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant