fix: SWTBot Preferences tests fail due to missing shell close synchronization#347
Merged
Merged
Conversation
5ba5fec to
956ceb9
Compare
…nization
- Close stray Preferences shell before opening a new one -
fixes 10 'Could not find menu bar' failures.
- Use bot.textWithLabel("Pattern:") to reliably target pattern field.
- Make validation checks best-effort on Win/Eclipse4 (message
widget rendering differs from Linux).
- @disabled RunTestSWTBotTest (Ctrl+R launch flaky on Windows CI).
956ceb9 to
ffd80b3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #347 +/- ##
============================================
+ Coverage 78.14% 79.73% +1.58%
- Complexity 3839 4057 +218
============================================
Files 483 517 +34
Lines 16683 17347 +664
Branches 1324 1339 +15
============================================
+ Hits 13037 13831 +794
+ Misses 3091 2947 -144
- Partials 555 569 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problème
13 tests SWTBot échouent systématiquement sur le CI Windows :
Could not find menu bar for shell: Shell with text {Preferences}dansPreferencesTestPreferencesPageSWTBotTestCause racine
Test isolation :
saveAndClosePrefs()cliquait sur OK sans attendre la fermeture de la boîte de dialogue Préférences. Quand le test suivant appelaitopenPreferences()→bot.menu(\"Window\").menu(\"Preferences...\").click(), la shell Préférences du test précédent était encore active.bot.menu(\"Window\")cherchait alors une barre de menu sur la shell Préférences, qui n'en a pas → erreur.Correctif
PreferencesTest.java— Capture la référence shell avant OK, patiente avecConditions.shellCloses(shell)PreferencesPageSWTBotTest.java— Idem pour les 3 clics CancelJavaProjectSWTBotTestHelper.java— Nettoyage des shells Préférences orphelines dansafterAndAfter()