Branch: refs/heads/stable-15.5.x
Home:
https://github.com/xwiki/xwiki-platform
Commit: c9af16b4e79b1cb2b8dbd6e8a5a102063e6b5d29
https://github.com/xwiki/xwiki-platform/commit/c9af16b4e79b1cb2b8dbd6e8a5a1…
Author: Marius Dumitru Florea <marius(a)xwiki.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M
xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-test/xwiki-platform-ckeditor-test-pageobjects/src/main/java/org/xwiki/ckeditor/test/po/RichTextAreaElement.java
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/toolbar.js
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-test/xwiki-platform-realtime-wysiwyg-test-docker/src/test/it/org/xwiki/realtime/wysiwyg/test/ui/AbstractRealtimeWYSIWYGEditorIT.java
A
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-test/xwiki-platform-realtime-wysiwyg-test-docker/src/test/it/org/xwiki/realtime/wysiwyg/test/ui/RealtimeTestDebugger.java
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-test/xwiki-platform-realtime-wysiwyg-test-docker/src/test/it/org/xwiki/realtime/wysiwyg/test/ui/RealtimeWYSIWYGEditorIT.java
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-test/xwiki-platform-realtime-wysiwyg-test-pageobjects/src/main/java/org/xwiki/realtime/wysiwyg/test/po/RealtimeCKEditorToolBar.java
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-test/xwiki-platform-realtime-wysiwyg-test-pageobjects/src/main/java/org/xwiki/realtime/wysiwyg/test/po/RealtimeRichTextAreaElement.java
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-webjar/src/main/webjar/filters.js
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-webjar/src/main/webjar/patches.js
M
xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-webjar/src/main/webjar/wysiwygEditor.js
Log Message:
-----------
XWIKI-21612: Realtime WYSIWYG editor functional tests are flickering in Chrome
* The empty text area placeholder is not added / removed immediately, so we need to wait
for it.
* Store the user id (for the realtime session) in a data attribute on the realtime toolbar
to simplify the wait for the user position inside the rich text area.
* Output the JavaScript (browser) console logs and the realtime debug information on test
failure.
* Wait for a coeditor position before asserting the number of coeditor positions.
* Empty space at the end of a text node can be converted to a non-breaking space. Refactor
the tests to avoid it, so that the outcome is the same in Firefox and Chrome.
* Fix the code that checks if a coeditor position (caret indicator) is in the viewport, so
that it works on Chrome also.
* Don't sync the focused block placeholder, because each coeditor can have a different
focused block and also because it leads in some cases to patches that are not valid JSON
and thus are dropped, failing the tests (timeout waiting for a specific content).
* Filter the "filling character sequence" that is used by CKEditor to overcome
the fact that we can't place the caret inside an empty element in Chrome (Blink /
WebKit in general). This was generating additional whitespaces in Chrome that was failing
the tests.
* Make sure DiffDOM creates DOM nodes using the owner document of the edited content.
* Perform operational transformation using Chainpad.NaiveJSONTransformer (used also by
CryptPad) because we're synchronizing JSON content and also reject patches that are
not valid JSON. thanks @yflory !
** We also tried using SmartJSONTransformer but it doesn't behave as well when
multiple users are editing in the same place (i.e. when multiple operations happen in
close vicinity).
* Improve logging when a remote patch fails to be applied or when a local change fails to
be pushed to chainpad.
(cherry picked from commit 988a9e2824f81f4fec3e0f91e1277ac5a2bfa345)