Commit Graph

137 Commits (master)

Author SHA1 Message Date
Marco Cecchetti acefa3f357 calc: fixed bogus cell view cursor overlay
On switching tab not clear other view messages saved for replay.
Added cypress unit tests for checking the cell view cursor bounds.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I788828783a86038bb9d7f26648925b0e03bd560a
2024-03-26 20:34:45 +01:00
Szymon Kłos 07da50acc3 remove-w2ui: use JSDialog.Dropdown in MenuButtons
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9a5bec468a64ef8cfa9868ef3a61b9d308106c94
2024-03-11 15:21:45 +01:00
Miklos Vajna 7f9de46688 cool#8465 clipboard: improve handling of plain text copy, simple case
Currently the current selection is always requested as HTML by the
browser, and then we ask the browser to convert it to plain text.

The problem is that e.g. Writer can produce much better plain text from
its model, compared to the plain text by the browser, e.g. bullet
characters for bullet points.

Fix the problem by:

- CanvasTileLayer.js, _onTextSelectionMsg(): requesting both HTML and
  plain text. Use ',' as a separator, as that's already established,
  e.g. the HTTP Accept header does that already

- Switching the textselectioncontent protocol message from just HTML to
  JSON that contains both HTML and plain text. This is produced in
  ChildSession::getTextSelection() and parsed in CanvasTileLayer.js,
  _onMessage()

- Clipboard.js, setTextSelectionHTML(): allowing setting both HTML and
  plain text.

- ClientSession::postProcessCopyPayload(): knowing if the content to be
  processed is HTML-in-JSON or just HTML, do additional escaping in the
  JSON / textselectioncontent case, but leave the other clipboardcontent
  case unchanged.

So far this only handles the simple case, the behavior for complex
selections are left unchanged for now. The payload is also unchanged
when a single format is requested, as many tests depend on test.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I2fe1378a8d50b7901ac9e808eb78858cd8ff8575
2024-03-08 13:54:10 +00:00
Szymon Kłos 22a452bb48 cypress: test for jumps when switching tabs in calc
Protect us from regressions.

We had issues with jumping view in calc, it was related to
switching tabs (not all was visible in the UI).

One case was repeated selection of the same tab.
Second one was using a keyboard shortcut to select multiple
sheets (ctrl + shift + page up/down).

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Icda723ee51b1a4aa8876208d52b4739ca380bb78
2024-03-01 08:59:36 +01:00
Szymon Kłos 2bd25b15df cypress: test disabled state updates
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib0c123e82360edcdf6c4bad533b40b3d5cc04bc2
2024-02-14 13:16:58 +01:00
Miklos Vajna d16ac21431 cool#8023 browser, clipboard: add internal HTML paste testcase
Fails with Clipboard.js _navigatorClipboardRead() returning false
unconditionally.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib715cb205a1c01fb3c5208e88285124e68d3c232
2024-01-29 08:50:25 +00:00
Szymon Kłos b24a9183d8 cypress: test view jump on merged cell with split pane
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iec6ff179a28dce802d330a3f59ac484189a25c48
2024-01-25 09:58:31 +01:00
Szymon Kłos a776ddf48d cypress: test idle handling
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
2024-01-15 16:07:38 +01:00
Caolán McNamara 534708fad3 cool#7951 add cypress test
add regression test for:
https://github.com/CollaboraOnline/online/issues/7951

confirmed test fails with reverted core commit of:

commit 754cd4309b5b055a05b57f5d25ed128c439f460b
Date:   Mon Jan 8 15:04:07 2024 +0000

    Related: cool#7951 don't invalidate when creating a new view

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4e2bf09f8fbe36919a9826e8cf29cc5250520dc6
2024-01-11 10:25:42 +01:00
Szymon Kłos a4add51e93 calc: avoid jumping on large cell selection
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
2023-12-27 20:09:27 -05:00
Pranam Lashkari 009cb14c07 cypress: added multiuser annotation tests
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9afae096d7a9e925e01e0c9faee57254ed1d074d
2023-12-07 22:38:59 +05:30
Caolán McNamara 164159ab26 add regression tests via cypress for unwanted no-change invalidations
multi-user scenarios

d) Rejoin triggers invalidations: fails with core:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=f1633dc0e06b046a9ca0f2fa53e7858be1584ffb
reverted

e) Rejoin after save triggers constant invalidations: fails with core:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=770df258bc0a66ee7551a59807d79cebcdcbb85e
reverted

https://github.com/CollaboraOnline/online/issues/7167

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I27795027a1bd186953c71807c5cfc35685af0e70
2023-11-14 19:12:26 +00:00
Caolán McNamara 7229eed150 add regression tests via cypress for unwanted no-change invalidations
single user scenarios

a) Click Empty Header: fails with core:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=f425c0aab6e33b8029bf7e87ac9b10b4b4489ac9
reverted

b) Enter Numbering Portion: fails with core:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=643c6b9a96020d5498d981c7ab081226415ab016
reverted

c) Click Existing Header: fails with core:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ce948053b1fa9a2843886dce4642cc36c94dd0e0
reverted

https://github.com/CollaboraOnline/online/issues/7167

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7d7283cabe6803d9258a09a858beb29083634738
2023-11-14 19:12:26 +00:00
Marco Cecchetti 022e32e5d2 a11y: impress: screen reader support for text shape editing
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
2023-10-11 10:18:46 +02:00
Szymon Kłos 1d6d3806b7 cypress: autofilter: test autofilter on mobile
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I63f05af3f618f150bf6550b03a25ff83dfa9d3b4
2023-09-25 16:41:11 +02:00
Marco Cecchetti 96a7cfb25e a11y: provide info about current table and cell to screen reader
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
2023-08-10 09:29:09 +02:00
Marco Cecchetti 11767353b3 a11y: editable area: cypress tests for list editing
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
2023-06-15 15:00:18 -04:00
Attila Szűcs 46a44c743a Navigator: cypress test for draw
Added Desktop tests for draw

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I94a5048c8bf6082059375c5742fb781263c643f4
2023-05-30 14:19:01 +02:00
Attila Szűcs f2d89c93a7 Navigator: more cypress tests
Added Desktop tests for calc and impress.

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I80616cc9e8a9dd7160e9b33fa50047db83911590
2023-05-30 14:19:01 +02:00
Attila Szűcs 74181fed7a Navigator: cypress tests
Added Desktop, and Multiuser tests for writer.

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I1bbb32303c66eb499cb837289a51caafdf2055a8
2023-05-30 14:19:01 +02:00
NickWingate a70415fe7b cypress: add tests for file properties
- test document description
- write test for custom properties
    - text, duration, yes/no types
    - disabled until core implements custom props

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: If0205b90d899772ac8f7f98d4eda2cbc23117d0f
2022-08-16 16:04:22 +02:00
Marco Cecchetti 3f21f15d7a cypress test for fullscreen presentation anim spin, grow and shrink
Added test for 2 emphasis animations:
- spin
- grow and shrink

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I3e5477b327e2d56776258cddf5de84617c1dc0a2
2022-06-27 16:01:30 +02:00
Rash419 0a203ad91e cypress: added desktop calc/autofilter_spec.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I48f4ceb591cbdf178b08b44ad1f833b52d5c004d
2022-05-10 22:31:16 +05:30
Rash419 42204db587 cypress: removed repeated tests and enabled notebookbar tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I2c31b7433559d776dbde179c2659e23d8b104d59
2022-03-15 15:57:18 +05:30
Rash419 3efcffb192 cypress: added open different LO files test for impress, writer and calc
impress: ppt, pptm, pot, potx, potm, ppsx, fodp
calc: xls, xla, xltx, xltm, xlsb, xlsm, fods
writer: doc, dot, dotx, dotm, docm, fodt

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib695e3f235acafd203c7041aecce319cd6efb285
2022-03-08 20:01:45 +05:30
Marco Cecchetti a217a6fbaa cypress test for fullscreen presentation white spaces
Google chrome doesn't render white spaces correctly

This is a set of tests for the core fix

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I7edb0490f1b56ac2c5ab2d60fa5cf25ab7946745
2022-02-22 16:25:09 +01:00
Rash419 3f350c6817 cypress: added new tests
for desktop:
added split cell test in table_operation_spec.js for writer, impress
added Image Resize test for writer, impress, calc
added Page break test in top_toolbar_spec.js
added NB support to the image_operation_spec.js

for mobile:
added merge row/column test in impress/table_operation_spec.js

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I9b3ccf124f49a2c33f2c1ca3c7c9106d09710bb4
2022-01-26 16:51:13 +05:30
Rash419 4fa3926103 cypress: enabled and updated multiuser test
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib20c93ec9c45ce234ef974e0cb0bd5323873ac42
2021-12-01 19:36:29 +05:30
Rash419 2bcce2f630 cypress: updated cypress to use WOPI endpoints
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic5e165c4ebae19e48b9e2b9ffb67832ca41ccd76
2021-12-01 19:36:29 +05:30
Rash419 265c275a81 cypress: update help dialog screenshot automatically
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I9f3e3c9cc7838f89d5a66a25c1f6dd0ef8f8a946
2021-12-01 11:57:00 +05:30
Rash419 c9f8f32e64 cypress: added scrolling tests for desktop calc,impress and writer
loleaflet: added test-div for horizontal and vertical scrollbar to get position

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I61f5823c26e1dc0a1ec96257bc58cb51bb29024f
2021-11-08 12:49:56 +05:30
Rash419 c082c80d8f cypress: fix: make calc tests more stable
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I36b6744890a5210db40a78395335fd15c758054a
2021-10-13 11:35:51 +05:30
Rash419 793bb33044 Fix: CI failing so added individual files
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id9043f3e56e56457448f9362727d8b4f7facfbd4
2021-10-11 17:31:48 +05:30
Rash419 6c66b1756d cypress: calc: added row and column operation
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I5f6fefad5dfcfc41f2d5d6f40dc1aec182c75d7e
2021-09-14 12:47:44 +05:30
Rash419 843d8aedb4 cypress: undo,redo,repair tests for single and multiuser
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I802d9e29a72ea71a88c1d4d736b743866a227c19
2021-08-21 19:53:36 +05:30
Szymon Kłos 9fc8f7d94f cypress: add simple sidebar tests
- test menubuttons
- test toolbutton popups
- test deck switch

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia928345982b855e9dbf850e969165566cc74f9d5
2021-07-28 08:46:04 +02:00
Rash419 74844c3dc8 cypress: introducing multiuser tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib6c86d74dd7f0414f3c63ed66e99504c870516a3
2021-07-27 14:58:09 +05:30
Gökay ŞATIR 39ee64ab50 PDF View: Added Cypress test for page up & down functionality.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Icc6f752e1cb406fb7c90e6d32520be531515d6eb
2021-07-09 21:05:40 +03:00
Rash419 fe6c622d23 cypress:sheetoperation tests for calc
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Idb2dfdce34cdff5901281637bf05882935344fdb
2021-07-07 14:36:20 +05:30
Mert Tumer 9212e4a338 cypress: Validate Complex Image tiles
Check the tiles are neither white nor invalid

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I08eb181ceea6d9e55ee31b564be56aff2fc5b56e
2021-07-06 12:54:55 +03:00
Rash419 70afec5bfb cypress:added table_operation tests for writer and impress
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ife9398bc6b2fe92aafe9df3b26a99c47b04f8a16
2021-06-22 13:15:32 +05:30
Rash419 02c28640bb cypress:added cell_apearance_spec for desktop classic and NB calc
loleaflet: fix NB bug where tooltip doesnot disappear on click in some buttons

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I2ccb653d18e6b0ab5f0bcd3aadb36f52a718aaa3
2021-06-21 17:59:53 +05:30
Rash419 e6561ff816 cypress:added image_operation_spec for calc and slide_operation_spec for mobile
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I73032d2e855ddb5500867f1ec5fd7948d7798e5c
2021-06-07 14:39:28 +05:30
Rash419 68509f36ce cypress:added font spec for desktop writer,impress,calc
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iecd6671be39cd686f47129cde936b705a411f122
2021-06-05 12:35:23 +05:30
Rash419 75e2bffb3d cypress:paragraph properties spec for impress and writer desktop
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I512e3472b07b0deaf08802fda7d6cbfa09e29ecd
2021-05-25 16:53:22 +05:30
Rash419 6ffef3a7fc cypress:added searchbar spec for desktop impress,writer,calc
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If4a23c069c4fce9106b66fbb987f34cfddbb26f9
2021-05-24 16:41:24 +05:30
Rash419 c961e73f10 cypress: added delete-objects test
added id field in table option of menubar and moved _refreshRowColumnHeaders to canvastilelayer from calctilelayer

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia2e492cb6edcd65ba2444da34795fe367b25e887
2021-05-24 15:54:31 +05:30
Rash419 a01e5fb4d8 fix:cypress failing randomly on master
when two or more tests share the same document one or both the test are failing

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I638a76f8f98eff019a298bcafcbe89155442bcde
2021-05-06 19:58:10 +05:30
Rash419 eaa4f29ebf fix:focus_spec failing in CI
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I9560ecde57faa194129dc1ad699745cb65582d3d
2021-04-30 16:51:56 +05:30
Marco Cecchetti 3317f6fe3e cypress tests for fullscreen presentation
Set up support for performing end-to-end tests on the fullscreen
presentation.

Added 2 tests:

1 - check text fields (slide number, slide name) are correct for the
current slide

2 - check the background for current slide is referenced correctly

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: If8d3cda49254a910aa0c5d2d672834aa5b029e0b
2021-04-14 15:02:48 +02:00