Commit graph

1191 commits

Author SHA1 Message Date
Caolán McNamara
70a89a4d43 allow a test to start without sidebar
instead of starting with sidebar and then removing it

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If2ea433cd3d5fc18ad549bd3df095de15c126ad0
2024-05-08 21:04:48 +01:00
Caolán McNamara
e40bcccc4f update impress/apply_font_shape_spec.js to pass
probably since merge of

commit 5140abd2c94b96f2a32f0f7416ae79239a2af187
Date:   Fri May 3 14:14:26 2024 +0500

    tdf#152906: use correct Y offset

or similar of that topic

change 3285 to 3286

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4bd3509313c7a5801d5284eebc3882bf3550eed9
2024-05-08 18:53:46 +02:00
Neil Guertin
c54683f349 Fix failing test mobile/writer/table_properties_spec.js
Was failing in moveCursor after slowdown introduced by
https://git.libreoffice.org/core/+/ca31493a
Rewrote test to use the same select helper as all the other
tests in the file

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5197a095d47e727526636b232df1f3be45e5bb52
2024-05-08 10:58:17 +02:00
Neil Guertin
ec83c14f3d Fix failing test desktop/writer/top_toolbar_spec.js
Follow up of be235b1386

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Idab5a5bac4ac15aa0e13a2d660271a305fad945a
2024-05-08 08:06:51 +02:00
Neil Guertin
be235b1386 Fix failing test desktop/writer/top_toolbar_spec.js
Remove scrolling to get to toolbar buttons
Add test specifically for scrolling

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I885d3ec33c8d570dfad45893c5d267b7fe8cc0b9
2024-05-07 16:00:44 -04:00
Szymon Kłos
57e14eb6ce cypress: fix assertion in jsdialog test
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I07964dda90a89c2560df6e5d7e8c3b6f38551164
2024-05-05 20:04:55 +02:00
Neil Guertin
ced7998b1b Fix mobile/writer/table_properties_spec.js
Wait for table select to fix copy/paste issue

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5d564c062f5c8f5616997cd49222d39f47baa260
2024-05-02 08:48:19 +02: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
Neil Guertin
190a3acf78 Cypress: Fix mobile/impress/apply_font_text_spec.js
Failed because mobile wizard opened too soon.
Fix: Wait for selection before opening mobile wizard.

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ie29e3f5be17bafa2dd09b3f8f5b6415104456cb7
2024-04-27 01:37:10 -04:00
Neil Guertin
c44bcb2980 Cypress: Join subFolder and fileName into filePath
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I361d523f564e7b9a46dd2398080eef110eeae79c
2024-04-26 21:10:39 -04:00
Neil Guertin
ed731b7091 Cypress: Retry selectTextOfShape
Most users of selectTextOfShape also need to select all text.
Sometimes the cursor appears but does not allow CTRL+a to select
all text. Work around this by including the selection in the retry
using waitUntil.

Fixes mobile/impress/apply_paragraph_props_text_spec.js, which started
failing sporadically after commit e0a0646ce1.

I also adjusted the dblclick selector because it was finding multiple
elements but I think that is unrelated

I also created a separate function editTextInShape, for tests
that do not need to select all text

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Icdfa731ba9a5f8d08a858192a4f1f5bc79b09b76
2024-04-26 17:35:05 -04: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
Miklos Vajna
24109be2e3 cool#8648 clipboard: fix idle tests
This is not part of CI at the moment, so I didn't notice it till Szymon
pointed it out.

	make -C cypress_test check-idle spec=calc/idle_spec.js

passes with this, which is the only suite in 'make check-idle'.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ieeb15653abcc016bc7de87115df136dfe3f27d0d
2024-04-25 15:09:51 +02:00
Miklos Vajna
fa6d8f6dde cool#8806 clipboard: improve detection of HTML that's just an image
Copy an image in Firefox, paste in Chrome with the Paste button or with
Ctrl-V. Nothing happens in Calc, Writer gives you a popup to copy the
image, which is already the case.

What happens is that Clipboard.js already had some code to guess when
the HTML only contains an image, but while Chrome puts '<img ...' to the
clipboard, Firefox puts '<meta ...><img ...', so we don't recognize the
content as image.

Fix the problem by adding a new isHtmlImage() function to Clipboard.js
that handles both markups and use it from both places that deal with
paste (Paste button, keyboard).

Note that this manual parsing is needed, because the input is user
provided, so DOMParser or innerHTML would not be safe.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia1340cd3777c5597e3fd257e905e9cc637802bcc
2024-04-25 08:33:49 +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
Szymon Kłos
f00176aabe remove-w2ui: replace w2ui-scroll-wrapper
And add self made ui-scroll-reight/left items with
primary color tiangle. We should replace it at some
point with something more pretty.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I67530c6352b8356214399f324b55bbf9bc24f876
2024-04-24 10:57:31 +01:00
Miklos Vajna
28e51d58f4 cool#8648 clipboard: stop fetching the clipboard on text selection create in tests
This was just a workaround to keep tests working till they are fixed to
not assume we do an implicit 'copy' as soon as we have a text selection.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I37d16ee2841c41593a5af2fb6ceba025fe1c79e0
2024-04-23 14:17:10 +01:00
Miklos Vajna
9b95bf829f cool#8648 clipboard: fix mobile/writer/table_properties_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I359fa602523052940879ce749624ee63086554c1
2024-04-23 08:06:01 +02:00
Miklos Vajna
82dc3e1a46 cool#8648 clipboard: fix mobile/writer/track_changes_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: If9371a3d235a0ee6c006be72dabe40242fa46b2b
2024-04-23 08:06:01 +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
Pranam Lashkari
9981260b68 cypress: added test for collapsed autosaved comment indication
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4e6929a074e750041a1814629317baf0433eaab0
2024-04-22 14:43:08 +01:00
Darshan-upadhyay1110
89a7742206 Add color image preview in autofilter dialog for filter by color option
- it's not user friendly to just see color code with a radio button.
- this patch will show color image preview for filter by color options according to the color code
- it will applied only for dialogs with filter using color codes in `Autofilter`

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ifc67a2692df5c9b5c332c8a15d5ad92cde4f4bf8
2024-04-22 14:14:58 +02:00
Miklos Vajna
a91036247b cool#8648 clipboard: fix mobile/impress/insertion_wizard_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I01a3ac4e843c69f6e91f650f33b8066161e73e68
2024-04-22 08:43:40 +01:00
Miklos Vajna
ad22a9f017 cool#8648 clipboard: fix mobile/writer/insert_formatting_mark_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I302edb920801895f1a728313b5e9a9405ec7d396
2024-04-22 08:43:40 +01:00
Miklos Vajna
9cca40deda cool#8648 clipboard: fix mobile/writer/delete_objects_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic4a57aede4f0bca397868a80303df8d124e31ba4
2024-04-22 08:43:40 +01:00
Miklos Vajna
a2db31f437 cool#8648 clipboard: fix mobile/writer/apply_font_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7cfe6a9245f0397a580cd4375836ff042a5751db
2024-04-22 08:43:40 +01:00
Miklos Vajna
04a6af39cf cool#8648 clipboard: fix mobile/impress/spellchecking_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7490be48e86f73d36e98cbea76b10f98d87aeede
2024-04-22 08:43:40 +01:00
Pedro Pinto Silva
0bc4daa15c Writer, Impress Home tab: Promote insert annotation to bigtoolitem
- Promote to big button
  - Use the same from the previous position to make the whole tab more
  - compact by changing the insert image to a simple toolitem
- Change location in the home tab so it's easier to reach and it's
more consistent between writer and impress
- Use the same accesskey (accessibility, aka shortcut) between both apps

Cypress top_toolbar_spec.js needed to be updated to make sure scroll
indicator do not cover when attempting to access it

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0b3f3b83772317263c9d5d3d0e7f35d831eaa1ed
2024-04-19 14:03:36 +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
Neil Guertin
85024eeb99 Remove clickOnIdle and inputOnIdle
Replace helper.clickOnIdle(selector) with cy.cGet(selector).click()
Replace helper.inputOnIdle(selector,text) with
helper.typeIntoInputField(selector,text)

Also replaced waits before clicks with a disabled check

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I2db36737e61271285cd474c1ffd549d285286133
2024-04-19 08:21:50 -04:00
Miklos Vajna
1dc4bae0c9 cool#8648 clipboard: fix mobile/impress/insertion_wizard_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I640d913d7ed5069c002b0a9376b6208ac42908a2
2024-04-19 09:42:39 +01:00
Miklos Vajna
ad737657c6 cool#8648 clipboard: fix mobile/impress/impress_focus_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I62b809a1326c0516120076acd2dbaca8469a11bc
2024-04-19 09:42:39 +01:00
Miklos Vajna
027a87157b cool#8648 clipboard: fix mobile/impress/delete_objects_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8ba49faa7eb5926993111d03a961f750174d3bea
2024-04-19 09:42:39 +01:00
Miklos Vajna
283b5a1637 cool#8648 clipboard: fix mobile/calc/spellchecking_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8cc3d77a42d66c80882e44f5cd09ac88f53dfa9c
2024-04-19 09:42:39 +01:00
Miklos Vajna
9ea5add217 cool#8648 clipboard: fix mobile/calc/searchbar_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I74f253bb7df509c731a6b3bb22a077e1142e4580
2024-04-19 09:42:39 +01:00
Caolán McNamara
b95395434e if a sheet is removed or moved, re-request comment positions
a problem since:

commit 72b2ce4bb6
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Wed Oct 25 19:19:08 2023 +0100
    we don't need to round-trip through core to reposition notes

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If00ae17a8e80ca3f8d2a530efa6cdba90207be56
2024-04-18 17:08:28 +02:00
Caolán McNamara
06a6059235 move these common calc annotation test blocks to calcHelper
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia67e29e447b333f4dfdfe25ec717cbdfc6dce043
2024-04-18 17:08:28 +02:00
Gökay Şatır
9eeed4d950 Add splitCoordinate to global variables.
Fix getViewRectangles function - it's used now.
Remove "_cellCursor" usage from CalcTileLayer.
Modify tests for the new changes.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ia5ec5a6e89d7d64df2041112936a16ec06c4da93
2024-04-18 16:30:27 +03:00
Neil Guertin
908e766282 Fix failing test desktop/calc/top_toolbar_spec.js
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I02944fb4c72bfd19fdeedb944e235633c33021b8
2024-04-18 08:51:42 -04:00
Miklos Vajna
3a1dd02dd1 cool#8648 clipboard: fix mobile/calc/insertion_wizard_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I6d8f5429fafa77cc4e3019878c0791555225abd0
2024-04-18 10:14:36 +01:00
Miklos Vajna
a12bcd3fb0 cool#8648 clipboard: fix mobile/calc/delete_objects_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id6e1e2099273d22f9ae9718e18c70afbc27e64e7
2024-04-18 10:14:36 +01:00
Miklos Vajna
2b37f2113f cool#8648 clipboard: fix mobile/calc/cell_appearance_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I72fca080c13b4d0954ba3fff67faaa6a4927ba3e
2024-04-18 10:14:36 +01:00
Miklos Vajna
a5d05f2364 cool#8648 clipboard: fix mobile/calc/bottom_toolbar_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ie60c7a27d88a47f00c9b793a48d4c8e533ac32d2
2024-04-18 10:14:36 +01:00
Miklos Vajna
0c21b6e833 cool#8648 clipboard: fix mobile/calc/autofilter_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: If5ecd80c5b16f8f5f3f1154de6d42ca0cd803773
2024-04-18 10:14:36 +01: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
Neil Guertin
422df9d8ef Remove extra timeout for closing document
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I4c92893fb55c8884d0b0f417806686c0a6b9bbae
2024-04-17 11:08:56 +02:00
Neil Guertin
cb5528c01c Remove noise from logs in closeDocument
Query included the header of the table, which was then
printed in the logs including lots of whitespace noise

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I361f60c9b42972f580ccb10986dd4b3b9400ca0c
2024-04-17 11:08:56 +02:00
Neil Guertin
4e9bb9eba4 Remove wait and skip of close document for failed tests
The bug referenced has been fixed for a long time
so the workaround is no longer necessary

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ifac6555c711a0f142dd5d00ba4f4133dd4aece9f
2024-04-17 11:08:56 +02:00