- unify desktop and mobile toolbox code
- toolbox should apply disabled state on child nodes
- this is needed to handle disable action, previously
we received JSON for complete widget
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I018d7505a383ec45c9260f3629daaa9771579995
Print full test name in beforeEach and afterEach
Hide xhr requests
Hide repeated actual and expected values on passed assertions
Add information to failure message
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ic1a20481c05afb05b9c29d0bd428b59615d49dc7
My local run failed in this test, because scrolling to the right just
twice resulted in a partially clicked toolbar item, so:
cy.cGet('#Home-container .unospan-CharmapControl').click();
failed. Force the clicking so a half-visible toolbar item also gets the
click.
An alternative would be to add a 3rd click if scrolling to the right is
still possible, but that looks less clean.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I4caa3dc79df1bbbd5bd0c7e88ef1baea8ae4b17e
Remove most calls to cy.wait(), reduce and comment the rest.
Stub waitUntilIdle and clickOnIdle
Fix many failing tests
Reduce total cypress runtime by 45%
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I62ddfdcbc3ab107654459ebece2d325eca0c6156
In 24.04 we activated dialog which informs about idle dialog.
It covers full screen so some tests fail on that.
Add {force: true} to ignore that in failing case.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I11a183deb91ca35a2ddecc63b62bcb82b8ad1d0f
Fails when we don't check for '<img' in Clipboard.js
_navigatorClipboardGetTypeCallback().
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Idde76a7da26bac624c15c316be8cac638032c848
This is the case when the HTML has no own marker and we actually parse
the HTML data.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8b1690faccbc9ebc6c67557cde8897eccf641fdc
Let's get this merged and try to fix later.
It works locally but not on CI.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I62dda307575f6b8e9eac40b061b2f8c9e609f2e7
For faster testing use special values in Cypress case.
- check inactivity every 1s
- out of focus timeout - 1s
- inactivity timeout - 7s
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9dd51f2098486917898b7624ac5ade56521f9e96
VoiceOver is the iOS name for the function. Let's pick a more neutral name.
"Screen Reading" was suggested by Michael Meeks.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9d6f7f59d06bf83e0324dc095f3c141e122ad5f4
Below cases are covered in current patch
- `Filter by Color` in autofilter should have radio buttons.
- Changes should be applied whene we select any option from `filter by color` submenu.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I1a757e09be81df934b46d48f71e8be28fc48c984
And other changes to reduce logs by about
20 lines per test (15% of total)
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia6a1c96752816c5cd9fb11368cf921bdce9936ff
If we had very long or tall cell - maybe bigger than a screen
on every selection we tried to show it on the screen what
caused view to jump. If cell is bigger and partially visible
left view at the same position to avoid "jumping".
Steps to reproduce:
1. merge many cells - longer than one screen width
2. scroll in the middle of merged cell
3. select the cell
Result: jump to the begining
Expected: no jump if it is paritally visible
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I04da5cd346f175728222888a039a796b271e00d1
The intent is to eventually replace cy.cGet and some other helper
functions with getFrame, which is cleaner and has better logging on both
pass and fail.
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I911a5552d69634495a9036d020754351665419cf
Touch unification (b3bff28bed, change ID
I9016fc15ad3ccb3664af348fdcdca006495b0778) was a rework of the input
system to better support touch devices, but unfortunately it caused some
fairly serious regressions. This commit fixes the following:
- Triple/Quadruple clicking was no longer recognized on non-touch
devices.
- There were some issues recognizing wrapped events
- Pens were considered to be touch devices, but this broke some
remote/virtual machine setups. It's possible that this change will
cause a regression for apple pencil users. I plan to get an Apple
pencil to test whether preventing pens from being touch devices breaks
the Apple pencil workflow instead
- manualDrag was taken to mean "is on a touch device". This is only
almost true, causing some input to be incorrectly ingnored when it was
not
- manualDrag and _manualDrag were confused. They affect different
things, and we now recognize this
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Iab0d3bcca588eaed14469597868a9c4e2dcf8488
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Original approach before comment autosave:
When we save a new comment, original DOM element which user was editing
is removed from the DOM and new comment DOM element is created from the data and message sent by core.
Previous comment autosave approach:
When we save a new comment, original DOM element which user was editing
is not removed but kept in editing mode. We register the comment message sent by the core
but react and create new comment DOM element only after user clicks on save or cancel.
This lazy initialization caused many regression due to juggling of the new and old comment DOM element.
All these problems were in JS side only, reloading doc would bring comment in correct state.
This approach gave smoother transition between different comment states without any flickers.
New comment autosave approach:
Simple as the original approach, when comment loses focus we save it as normal comment.
When new DOM element created via core comment message, we immidietly set it to edit mode.
This approach may have a little flicker when we replace old comment DOM element with new comment DOM element.
Overall this approach requires less condition checking which makes it easy to maintain and hopefully reduces any regression from previous method.
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4098085825ede65cdbf2e2243fc4d2bb1f63c716
Make sure we don't expect response from server for online-only component: dropdown which doesn't have corresponding widget in the core
fixes regression on close from:
commit a23adac78c
browser: fix undefined property 'isPopup'
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I005647c77da3a866cec88a78f03dd409a098a469
L.Browser.touch is sometimes nice, but it's ultimately a flawed concept
to use it for input events. Using L.Browser.touch for input handicaps
people with mice if it's too liberal in what it classes as touchscreens,
and handicaps people with touchscreens if it's too conservative. There's
also no sweet spot: it's impossible to choose correctly if someone is
using both a touchscreen and a pointer device, as there's no right
option!
Previously many of our event handlers and some of our UI was gated
behind L.Browser.touch. This commit adds a new "window.touch" property
which is used instead. It has functions to help with event detection,
allowing you to easily make event handlers that work for only the input
devices they are designed for, without gating them behind feature
detection. This has the added bonus that - as you register all the
events - switching between a touchscreen and pointer is now not only
possible but already implemented!
For cases which don't have reasonable events to tag onto (e.g. the
teardrop for cursor movement) this commit adds "hasPrimaryTouchscreen"
and "hasAnyTouchscreen" which use the CSS media queries to detect if
there's a touchscreen attached to your device (either as the primary
input mechanism or at all). This works a lot more similarly to
L.Browser.mode, but being dynamically updated allows you to effectively
swich between touchscreen and not at-will. This still has all of the
disadvantages that L.Browser.touch did when used to register event
handlers, so my advice would be to avoid using it with events.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I9016fc15ad3ccb3664af348fdcdca006495b0778
When a document is loaded the Accessibility Support toggle button was
not set to the right state.
The problem affeced Online when integrated in Nextcloud.
Moreover the button label has been renamed to 'Voice Over' in
accordance with what suggested by NGI audit
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I5bc7d8348397691f469b6274af58e18a8d6d603c
table-delete-rows-button is inside table-delete-rows so right not
it doesn't make a difference if table-delete-rows is clicked, but
in follow up we want to check if table-delete-rows-button is enabled
not table-delete-rows
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7f21dd6a423192ba80791bc94bf63ff39d12f0c6
Now accessibility support can be enabled in Impress.
Created cypress tests for editable area in Impress
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Ia2fd4e55bce3785320ec0cc9f31a6d7550ca3a82
In order to allow screen reader to track caret navigation properly
even if there is some connection delay default behaviour for
Left/Right arrow key press is no more prevented in
Map.Keyboard._handleKeyEvent. In TextInput._onKeyDown, it has been
needed to handle some special caret position, such as when cursor is
at begin or end of a list item prefix.
When left/right arrow is pressed and text is selected, selection is
cleared and caret needs to be moved by one char left/right.
However, for an editable div the behaviour is different:
- when left arrow is pressed caret moves at start of previously
selected text
- when right arrow is pressed caret moves at end of previously
selected text
So we needed to prevent default behaviour and simulate the same
behaviour that occurs in LibreOffice.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Ifa5e9847bbbf77b934a3bcbd04545f4a55afd19d
it seems we generate previews later now
it might be related to commit 04ac02b033
Do not request tiles until we are sure a canonical id is set
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I250c37049ba62c4cdc06b16413767edafc362dc0
this is only desktop test that fails, let's skip
it until we fix the regression and not block others
from testing their patches
regression was introduces in:
commit 04ac02b033
Do not request tiles until we are sure a canonical id is set
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1de44a94121648b381df67d926bbc33dd1044b76
this is regression from commit:
f8e53bd851
Assign tab ids while defining tabs.
When opened Format -> Page Style dialog in Writer.
There was "123" label next to the tabs.
Also when switching between widgets using tab key
it was moving focus outside window.
Core is sending id as plain number what is easy to duplicate.
Let's add some unique name.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iebf70c7968f336761baf19442101ac98a948218c
sometimes svg generation takes more time it seems
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0e6ad493cb452a9725235f2c01c6792126b8de9c
this was changed in the core:
commit 0a549b2c9595cd076e3b503b67df93bff380885a
svg: export text decoration for text run not paragraph
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8906ee07c7ff88c9dcdbebe73d2c620e797a8b3a
When we get in one or more tables screen reader reports row and column
count.
When we get out one or more table screen report reports "out of table"
for each table.
When the fosused cell changes screen reader reports new row/col index.
Screen reader reports cell paragraph content, too.
Added also cypress tests for checking that the table/cell description
string is correct.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I078b29a2f76f91df479f75db76113c80405f7169
Also logs unhandled exceptions from iframe cool.html
Change-Id: I6f7b7d1340c8818d3f81916d42d6d9ed2920e35c
Signed-off-by: Henry Castro <hcastro@collabora.com>
Setting a baseURL cypress verify if the server is
running and prevents to refresh when command cy.visit()
Change-Id: I1cffc0932d6a1ec4ee9793eb3935f60e02ca2545
Signed-off-by: Henry Castro <hcastro@collabora.com>
It has a bug, it executes twice beforeEach function
if fails or unhandled exception.
Change-Id: I005815d440af0309cf797e52fbfb3693896418a9
Signed-off-by: Henry Castro <hcastro@collabora.com>
If it is a remote 'coolwsd' server,
there is no way to rename or copy files.
Change-Id: Ic38302de5ecf3fa08fedd485d6060ede320867bc
Signed-off-by: Henry Castro <hcastro@collabora.com>
If it is already running remote "coolwsd"" server,
there is no way to create a remote work folder.
Change-Id: I17932fcca321e2f7e0cdfcab2ad678dbcffc56ed
Signed-off-by: Henry Castro <hcastro@collabora.com>
It is useful inspect logs and run unit test
with an already running coolwsd instance.
Change-Id: I6b01316d552e3d12bf63db9cc7e813adb33a20c0
Signed-off-by: Henry Castro <hcastro@collabora.com>
"Could not find a Cypress configuration file in this folder""
Change-Id: I7d5b2094d6cd10ca3da2a099650f830bee31dfb1
Signed-off-by: Henry Castro <hcastro@collabora.com>
Helper functions:
checkAccessibilityEnabledToBe
check accessibility state independently from current desktop ui
setAccessibilityState
set accessibility state independently from current desktop ui
Both helper functions check that ui state and a11y support in text
input element are in sync.
Enable/Disable Accessibility Support
test state toggling and state preservation when switching ui
Typing after switching accessibility state
check editable area content after toggling accessibility support
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Icce5ae148024a8abf9b65a90229915f28f720554
Breaking the chain may be useful in this case, in order to benefit from timeout.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4242df23698b2019028cb4e8a3c6206499b80083
It converts textarea into contenteditable div.
Input is handled by TextInput.js used for document
and already in the past for formulabar. Replaces
usage of keyevents which are not triggered with
eg. Japanese.
Fixes also #6737
Fixes on mobile #6767 requires: https://gerrit.libreoffice.org/c/core/+/153717
New widget consists of text layer with visible content
and cursor layer with selections and cursor. When clicked
it focuses TextInput.js field for typing.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ieb7cf148a5aba80ab790e0b53c3a5ba27f166b73
expectTextForClipboard(expectedText) never fails for any passed
expectedText string
The value returned by the function passed to `then` cypress construct
must not be regarded as an implicit assertion.
I don't see anymore the '\n TEXT" case. It seems that comparing for
equality against the selected plain content is enough.
Fixed some cypress test that was failing after modifying
expectTextForClipboard.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I64ce31fa2127efcc70bbc3da3ac45fe456e66803
Now you can use CYPRESS_A11Y for enable/disable accessibility state on
testing.
Moreover you can use the taga11yenabled tag for tests that should be
run only when accessibility is enabled, and the taga11ydisabled tag
for test that should be run only when accessibility is disabled
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I4c44e78e5394477b64cc17ac6b815d9d70b059f5
The unit test fails by 1 pixel offset, add some tolerance
"'assert expected [ <tspan.TextPosition>, 1 more... ] to have attribute y with the value '7822', but the value was '7823'""
.
Change-Id: Ieb36eedf1a17aadd3ba4872e9c4f94a3b18d0a73
Signed-off-by: Henry Castro <hcastro@collabora.com>
The failing unit test it is due to a duplicate file
that was modified with new properties.
Change-Id: I02824cfeaf8c496e84dc4e285975e95e79edb9df
Signed-off-by: Henry Castro <hcastro@collabora.com>
The element '#copy-paste-container' according to the documentation
it is only to prevent flickering, so check only if has children.
Change-Id: I11ecdf156c6fee8657e5cd42c2c7daf9f206410b
Signed-off-by: Henry Castro <hcastro@collabora.com>
New tests:
- Check content
- Moving between entries
- Add entries
- Typing <backspace> at entry beginning
- Typing <delete> at entry end
- Selecting at entry beginning
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Ib831bb9f44f9fe3828e8f77fcdaf7f12ef901644
Helper functions has been moved to external file:
contenteditable_helper.js
Tests have been subdiveded in groups.
Spec file renamed from editing_spec to editable_area_spec
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Ifdb18b0de4851a2fc927b3a8fb3b1472165f2b7f
When accessibility is enabled in coolwsd.xml, overrides setting in
<user-interface> section by force to use the notebookbar UI.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I98f4b288439b21110214ca2a67df639b397184c9
A new section about accessibility has been appended to coolwsd.xml
config file
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I086abdf73646639283eb655ae60f200fb64e495a
We handle notification from core about currently focused paragraph:
content, caret position, text selection start/end.
Notifications are sent on any text changes, even when the text has
been modified in another view.
Moreover we can request such info to core at any time.
That allows AT software to read focused paragraph and selected text.
All that keeping editing still working.
A set of new cypress tests for checking clipboard content has been
developed.
failing cpp unit test:
- HTTPWSTest::testInactiveClient
'unexpected message' assertion was failing since an idle client can
receive an a11yfocuschanged message when the same paragraph has focus
in both view and the active view is editing the paragraph.
failing cypress tests:
desktop
- calc/autofilter_spec.js
- added more wait time before performing clickOnFirstCell
- impress/undo_redo_spec.js
- Repair Document was broken
- we need to select 'Hello world' in order to overwrite it
mobile
- impress/spellchecking_spec.js
- Apply suggestion
- better use selectTextOfShape instead of Ctrl-A
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I070d390543fa66fe786c4a0661fa09f891b9883e
Refactored TextInput implementation. A content editable <div> is used
in place of <textarea>.
<img> elements are used as pre/post spaces.
Minimal changes to FormulaBarJSDialog, since some code was
dependendent on
TextInput details.
Refactored some cypress helper funcions, too, since cypress tests
expected a <textarea> element.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I13fd7d5c6446dea054a5a9e88f22ed100a66b3fb
Added Desktop tests for calc and impress.
Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I80616cc9e8a9dd7160e9b33fa50047db83911590
Added Desktop, and Multiuser tests for writer.
Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I1bbb32303c66eb499cb837289a51caafdf2055a8
Use 'position: absolute' in jsdialog-window and jsdialog-container
so we don't stretch the dialog. It will use minimal needed size.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7b38b9200e190cfc184bf4bfe8b7bd814c60d5a6
Remove notebookbar tag and use switch UI functionality.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I49cfc7340b7ef07d06b0b7c37d24d88127c03735
Add switch UI to notebookbar function to desktop helper.
Remove tagnotebookbar.
Remove clickonidle function calls.
Tests should be more reliable and faster now - tested locally.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I8b05f0b7cf3755ce6e1fe35a26a4ec1154bb2510
The suspicion is that the update popup messes with focus, and can
break tests after they start intermittently - at least in
interactive mode.
cf. also https://github.com/cypress-io/cypress/pull/16694
Date syntax is altered to avoid another bug with cypress
parameter parsing.
Change-Id: I92b9911eb7b3673a64a9d123b2c110111b7c3549
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
This changes make cypress tests more reliable, specially in slow or loaded machines.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I574b0db3e81e57a2dc682fbe2ed3f0301ad8e52d
add forcecaching parameter to coolwsd for debug mode.
Change-Id: I6f38e9a4fd6dbb76e92105c76e8abe3e75f19ef5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Refactored TextInput implementation. A content editable <div> is used
in place of <textarea>.
<img> elements are used as pre/post spaces.
Minimal changes to FormulaBarJSDialog, since some code was
dependendent on
TextInput details.
Refactored some cypress helper funcions, too, since cypress tests
expected a <textarea> element.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I2141d7769588bb5bf8a0fbb62f036cb78f914966
Probably due to core side changes. I needed to comment out the property checks.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I26683265b827447e676a6463b19b5cb84a0040fc
- image test consistently fails without waits in CI
This reverts commit b529c96a48.
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I66bd85c8fe1ce28ccab8d644a98265145d3de64b
we send value on every key press now, but core still
sends updates back, after we update core to not notify
us with the same value it can be reverted
this prevents us from having incorrect text when typing long
sentences and receiving updates with delay
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If87c3f1c83018920dfaa8f3c31f567b25df27c61