[xwiki/xwiki-platform] 54854c: [Misc] Replace the non-core UI interactions of Men...
Branch: refs/heads/mentions-it-rest-fixture Home: https://github.com/xwiki/xwiki-platform Commit: 54854ca21cd0daa2e444d48d8b0b5abdc44b9baa https://github.com/xwiki/xwiki-platform/commit/54854ca21cd0daa2e444d48d8b0b5... Author: Manuel Leduc <[email protected]> Date: 2026-09-10 (Thu, 10 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-test/xwiki-platform-mentions-test-docker/src/test/it/org/xwiki/mentions/test/ui/MentionsIT.java M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Log Message: ----------- [Misc] Replace the non-core UI interactions of MentionsIT by REST calls * Add TestUtils.RestTestUtils#addObjectAs, the object counterpart of the existing savePageAs, to add an object over REST as a given user. * Create the users, the pages and the comment of MentionsIT over REST instead of driving the browser, so that only the mentioned user, whose notification tray is the subject of the tests, logs in. * Mention a user of its own in each test, so that neither test can see the notifications of the other one. They don't have to clear the tray through the UI anymore, and don't depend on their execution order. Commit: 35d24bd7f33cfe9653f761866e42db0616c231cc https://github.com/xwiki/xwiki-platform/commit/35d24bd7f33cfe9653f761866e42d... Author: Manuel Leduc <[email protected]> Date: 2026-09-10 (Thu, 10 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-test/xwiki-platform-mentions-test-docker/src/test/it/org/xwiki/mentions/test/ui/MentionsIT.java M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Log Message: ----------- [Misc] Perform any REST actions as a given user instead of one action per method * Replace TestUtils.RestTestUtils#addObjectAs by a generic #runAs, which performs any actions on the REST API with the provided credentials, so that a new method is not needed for each action that has to be performed as a given user. * Implement the existing #savePageAs on top of #runAs. * Use #runAs in MentionsIT. Commit: 72e5f90d100660a7af94d58c6857dc9221071537 https://github.com/xwiki/xwiki-platform/commit/72e5f90d100660a7af94d58c6857d... Author: Manuel Leduc <[email protected]> Date: 2026-09-10 (Thu, 10 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-mentions/xwiki-platform-mentions-test/xwiki-platform-mentions-test-docker/src/test/it/org/xwiki/mentions/test/ui/MentionsIT.java M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Log Message: ----------- [Misc] Create a user over REST from any functional test * Move the REST user creation of MentionsIT to TestUtils.RestTestUtils#createUser, so that any functional test can create a user without going through the browser. * Take the login and the password of the user as parameters of #runAs, instead of a UsernamePasswordCredentials, so that its callers don't have to depend on the HTTP client API. * Move the private methods of MentionsIT at the end of the class. Compare: https://github.com/xwiki/xwiki-platform/compare/54854ca21cd0%5E...72e5f90d10... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications