[xwiki/xwiki-platform] 0e22dc: [Misc] Fix race condition in NotificationsIT
Branch: refs/heads/stable-18.4.x Home: https://github.com/xwiki/xwiki-platform Commit: 0e22dc063a0dc19fb26d4afd0c23c130a5b92a95 https://github.com/xwiki/xwiki-platform/commit/0e22dc063a0dc19fb26d4afd0c23c... 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: 4f9c258348703ebe654733d9742e66ad7d71a140 https://github.com/xwiki/xwiki-platform/commit/4f9c258348703ebe654733d9742e6... 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: a74139ccc29518a3093b8d94ad3dcf8163f806c2 https://github.com/xwiki/xwiki-platform/commit/a74139ccc29518a3093b8d94ad3dc... 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 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: dc518b65f0116de4659828ee1276f502c7bc44c5 https://github.com/xwiki/xwiki-platform/commit/dc518b65f0116de4659828ee1276f... 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/614984549e1b...dc518b65f011 To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications