[xwiki/xwiki-platform] dd6322: XWIKI-25026: AutoSaveIT#autoSavesOnlyOnceWhenTwoCl...
Branch: refs/heads/vmassol/autosaveit-page-object-waits Home: https://github.com/xwiki/xwiki-platform Commit: dd6322baad88b890f82c6d92f27ba33ded84deba https://github.com/xwiki/xwiki-platform/commit/dd6322baad88b890f82c6d92f27ba... Author: Vincent Massol <[email protected]> Date: 2026-10-08 (Thu, 08 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-docker/src/test/it/org/xwiki/blocknote/test/ui/AutoSaveIT.java Log Message: ----------- XWIKI-25026: AutoSaveIT#autoSavesOnlyOnceWhenTwoClientsEdit is flickering * Load both editors before anyone types, so that the edits of the two clients are made well within one auto-save interval. Typing in the first tab used to start its auto-save countdown before the second tab was even loaded: when that load took longer than the interval (as on MySQL / Tomcat), the first client saved before the second one typed, and the second client then rightfully saved its own later changes, creating a second version. * Open and switch the browser tabs with `MultiUserTestUtils` instead of the WebDriver, the second tab logging in on its own host like in `CollaborationIT`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: 4539404ea8bf35fdf60ae6974c2fcb9ffdcca196 https://github.com/xwiki/xwiki-platform/commit/4539404ea8bf35fdf60ae6974c2fc... Author: Vincent Massol <[email protected]> Date: 2026-10-08 (Thu, 08 Oct 2026) Changed paths: M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-docker/src/test/it/org/xwiki/blocknote/test/ui/AutoSaveIT.java M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-pageobjects/src/main/java/org/xwiki/blocknote/test/po/BlockNoteEditor.java M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Log Message: ----------- XWIKI-25214: Add test APIs to wait for the BlockNote auto-save and for a new document version over REST * Add `TestUtils.RestTestUtils#waitForNewVersion()`, which polls a document over REST until it moves past a given version and returns the new one. * Add `BlockNoteEditor#waitForAutoSave()` and `BlockNoteEditor#isAutoSavedWithinNextInterval()`, whose timeouts are derived from the interval set through `setAutoSaveInterval()`. * Use them in `AutoSaveIT`, which no longer calls the WebDriver nor needs its own wait helpers. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/dd6322baad88%5E...4539404ea8... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications