Commit Graph
1616 Commits
Author SHA1 Message Date
Axel Uhl c63fc22189 De-flake leaderboard Selenium tests: wait for regatta leaderboard row before reading details
createRegattaLeaderboard() returned as soon as the create dialog's OK was
pressed, without waiting for the newly created regatta leaderboard row to be
rendered into the leaderboards cell table. A subsequent getLeaderboardDetails()
call could then race the AJAX round-trip, find no matching row yet, and return
null, causing NullPointerExceptions downstream (e.g. in linkRace()).

Wait until the new row (named after the regatta, see RegattaDescriptor.toString())
has been rendered before returning, mirroring createFlexibleLeaderboard(). This
fixes the intermittent failures of TestColumnsInLeaderboard.testLeaderboardPanelRefresh
and TestSwitchingOffStartOfRaceInference; the other callers of
createRegattaLeaderboard() were verified to still pass.

Assisted-By: Claude Opus 4.8 (Claude Code)
2026-09-24 14:50:37 +02:00
Axel Uhl 0281136cc7 Fix flaky UserGroupApiTest Selenium-4 click race on server-configuration update
The self-service checkbox in LocalServerManagementPanel fired its
config-write RPC with a plain AsyncCallback and signalled progress via an
"updating" DOM attribute. Under Selenium 4 the W3C click() returns before
the browser dispatches the checkbox's ValueChangeHandler, so LocalServerPO
could observe "updating != true" and proceed before the RPC had even been
fired, letting createEvent run before the server was in self-service mode.

Bring the panel into the harness's standard pending-Ajax mechanism: mark the
updateServerConfiguration RPC with a MarkedAsyncCallback on a dedicated
category, and replace the bespoke "updating" barrier in LocalServerPO with
the proven baseline-before-click + monotonic finished-call-counter idiom
(as in LeaderboardPage.refresh()). Because the finished-call count only ever
increases, this is immune both to the click-return gap and to a boolean flag
toggling back between polls.

Also encapsulate the PENDING_AJAX_CALLS JavaScript: the literal now lives
once in AjaxCallsExecuted, which exposes getNumberOfFinishedCalls(...);
AjaxCallsComplete reuses the shared constant, and PageObject delegates via
getNumberOfFinishedAjaxRequests(...). LocalServerPO no longer contains JS.

Assisted-By: Claude (claude-4.8-opus)
2026-09-23 13:57:29 +02:00
Axel Uhl eda617b1b8 bug6305: remove stale commented-out dead code in TestStartAndStopTrackingForTracTracEvents
Drop the leftover TODO and commented-out NO_REGATTA / BMW_CUP_RACE_8
constants and the surrounding blank lines; no behavioral change.

Assisted-By: Claude (claude-4.8-opus)
2026-09-19 00:14:53 +02:00
Axel Uhl efc00c3fe4 bug6305: fix Selenium timing flake in start/stop tracking cycle test
TestStartStopTrackingCycleForRaceLog failed intermittently with
NoSuchElementException on ACTION_START_TRACKING: at click time the race
rows still showed the un-denoted action set, i.e. the leaderboard
denotation had not applied client-side yet.

Root cause: the leaderboard-level denoteForRaceLogTracking RPC in
SmartphoneTrackingEventManagementPanel used a plain AsyncCallback, so it
was invisible to the PENDING_AJAX_CALLS counter that only
MarkedAsyncCallback touches. waitForAjaxRequests() therefore returned
before the denote->refresh chain settled, and the test clicked against
the stale DOM. This was exposed by the Selenium 3.141 -> 4.13 upgrade,
not by a bug6305 functional change.

Two fixes:
1. Production (root): wrap the denote RPC callback in MarkedAsyncCallback,
   matching the sibling RPCs in the same panel, so the pending-call
   counter stays non-zero until the whole denote->refresh chain settles.
   Makes waitForAjaxRequests() honest for this RPC for any test.
2. Test robustness: startTrackingForRace now takes the race name and
   waits state-based for the ACTION_START_TRACKING image to appear
   (re-fetching the row each poll to survive GWT re-renders) before
   clicking, via a new DataEntryPO.hasActionImage helper, instead of
   assuming row presence implies the action is available.

Verified: test passes on two independent local runs (98.9s and 275.5s),
both denote->start->stop->undenote cycles green.

Assisted-By: Claude (claude-4.8-opus)
2026-09-19 00:14:05 +02:00
Axel Uhl 01d2fc7128 Make TestNegativeAcls robust against user-creation lock and dialog races
The user-creation rate limit and animated ACL dialogs caused flaky
failures in TestNegativeAcls:

- The per-IP user-creation lock (server side) previously was only worked
  around by a client-side Thread.sleep for the full locking duration.
  Instead, when a UserManagementPanelPO has an AdminConsolePage, it now
  clears the server-side lock through the "User Creation Abuse" blocklist
  UI before creating a user. The legacy sleep-based throttle is retained
  as a fallback when no AdminConsolePage is available.

- IpBlocklistPanelPO.unblockIP now polls a freshly refreshed table until
  the unblocked row is gone, tying completion to a server round-trip. The
  unlock and data-load GWT-RPCs in IPBlocklistTableWrapper are now wrapped
  in MarkedAsyncCallback so waitForAjaxRequests() can observe them instead
  of being a silent no-op.

- AclActionInputPO.addAction waits for the suggest box to be displayed and
  enabled before typing, fixing an ElementNotInteractableException when the
  denied-actions input is still settling after adding a user group.

Assisted-By: Claude Opus 4.8 (claude-opus-5)
2026-09-18 18:59:13 +02:00
Axel Uhl bfa1f9baa1 Fix spurious TestNegativeAcls failures from GWT CellTable async redraws
The negative-ACL Selenium tests intermittently failed with
StaleElementReferenceException (masked as a generic RuntimeException) and
a NullPointerException when reading a freshly-created role/permission row
that had not yet rendered.

Root causes and fixes:

- Several user-management RPCs were fired through a plain AsyncCallback, so
  they were invisible to the pending-Ajax counter and waitForAjaxRequests()
  returned before their deferred CellTable repaint ran. Wrap them in
  MarkedAsyncCallback: createRoleDefinition, getRolesAndPermissionsForUser,
  getUserList, addPermissionForUser, removePermissionFromUser and
  removeRoleFromUser.

- Pair those marks with waitForAjaxRequests() barriers on the test side after
  add/delete clicks (WildcardPermissionPanelPO, UserRoleDefinitionPanelPO).
  The ...AndExpectPermissionError() variants deliberately click directly and
  wait for the alert instead, since the RPC fails rather than completing.

- Add RoleDefinitionsPanelPO.findRoleWhenPresent(): wait for Ajax, then poll
  until the row is present before returning it, and use it from
  TestNegativeAcls so a not-yet-rendered row no longer NPEs.

- Stop CellTablePO/GenericCellTablePO from masking staleness: narrow
  createEntry's catch to the exceptions the reflective construction can
  actually throw, unwrap InvocationTargetException(StaleElementReferenceException)
  and rethrow it, and retry getEntries() a bounded number of times so a
  redraw-during-read is tolerated rather than surfaced as an opaque failure.

- PageObject.waitUntil now ignores StaleElementReferenceException.

Assisted-By: Claude Opus 4.8 (Claude Code)
2026-09-18 17:29:27 +02:00
Axel Uhl b21a4c3a2d bug6288: fix flaky testRaceManagerAppInvitationLink AJAX race after Selenium upgrade
The test read the first device-configuration table row immediately after
creating a configuration, but the reload that populates that row was not
awaited, so a fast GeckoDriver could reach getEntries().get(0) before the
row existed and fail intermittently.

- Mark DeviceConfigurationListComposite.refreshTable()'s getDeviceConfigurations
  RPC with MarkedAsyncCallback so the reload is counted by the Selenium AJAX
  barrier (waitForAjaxRequests). Previously it used a bare AsyncCallback and
  was invisible to the barrier.
- Use DataEntryDialogPO.pressOk() instead of clickOkButtonOrThrow() in the
  test so the OK click is followed by waitForAjaxRequests().
- Guard getDeviceConfigurationDetails() to wait until the leaderboard table
  is non-empty before reading row 0, protecting all callers against the race.

Assisted-By: Claude Opus 4.8
2026-09-14 23:30:19 +02:00
Axel Uhl aededd169e fixing UserGroupApiTest by introducing proper wait for checkbox selection;
especially with the new Selenium driver, sending the click() event may
not wait synchronously until all event handlers on the element clicked
have fired and run to completion. This way, the "updating" DOM attribute
used to synchronize in this case may not have been touched. Now we wait
for the checkbox to really be ticked before continuing. Then we can be
sure that the "updating" flag has also been set.

Assisted-By: Opus 4.8
2026-09-12 15:12:57 +02:00
Axel Uhl e3493a5057 Merge branch 'eclipse-main' into bug6299 2026-09-08 17:08:13 +02:00
Axel Uhl e2fecc9f9f Wait for Media tab content after navigation
The Media tab replaces the event activity asynchronously, so wait for the new tab content before constructing its page object.

Assisted-By: GPT-5.6-sol
2026-09-08 17:05:36 +02:00
Axel Uhl b1442b9cb0 Merge branch 'eclipse-main' into bug6299 2026-09-08 14:52:10 +02:00
Axel Uhl db2cdd7d01 Stabilize asynchronous admin workflows
Wait for lazily loaded tab content instead of failing on transient absence, and sequence and track event, regatta, and leaderboard creation callbacks so dependent dialogs see persisted state.

Assisted-By: GPT-5.6-sol
2026-09-08 14:51:48 +02:00
Axel Uhl 39bbd61089 bug6299: synchronize animated inputs and expected login alerts
Extract a reusable interactability wait so media URL entry waits for the animated dialog to settle before clearing the input. Track public-server configuration requests and explicitly handle the expected tenant warning during the affected login test.

Assisted-By: GPT-5.6-sol
2026-09-07 23:50:59 +02:00
Axel Uhl bfd21494f8 bug6299: more robust check for whether element is clickable;
this is intended to help with animated elements such as the race map
settings, or an animated error dialog's buttons.

Assisted-By: Claude Code + GPT 5.6 Sol
2026-09-07 18:36:07 +02:00
Axel Uhl 467266f595 bug6298: migrate Selenium test suite from 3.141.59 to 4.13.0
Selenium 3.x only speaks the legacy JSON Wire Protocol, which forces us to
pin old browser versions. Selenium 4 brings the W3C WebDriver protocol.
Since the reactor still runs on Java 8 and Selenium 4.14+ requires Java 11,
4.13.0 is the migration target: the last Java-8-compatible release.

org.openqa.selenium.osgi wrapper bundle:
- Drop the Selenium-3 client-combined fat jar and its transitives.
- Add the 12 Selenium 4.13.0 modules + selenium-chromium-driver and the
  required transitive runtime deps (Netty async HTTP client, OpenTelemetry).
- Keep the legacy org.json jar (still consumed by the test bundle and
  previously re-exported here); DevTools/CDP jars intentionally omitted
  (the suite uses no CDP).
- Re-scope Export-Package to the 4.13.0 package layout; keep
  Bundle-RequiredExecutionEnvironment JavaSE-1.8. Bump bundle to 4.13.0
  and mirror the jar list in .classpath, build.properties and pom.xml.

com.sap.sailing.selenium.test source fixes:
- WebDriverWait(WebDriver, long) -> WebDriverWait(WebDriver, java.time.Duration).
- org.openqa.selenium.internal.WrapsElement -> org.openqa.selenium.WrapsElement.
- ElementNotSelectableException (removed) -> ElementNotInteractableException.
- Bump wrapper-bundle dependency to 4.13.0.

The full test bundle compiles cleanly against the new wrapper on Java 8.

Assisted-By: Claude (claude-4.8-opus)
2026-09-07 10:33:40 +02:00
Adrian Bollig 8fd67101d5 Fix encoding (high confidence) 2026-08-28 11:04:17 +02:00
Axel Uhl a62df20bec bug6241: restore corrected wording in ci-test-environment.xml comment
Follow-up to a960398cd3, which inadvertently captured a half-edited state of
this file (the previous commit staged it while a local edit was in flight).
This restores the intended version: 'information'/'sites'/'Internet Explorer'
wording and the empty-line cleanup in the web-driver system-properties comment.
Comment/whitespace only; no test behavior change.
2026-08-04 16:04:56 +02:00
Axel Uhl a960398cd3 bug6241: clarify that runWhenPolarLoadingFinishedFor waits for a global drain
The Javadoc on PolarDataService.runWhenPolarLoadingFinishedFor (interface),
PolarDataMiner (impl) and the RacingEventServiceImpl.scheduleWindEstimationInstallation
caller all read as if the callback fired once the fixes belonging to the given
race had drained. In reality the loading pipeline (preFilteringProcessorForLoadedFixes)
is shared across all races and has no per-race completion tracking, so the
callback fires only on a global drain: when the fixes of every race ingested so
far have been processed.

The race parameter does not scope the wait; it only gates WHEN the callback may
attach to the shared drain, via two conditions that must both hold: (1) the
race's own fixes have been ingested (so the callback can't fire on a pipeline
that is merely momentarily idle before this race was queued), and (2)
markLoadingOfAllRacesToRestoreStarted() has been signalled (so an idle window
between two startup races' ingestion bursts isn't mistaken for a real drain).

This global-wait behavior is deliberate: we want the polar model to reflect all
loaded data before any maneuver-based wind estimation is installed, and we accept
the resulting startup sequentiality (an early race's estimator install waits
behind the whole loaded-fix backlog). Documentation only; no behavior change.
The method name is kept as-is.
2026-08-04 14:54:20 +02:00
Axel Uhl b3970a8007 simplified SpeedWithBearing implementations by defaulting travelTo; avoid NPE 2026-07-07 18:17:48 +02:00
Axel Uhl 2e48a95026 to stabilize TestConnectorsResultImportUrls, catch StaleElementReferenceException;
when this exception is thrown, catch it and return null for the table
entry looked for; this is intended to cause the waitUntil method to try
again instead of failing with the exception
2026-06-29 16:46:43 +02:00
Axel Uhl 751e0ebbe6 bug6266 aftermath: fixed typo in comment 2026-06-29 12:12:59 +02:00
Axel Uhl dc19890c81 make score correction URL inline delete test more robust;
adding a 1s sleep shall overcome what probably are event
loop timing issues in an asynchronous GWT RPC
communication and redraw/update cycle.
2026-06-29 00:43:34 +02:00
Axel Uhl 2d1807259b copy attachments files to the destination folder 2026-06-28 00:58:23 +02:00
Axel Uhl 2f9fd7fb2b use attachment paths relative to build workspace root 2026-06-28 00:48:11 +02:00
Axel Uhl 36e86f6bf5 consolidated imports to avoid unused warning after no longer using nio Paths 2026-06-27 21:12:38 +02:00
Axel Uhl 58668ec066 flush System.out/err for ATTACHMENT output to arrive in Surefire 2026-06-27 16:10:38 +02:00
Axel Uhl acd374263e further improved JUnit attachment output 2026-06-27 10:41:04 +02:00
Axel Uhl 65f7ed9b53 further refined screenshot folder handling for ATTACHMENT output 2026-06-27 10:33:09 +02:00
Axel Uhl f0431f7f80 output JUnit attachments (screenshots) with relative paths to work with Jenkins 2026-06-27 10:17:36 +02:00
Masha Kashirina 96fa4548b4 bug6251: sel test fix overlay problem 2026-06-12 14:13:03 +02:00
Masha Kashirina ecd6e7f905 bug6251: selenium fix 2026-06-10 14:52:16 +02:00
masha.kashirina b5e89677b8 bug6251: selenium test impl 2026-06-07 14:46:32 +02:00
masha.kashirina 78ebd14d05 bug6239: sel test fix 2026-05-23 15:39:07 +02:00
masha.kashirina 236506a239 bug6239: fix roles rows removal bug 2026-05-19 18:08:08 +02:00
Axel Uhl c2c083fac0 make result import Selenium test more robust by waiting for AJAX requests 2026-04-15 18:12:33 +02:00
Axel Uhl b2e4e7298a Merge branch 'main' into bug5959 2026-03-07 22:45:42 +01:00
Axel Uhl 22f180cee1 bug6215: moving Speed, Position, Bearing, Weigher and others to SSE; GWT CFSs not done yet 2026-03-03 17:30:56 +01:00
Axel Uhl 1b406d97ec Merge branch 'bug6209' into bug5959 2026-03-03 00:55:55 +01:00
Axel Uhl d6f34046d7 bug6209: for Selenium tests, set igtimi.base.url system property to http://127.0.0.1:8085 which is the configured Jetty port for the runtime 2026-03-02 21:09:04 +01:00
Axel Uhl 59bf7cd05a Merge branch 'main' into bug5959 2026-01-20 16:20:16 +01:00
Axel Uhl 9b9f79561d avoid "Info" problem being created for local-test-environment.xml for a "NOTE:" comment 2025-12-27 23:41:34 +01:00
Axel Uhl 195b78e63f Merge branch 'main' into bug5959 2025-12-03 16:42:46 +01:00
Sohaib Baig bbd1f10f3e Merge branch 'bug6148' 2025-12-01 15:36:11 +01:00
Axel Uhl 7534ece40a Merge branch 'main' into bug5959 2025-12-01 10:42:39 +01:00
Axel Uhl c614f17408 formatting 2025-11-27 11:29:49 +01:00
Sohaib Baig c11a113412 bugfix: extended locking duration for unlockUser test
Locally, the lock duration was not long enough to last until the admin
logged in to unlock them. This bypassed the need to interact with a
dialog locally, and so the test was still succeeding even after an
interaction command for this dialog was removed. This duration was long
enough for the server however, and so the dialog demanding interaction
would appear and crash the test. The expected lock duration has been
extended by trigger +1 failed login attempts as well as the dialog
interact.
2025-11-26 16:05:44 +01:00
Sohaib Baig 499713d04d bugfix: testUnlockUser blocked by popup dialog
Popup dialog replaced with toast notification for success. Although the
reason behind this bug is yet not understood because the dialog should
have been accepted by the corresponding method in the PO, as it has done
before, replacing it with a toast notification should nevertheless
remove the possibility of it happening again.
2025-11-25 17:44:07 +01:00
Axel Uhl c07f4d3432 bug5959: for test case, explicitly trigger maneuver re-calculation 2025-11-22 01:23:24 +01:00
Sohaib Baig 372e97235b Merge branch 'main' into bug6148 2025-11-21 13:08:43 +01:00
masha.kashirina 75ab8a6016 bug6060: small selenium test fix -> now solutions are shown when whitelabeled 2025-11-19 14:46:10 +01:00