[xwiki/xwiki-platform] 24defc: [Misc] Replace the non-core UI interactions of Men...
Branch: refs/heads/mentions-it-rest-fixture Home: https://github.com/xwiki/xwiki-platform Commit: 24defc6b0a9a77337f4725584d9be8463f41a912 https://github.com/xwiki/xwiki-platform/commit/24defc6b0a9a77337f4725584d9be... 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, and don't clear the tray through the UI anymore. Commit: 6379dec5a257aff7358fadf44530c721e1890cb7 https://github.com/xwiki/xwiki-platform/commit/6379dec5a257aff7358fadf44530c... 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: 0c9e054c55f969a0465b3c40474e13bcfd78a8a2 https://github.com/xwiki/xwiki-platform/commit/0c9e054c55f969a0465b3c40474e1... 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/72e5f90d1006...0c9e054c55f9 To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications