[xwiki/xwiki-platform] de5ef1: [Misc] Fix race condition in NotificationsIT
Branch: refs/heads/backport/stable-17.10.x/XWIKI-25111 Home: https://github.com/xwiki/xwiki-platform Commit: de5ef1de6bda59f87bcbd034358f4a0f32a2f80b https://github.com/xwiki/xwiki-platform/commit/de5ef1de6bda59f87bcbd034358f4... Author: Michael Hamann <[email protected]> Date: 2026-10-13 (Tue, 13 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-docker/src/test/it/org/xwiki/platform/notifications/test/ui/NotificationsIT.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsContainerElement.java Log Message: ----------- [Misc] Fix race condition in NotificationsIT * Add a method to wait/reload a page with the notification macro until the expected count is displayed. * Wait in NotificationsIT until the notifications are displayed to avoid that the test fails - it failed for me two times in a row locally. (cherry picked from commit 1f37a1d08c4b4eb45733616527e0cafd3930bae3) Commit: a38424ac371fcd46e60c46aaf20b41ddfd9d9770 https://github.com/xwiki/xwiki-platform/commit/a38424ac371fcd46e60c46aaf20b4... Author: Vincent Massol <[email protected]> Date: 2026-10-13 (Tue, 13 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-docker/pom.xml M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-docker/src/test/it/org/xwiki/platform/notifications/test/ui/NotificationsIT.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsContainerElement.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsTrayPage.java Log Message: ----------- XWIKI-25111: Add automated test for "Create page" (#6575) * NotificationsIT#ownEventNotifications (XWIKI-25111): the Dashboard activity gadget lists the page creation as a "create" event by its creator (adds xwiki-platform-dashboard-ui to the test WAR) * NotificationsIT#displayNotificationsOnSubwikis (XWIKI-25112): the activity stream of the user profile lists the pages that the user created on the main wiki and on a subwiki, and not the events of another user * NotificationsIT#displayNotificationsOnSubwikis (XWIKI-25145): on a subwiki, the notifications macro restricted with pages= or spaces= only lists the events of that page or space * NotificationsIT#simpleNotifications (XWIKI-25116, XWIKI-25119, XWIKI-25120): "Load older notifications" loads the next batches until every notification is listed once, the badge count equals the number of listed unread notifications, and the badge disappears after Clear All and stays absent after a reload * NotificationsIT#compositeNotifications (XWIKI-25144): a page holding the notifications macro with useUserPreferences=true lists the same notifications as the tray, and marking one as read from the macro marks it as read in the tray * Add NotificationsTrayPage#isCountBadgeDisplayed and NotificationsContainerElement#waitUntilNotifications/#isNotificationUnread Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 65a0aa963b55243292db5fee0d719c32325d29b5) Commit: 275ce8904ddb576f3744273e285a7f8140ba933f https://github.com/xwiki/xwiki-platform/commit/275ce8904ddb576f3744273e285a7... Author: Vincent Massol <[email protected]> Date: 2026-10-13 (Tue, 13 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-docker/src/test/it/org/xwiki/platform/notifications/test/ui/NotificationsIT.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsContainerElement.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsTrayPage.java Log Message: ----------- XWIKI-25111: Add automated test for "Create page" * Use the REST test API of this branch: save the pages of another user with savePageAs() and post the comments as that user by switching the default credentials, instead of RestTestUtils#runAs() and CommentsTab#restPostComment(), which are not on this branch * Port NotificationsContainerElement#getNotificationIndex, used by the new compositeNotifications assertions * NotificationsTrayPage#isCountBadgeDisplayed: inline the selector of the notifications menu, since NOTIFICATION_BUTTON_CSS_SELECTOR is not on this branch * NotificationsTrayPage#isCountBadgeDisplayed: use get(0) instead of getFirst(), not available in Java 17 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: 1c53ca16757c2f2adc7ab7225e28ffe7abfc38ac https://github.com/xwiki/xwiki-platform/commit/1c53ca16757c2f2adc7ab7225e28f... Author: Vincent Massol <[email protected]> Date: 2026-10-13 (Tue, 13 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsContainerElement.java M xwiki-platform-core/xwiki-platform-notifications/xwiki-platform-notifications-test/xwiki-platform-notifications-test-pageobjects/src/main/java/org/xwiki/platform/notifications/test/po/NotificationsTrayPage.java Log Message: ----------- XWIKI-25111: Add automated test for "Create page" * Adjust the `@since` of the backported page object elements Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/de5ef1de6bda%5E...1c53ca1675... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications