Commit graph

92 commits

Author SHA1 Message Date
Gökay Şatır
9932ad7516 Remove unused files, variables and functions.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I2a3d802905705775ce58266a57d0d50149cf3bfa
2024-07-11 12:54:25 +03:00
Neil Guertin
5b126820d2 Fix failing test multiuser/writer/annotation_spec.js
Increased wait before inserting comment
Wait was added in a5e6a81cdd

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia2aa4c901fc57d6700b43c7e0db0380055877081
2024-06-26 16:27:09 +02:00
Szymon Kłos
df158a918a calc: don't jump to own cursor if not looking
If we have cell selected on the bottom of the sheet and
we scroll up to watch something else so we don't see the
cursor: if other user will add row above - we will jump
to our own cursor. It's because it changed the address:
like A500 to A5001.

Let's use "following off" mode to avoid that.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7908dba5c3ae8d18d9f9478d038212eaf91187cf
2024-06-21 14:34:16 +02:00
Gökay Şatır
bbb1af4c98 Fix multi-user tests.
Disable some lines for now.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ib27bc79c574e7b5dfe9360b82705942d116da763
2024-06-21 14:56:40 +03:00
Gökay Şatır
2502c9c397 Cypress changes.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ief91f61ba67868d12612267fe9c265dd67fb6fb0
2024-06-21 14:56:40 +03:00
Darshan-upadhyay1110
b6122e0f37 Change get by ID value in all cypress_test
-  according to previous change(commit) we need to adjust ID in cypress test files

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ic5510392b101ff7c7daa28719a60963c7bb2c743
2024-04-30 14:54:21 +02:00
Caolán McNamara
a327d3ec83 do invalidation tests without spellchecking
which may kick in at an arbitrary point. We shouldn't invalidate if
there is no change, but that's a TODO.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I910c96f2c2a0efab393ccea52c9f25d5804cd967
2024-04-25 20:00:18 +01:00
Neil Guertin
4f01c7e4de Cypress: Remove beforeAll and rewrite document loading helpers
New helpers setupDocument, loadDocument, reloadDocument
Clean up beforeEach functions
Replace most calls to beforeAll with setupAndLoadDocument
Replace calls to reload with reloadDocument

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I12307f93c8a418e6f55bb36b8afe340d7841b726
2024-04-25 07:37:56 +02:00
Neil Guertin
dfa13bfe62 Replace beforeAll with setupAndLoadDocument
Replace beforeAll in most tests with new helper function
Tests that need to close or reopen test files cannot use
the new function and will be updated later

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I372280e55993123fc26f83cb2e6e6e78665a6846
2024-04-25 07:37:56 +02:00
Neil Guertin
7cc0c1996e Cypress: Remove afterEach/afterAll
Cypress recommends NOT cleaning up after tests
  https://docs.cypress.io/guides/references/best-practices#Using-after-Or-afterEach-Hooks
Open documents should not affect other tests
Files will be closed automatically by the server anyways
Tests with more strict requirements can explicitly close
  documents before, during, or after those tests
This is necessary to support beforeAll cleanup
Half of tests were verifying the wrong filename was closed anyways

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Iab458963a3fbfe87f732dc97140704c2d0ef53d4
2024-04-25 07:37:56 +02:00
Pranam Lashkari
5525ffab36 annotation: refectored reply node count code
now reply count node  multipurpose, it also indicates
if a comment which was being edited is collapsed

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I18a676885deea0afa30eb20505a76239e11c5493
2024-04-22 14:43:08 +01:00
Neil Guertin
a5e6a81cdd Fix failing cypress test multiuser/writer/annotation_spec.js
Fixes for several sporadic issues, each uncovering the next
Sidebar was not getting hidden because the button was pressed too soon
 - Wait for sidebar to show before hiding it
Comment text area was disabled
 - Wait for disabled attribute to go away
Second half of comment text was getting sent to document instead of comment
 - Wait after typing in document before inserting comment

Also add wrapper describe block to share setup/teardown
 - Fixes copy/paste errors in one block, which was missing
   calls to selectZoomLevel and setActiveFrame

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I13ef1189cfacc4beac0b2c3363c70aa1e8583db3
2024-04-19 08:21:57 -04:00
Szymon Kłos
c7dd10a877 statusbar: better strings formatting
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7c5d5cbd2e36e6391610f8d4b18a87bf32c9dde2
2024-04-18 08:00:15 +01:00
Caolán McNamara
e3d5c168c1 try adding {force: true} to leaflet-layer clicks
error is:

1) Joining a document should not trigger an invalidation
       Join after document save and modify:
     CypressError: Timed out retrying after 10050ms: `cy.click()` failed because this element:

`<div class="leaflet-layer" style="position: absolute; width: 642px; height: 484px;"></div>`

is being covered by another element:

`<div class="jsdialog ui-button-box end" id="">...</div>`

Fix this problem, or use {force: true} to disable error checking.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8b0dde030b2aadf554db75872facb6c5c96a321c
2024-04-16 13:22:56 +02:00
Szymon Kłos
f8d457cb62 remove-w2ui: convert mobile bottom bar to JSDialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1e86d91282d15c6ed055f9a74808cd3158ff08de
2024-04-04 13:43:35 +02:00
Szymon Kłos
f2e9dee701 cypress: fix multiuser tests after w2ui removing
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I53c5ed04a3ba3f63ebbca8f2322e34cf8f707a04
2024-03-29 21:55:23 +01:00
Szymon Kłos
6a452d9023 remove-w2ui: convert status bar to JSDialog
- move plain html controls into HTMLContent widget
- reuse scrollable bar from notebookbar
- use dynamically loaded menu entries in MenuButton
- allow to update MenuButton which contains menu id in the id

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2b77479520c03420fefeb32dd09d6b34279e5686
2024-03-29 01:40:29 +01:00
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
Neil Guertin
786ad1c84b Rewrite desktopHelper.insertComment()
Replace four helper functions (insertMultipleComment setupUIforCommentInsert
createComment saveComment) with one (insertComment)
Simplify code flow
Remove unneeded docType conditionals
Remove unneded identical arguments from every call
Add more relevant assertions
Use force click to remove extra toolbar clicks

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia4bc4ac964fd0ee754a481843d55682b87b63086
2024-03-25 09:31:27 -04:00
Neil Guertin
1dbed001b6 Fix click in impress annotation tests
There are now two .avatar-img elements after recent user list changes

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia229422b4dc3e90ede240e36927b4615091cb97d
2024-03-06 15:08:29 +00:00
Neil Guertin
962331a1bb Replace assertDataClipboardTable with assertSheetContents
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ic1f7cf6e41b7841a8a11ce0a5d23bdc6d7baf9b8
2024-02-22 09:24:59 -05:00
Szymon Kłos
f623c6edb3 cypress: adjust to simplified notebookbar structure
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8748b333354abe2f5f75fb081915f6558243587
2024-01-30 07:17:32 +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
Neil Guertin
7fcb928503 Fix failing test multiuser/writer/invalidations_spec.js
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: If34a07e6a70f2c4293e8a2eb9d5e3d5fd14258ac
2024-01-10 18:18:55 +03:00
Neil Guertin
0dad48ad18 Fix failing test multiuser/writer/annotation_spec.js
Wait for animation after annotation save

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Id1be5607e15ac23596e527c3e27fca83c91ee380
2024-01-09 07:58:12 -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
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
Gökay Şatır
71fe95eb92 Skip multi-user tests for now.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ie747587e9589872bc99be9bb4204cd11803aaac1
2023-05-15 16:34:29 +03:00
Gökay Şatır
ff02dc7381 Skip some tests for now.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Idb21db8f295c960b7bed64372060d1590ec1da35
2023-05-08 14:54:31 +03:00
Gökay Şatır
a6e6add60f Add multiuser tags for relevant tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ib7a45673fb17e2ebe9b62925618db1a32d360e3a
2023-05-05 07:07:14 +03:00
Gökay Şatır
cf24f725e2 Update multi-user tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I75125728e20bee789fce085c31d93b7650312eec
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
2023-05-05 07:07:14 +03:00
Gökay Şatır
fe1b57c328 Remove vex from delete sheet modal.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I605104e16ab02d106717319e4a9bff537db13e3c
2023-03-09 10:38:51 +03:00
Skyler Grey
fd0c49a0be Make the repair document dialog into a JSDialog
- The repair document dialog is a leaflet dialog
- As this dialog is online-side only, I'll use the JSDialog builder
  directly rather than writing a UI file
- Most of the code to build the dialogs is already very adaptable from
  looking at the protocol of existing JSDialogs that come from the
  server & where the code goes, however a small change had to be made to
  dialog modifications to allow us a callback function, as otherwise we
  would send off to the server whenever we pressed on a list item
- Finally, if there's no list to show, we'll show a bit of text saying
  that there's nothing, as otherwise it looks like an empty/broken dialog
- If we're on mobile, we'll need to use the alternative helper (the one
  that handles mobile wizard building)
- Fix a cypress test for writer (although impress and calc seem to have
  tests for this too that aren't implemented: this should be handled in
  a follow-up PR)
- Fix mobile tests

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Iab9e943a428e66b05e28819c2ee1001a2deffd2c
2022-09-08 12:52:19 +05:30
Pedro Pinto Silva
1a29f1004a Don't use vex btn default btn CSS classes (rename)
By Renaming .vex-dialog-button-primary -> .button-primary and
.vex-dialog-button-secondary -> .button-secondary

- So we can remove duplicity on CSS buttons
- Easier to set vex primary and secondary button to use our css classes
- This way there is no need to hunt those specific cases down.
- Update cypress tests

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I82f4b33560367805eeeeb5aec9af8d1abd313788
2022-09-06 17:01:21 +02:00
Szymon Kłos
63f718e35e cypress: allow correct plain text clipboard formatting
Our plain text clipboard output generated additional newlines
at the beginning of every paragraph. To fix that we need
fix in core side which now fails due to expected bad format in cypress.
This is interim state where we accept both old and new format.

see for reference: https://gerrit.libreoffice.org/c/core/+/136893
lok: don't pretty print html for online
Change-Id: I2b17d62398d947fcf1d3fb1ed6005c3063d114f2

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I70fa8be619a62709d6e5ada32b7a670f90d7b2bf
2022-07-08 18:04:15 +05:30
Rash419
111d5f5483 cypress: fix: inconsistent text wrapping tests in calc
removed unnecessary 'retries' parameters from the tests we already
have default global value for retries no need for specific tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Idc78831ce240d4d840f3dbc785e66165c6e07d3d
2022-01-25 09:58:35 +05:30
Rash419
0bc12a5409 cypress: give each multiuser test unique document
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia46d0538430010e30649af76cb46846c90de8c1f
2022-01-11 09:28:03 +01:00
Rash419
cc429f78e9 cypress:disable repair_document_spec.js temporarily
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I02b42b8943ecfedb5a950d062a0fef2a7e3f3e6b
2021-12-17 11:07:21 +01:00
Rash419
4043b76325 cypress:added retries parameter in some fragile tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia99f75302a988fc2ef744807e01ba6441ff161ec
2021-12-16 13:25:40 +01:00
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
3caec5a43e cypress: enabled and updated all undo-redo and repair document changes for writer according to core changes
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If9de2d0ffb6194a983981a31eac5421a80ff3e57
2021-11-27 15:57:40 +05:30
Rash419
6b4dc708ad cypress: disable all writer undo-redo and repair document specs temporarily
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I1870ba3d9111694e2df756bd9a5b06c54aa8aab3
2021-11-09 17:12:58 +01:00
Rash419
05552c3d99 cypress: fix: unstable delete_objects, sheet_operation, sidebar tests
cypress: skip: failing multiuser/writer/track_changes_spec.js due to bug

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iff736140cb7331d29ab0462a8a542559e98b48af
2021-10-29 17:17:44 +05:30
Rash419
46cbc58c8d cypress: disable tests multiuser and writer
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ibcf0cdb6ce86671e379c5b6d4df8f96a3e10434c
2021-10-28 09:52:26 +05:30
Rash419
2460f0d162 cypress: fix: close sidebar so elements don't overlap
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iab554b3866edb4dec0c42f501b9d62e2b5369929
2021-10-25 19:28:27 +05:30
Tomaž Vajngerl
23a3958b24 fix repair_doc cypress test to reflect text edit undo changes
Undo/redo behavior changed in core so that text editing has its
own undo/redo stack and the change is applied to the document
stack when text edit mode ends. This test has been changed to
reflect the undo/redo behavior change in the core.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I6cf427a279aefb79f2f331357731a32c0296c0cd
2021-10-23 11:20:22 +02:00
Rash419
5a0738ff0a cypress:fix: unstable calc/repair_document_spec.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I1e0f02e380589058a2631c7a40cdd7f63987831d
2021-10-05 13:45:58 +05:30
Rash419
02e774f381 cypress: fix: unstable calc/repair_document_spec.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ibec3df9ec8fe08143f0ed2206140a5b1655438c0
2021-08-27 15:31:52 +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