Commit graph

401 commits

Author SHA1 Message Date
Pranam Lashkari
9e2b9f8972 cypress: modified annotation tests to work with comment wizard
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I25ff9c590aa12d1787d8966cc4f68151ed8d505f
2021-01-01 13:18:10 +01:00
Tamás Zolnai
dd22bde4d9 cypress: php-proxy: this workaround is not needed anymore.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2d74a30aa177051a0faf4c8f946779c2389a8d34
2020-12-31 18:53:26 +01:00
Tamás Zolnai
ae7e93144f update cypress: 5.6.0 -> 6.1.0.
Test code needs an update because .should('not.be.visible')
does not pass on non existing elements anymore.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If8a89d2996d154d287672dacb3668ec5399d99f2
2020-12-30 19:49:42 +01:00
Tamás Zolnai
8db4b19469 cypress: move includes of 3rd-party packages to support file.
Now we handle support file better for parallel test run too:
a13b1a93bc

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I4a88f815ddb1c4d79042134cc07e0c418d4ea10f
2020-12-28 15:11:06 +01:00
Pranam Lashkari
182515dcbf leaflet: open comment wizard on comment insertion
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I90bb301c35ba6d52c26a22dd0b686961b94181fd
2020-12-15 23:06:44 +05:30
Tamás Zolnai
8b815908c9 cypress: import 3rd-party packages everywhere they are used.
I see some random test failures:
"An uncaught error was detected outside of a test:
SyntaxError: The following error originated from your test code, not from Cypress.

> Invalid or unexpected token"

There is no backtrace or code pointer or anything to find out
what is the actual problem, but it might be related the missing
import of 3rd-party code.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ia2243852e825eee18c226d89fd17e92960daa129
2020-12-15 18:23:20 +01:00
Tamás Zolnai
2ab7c60743 cypress: make 'Merge cells.' test case more stable.
We need to wait until the layout change changes also
the cursor position, and then we can select the
table.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id66606e0992f3b298f656567d38753263ef29ab5
2020-12-14 17:38:03 +01:00
Tamás Zolnai
12f0e2cd31 cypress: use moveCursor method for table selection.
moveCursor follows the event-indicator rule,
which makes it more stable.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ief6e6c4d3a058c95652113229fd0ecbb65fb3e48
2020-12-14 17:38:03 +01:00
Tamás Zolnai
98146288ca cypress: improve moveCursor helper method.
Add a modifier parameter, so we can easily extend this
code with 'shift' modifier later.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I820c2c89838ba2a367d561e362d3c04f8487022e
2020-12-14 17:38:03 +01:00
Tamás Zolnai
b5d5129f0d cypress: add text cursor tests for Writer (mobile).
I've seen some inconsistencies related to cursor
movements in the existing cypress tests. I added
these tests which checks cursor behavior directly,
which might help to find out the issue with cursor
handling.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If158ccef359bb28ade8d7336594fdafdd46868f4
2020-12-14 17:38:03 +01:00
Tamás Zolnai
cb662aab1f cypress: let's be more specific here about which selection marker we have here.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I965819fa4f5cf7b299dfd411a44fef6e267db250
2020-12-08 20:21:36 +01:00
Tamás Zolnai
c2d41174f6 cypress: remove some unneeded assertions related to cell selection.
The visibility of the selection marker is already checked
by clickOnFirstCell() method.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I5bf258b7c912ff1730b6d26900563ad8b454106f
2020-12-08 20:21:36 +01:00
Tamás Zolnai
963f97349f cypress: add helper methods for text selection.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id799c5389adb518e42aac7c5838e27405d4ecb1f
2020-12-08 20:21:36 +01:00
Tamás Zolnai
d7bb312776 cypress: use moveCursor() helper method in table tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic24458ca4aa32c3a883e6cfc018ca0429071cb43
2020-12-08 13:46:40 +01:00
Tamás Zolnai
35fe0b9541 cypress: remove these useless lines of code.
It does not actually do anything. Font size is not
stored as a 'font-color' attribute.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8e39a7c1064bce386c85ff21811fc6f95253adc0
2020-12-08 13:46:40 +01:00
Tamás Zolnai
4950ca4197 Revert "cypress: use moveCursor() helper method in table tests."
This reverts commit e1ed5d3c299f2664d108375a5ea3cb90814556a4.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I9684921837ed6f55a74fb45750bff6c890996a59
2020-12-04 23:10:56 +01:00
Tamás Zolnai
337e570d1c cypress: use moveCursor() helper method in table tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Iace8fab305bba260c19d8fc7086caa24d20f6782
2020-12-04 16:33:26 +01:00
Tamás Zolnai
0c08b6dad0 cypress: php-proxy: reenable table related tests.
There was an issue about tile invalidation related to
Writer tables. This was fixed in the meantime, so we can
enable table tests. I added an additional fix for
these tests to make it work with php-proxy too.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id3f8288b65e597a49f0a45c8d106d5ed9f6ead46
2020-12-03 14:56:19 +01:00
Tamás Zolnai
e631406805 cypress: make sure the cursor is visible after step into editing mode.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ia30f6fe79c3318c2663d8da1d3d197fb936b0088
2020-11-30 15:23:18 +01:00
Pranam Lashkari
1c1274a5fd cypress: disabled annotation/comment tests
mobile tests annotation tests do not work with new comment wizard
tests needs to be rewritten so temporarily disabled tests

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I66e8f88cdbf921060af083e84d73b372e03f8dda
2020-11-30 06:31:15 +01:00
Tamás Zolnai
94c7c23f31 cypress: don't use togglemergecells as an indicator here.
It's state is inconsitent and so it fails randomly.

Change-Id: Icd84d618fc87e64228918ad2e6e1ac602eac0e05
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-26 14:48:24 +01:00
Tamás Zolnai
33c3e062f1 cypress: fix-up some writer tests.
It's not consistent, that we have a cursor
after stepping into editing mode.

Change-Id: I316c2399776535aaa12a40edb4686a9b02c16c4a
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-25 18:04:49 +01:00
Tamás Zolnai
797139ed0f cypress: extract selectListBoxItem2() method.
Change-Id: I3be28686d19c5bc174b1a2f83fe9a849239756b2
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 14:05:12 +01:00
Tamás Zolnai
8f9f044865 cypress: extract selectListBoxItem() method.
Change-Id: I4dcc1d77f20955ee9bd425d447a3fb77f1a423f5
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 14:05:12 +01:00
Tamás Zolnai
c8166c3a04 cypress: simplify these border tests.
Change-Id: I43ba769f9952c8286a0c190342d382359d23c703
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 14:05:12 +01:00
Tamás Zolnai
3b9e202213 cypress: selectAllMobile() -> selectEntireSheet().
It was a mobile only helper method originally
and I forgot to update the name when moved in
into a bigger scope.

Change-Id: I818cbebadba4152afb8e0261015734a232b0e211
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 12:04:22 +01:00
Tamás Zolnai
c91ca12d71 cypress: this wait() is not needed anymore.
Calc helper methods were improved in the
meantime.

Change-Id: I9c464cd9d23ce4a70fa63d376619458f38cc1389
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 12:04:22 +01:00
Tamás Zolnai
7dfe079903 cypress: update this formulabar test.
To make it more stable.

Change-Id: Ib9c8878bdf266733ec03eb3ba018035b115c7f7d
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-17 17:37:14 +01:00
Tamás Zolnai
3f4468a497 cypress: merge some selection helper methods.
To reuse as much code as we can. We can use the same
method on mobile and on desktop.

Change-Id: I15b1038313145db6cb6ea07489c0d30a0fc2ce64
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 17:50:15 +01:00
Tamás Zolnai
e8e9ed8c50 cypress: update this comment modification test.
To make it more stable.

Change-Id: Ib8731df9d29fafe568e6e7124ed8d17c315831b6
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 12:40:18 +01:00
Tamás Zolnai
6fa042da32 cypress: rework formulabar related tests.
To make them more stable. I used tc tool to
simulate network delay to find issues with
the test code.

Change-Id: I9a67a2650fc08e573323b1df96b940318b4a45cb
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 12:40:18 +01:00
Tamás Zolnai
8f2df4a0a5 cypress: rework some calc tests.
Simplified getTextPosForFirstCell() method and
renamed to better match with the function.
Also modified getCursorPos() method. Sometimes
we have an additional hidden text cursor for
formulabar.

Change-Id: Ia8adc645ef3f20426dd509803fcfc4f35662a779
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 02:30:16 +01:00
Tamás Zolnai
2c338ef7e2 cypress: this test is unstable recently.
Needs some rework.

Change-Id: Ied3008463e9a7210a400702a0331ab7f09139ed3
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-14 12:24:36 +01:00
Tamás Zolnai
1a6fc4ca05 cypress: disable these unstable tests for now.
Change-Id: I99f166933ddbaf899d2d4fffd218f2824e3adf52
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 23:17:06 +01:00
Tamás Zolnai
2aa37cbaf4 cypress: do not run afterAll method in case of failure.
After a test failure, it's common, that the afterAll
method also fails which covers the right error
message and also makes the following tests to be ignored.

Change-Id: I5c1bbc5dd8b1b48dd2a8f1fc20a8ca3b8ecd8462
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 11:57:23 +01:00
Tamás Zolnai
eb4a36c1ec cypress: NC: disable revision history tests for now.
In CI environment this does not work. I'll need to find out
how to make this tests work there too.

Change-Id: If9780796b52aa27fd18d72cc3bf786ab46865e4a
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-11 12:25:56 +01:00
Tamás Zolnai
7cc571be5a cypress: merge left/right alignment tests.
To avoid code duplication.

Change-Id: I23af599925e91addef604474841b597ed26b9dfa
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-10 13:57:31 +01:00
Tamás Zolnai
4aa3e79ad9 cypress: php-proxy: fix page setup tests.
With php-proxy the timings are a bit different.
We need to make sure that the mobile wizard is
already in the right state to close it.

Change-Id: I4d5c26400c301a0c51622bd799c49ed7d04d1478
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-09 21:56:09 +01:00
Tamás Zolnai
2d02cf5cc6 cypress: move all Impress related helper methods into a bigger scope.
Change-Id: I6ab06a9c737258afc11e4fcecc91bc678940cd0f
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-06 14:51:21 +01:00
Tamás Zolnai
8922df60be cypress: move some Impress related helper methods to a bigger scope.
We will need these methods in desktop tests too.

Change-Id: I302cb0b57fee8b15fbe0804dec14646cb11f0f2f
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-06 13:13:02 +01:00
Tamás Zolnai
0460c683c3 cypress: NC: fix page setup tests.
Change-Id: Ic292be4a5f692ae0c6d2dd10884bbc72553be00c
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-05 12:24:59 +01:00
Tamás Zolnai
e30caa8053 cypress: NC: fix slide insertion test.
In an iframe context 'not.exist' check does not
work correctly.

Change-Id: Ie522fd02ac5151fec401f49a8b80a64edbbbeb1b
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-05 12:24:59 +01:00
Tamás Zolnai
f8b46ffa6b cypress: fix syntax error in selector.
Suprisingly the tests were not failing on this.
It might be an issue in cypress itself.

Change-Id: I27f6bc93a5a2880a00bfd1e0a0ced3e0b7b9b97c
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-03 16:06:07 +01:00
Pranam Lashkari
580eecf87d leaflet: fixed DOM leaking on annotation remove in mobile
An extra annotation element was added but never removed
This was not a functional problem
But not a good practice and also made cypress hard to maintain

Change-Id: I53fc7d55154a601c52f89e35b9236f5ae66b46fd
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
2020-11-02 14:42:23 +01:00
Tamás Zolnai
995f454c32 cypress: add tests for search bar in Calc (mobile).
Change-Id: I046b90d021d01ce0bc1c1fc65d3ee435af3ad97f
2020-10-19 18:29:53 +02:00
Tamás Zolnai
e63afd6431 cypress: extract some methods related to search bar.
Change-Id: I3ab9a37c4e34d2504f54c6e50cdadc4ee0433fd1
2020-10-19 18:29:53 +02:00
Tamás Zolnai
6ca5a0cd82 cypress: extract dblclickOnSelectedShape() method.
Change-Id: I0947fe98cb04cd78fed63fe12aafe5198ec2e653
2020-10-19 18:29:53 +02:00
Tamás Zolnai
36ddde6d77 cypress: deduplicate getCursorPos() method.
Move it to general helper file, to make it
available everywhere.

Change-Id: I6fbebfbc4abb1ba894d55fab289cb236185c0693
2020-10-19 18:29:53 +02:00
Tamás Zolnai
f8fd2a365c cypress: add tests for search bar in Impress (mobile).
Change-Id: I8fa9bcd60820fd142ff7f520cbed0bdecc902df9
2020-10-19 18:29:53 +02:00
Tamás Zolnai
7cbdf0fc9a cypress: add tests for search bar in Writer (mobile).
Change-Id: I4d62fdf1f5c79da2bcf1d8c3ceed23f13b696dc7
2020-10-19 18:29:53 +02:00