Commit graph

132 commits

Author SHA1 Message Date
Tamás Zolnai
6aa4cdfece cypress: interfer: save before closing the document.
To avoid issues coming from the delayed autosave.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ib98b35396efb4fdfdf84846dd23619c666accbdb
2021-02-10 16:51:30 +01:00
Tamás Zolnai
c8c96a76f2 cypress: fix some typos in helper method documentation.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I098ee52a5ca03b58399a1c81690b0521f3d91743
2021-02-05 16:38:23 +01:00
Tamás Zolnai
6ba82fa3c0 cypress: split canvasShouldBeFullWhiteOrNot() method.
So we have separate canvasShouldBeFullWhite() and
canvasShouldNotBeFullWhite() methods, which might make
the code more readable, then having it controlled by
a bool parameter.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I0932a7615c84c35293c2cc8dade0db6468de8224
2021-02-05 16:38:23 +01:00
Tamás Zolnai
f4c4b7091a cypress: split imageShouldNotBeFullWhiteOrNot() method.
So we have separate imageShouldBeFullWhite() and
imageShouldNotBeFullWhite() methods, which might make
the code more readable, then having it controlled by
a bool parameter.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2ada6b9e6f6d93b8a48e9ddd3c851ef3e6fcd632
2021-02-05 16:38:23 +01:00
Tamás Zolnai
53642adf96 cypress: remove getLOVersion() method.
By now, we don't run the same online branch against more
core branches, so this code is obsolete.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I90768d16628e735129880cc4cf823bf0b7d9ad1e
2021-02-05 16:38:23 +01:00
Tamás Zolnai
fcaff1a32e cypress: simplify clearAllText() helper method.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I595e3594a9e624249cbb039e509fe12772ef904e
2021-02-05 16:38:23 +01:00
Tamás Zolnai
9ec53994f2 cypress: simplify selectAllText() helper method.
We use this method in various contexts, where it's not
necessary that we have the cursor of the focus. Focus can
be tested in focus related tests.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic27de45917657d4ac1734565d81d5bbf190ad333
2021-02-05 16:38:23 +01:00
Tamás Zolnai
cc37bd5786 cypress: helper: add some documentation to helper methods.
Also do some renaming.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I1796181085ff245090589d3680fa3d90bb085d3f
2021-02-05 16:38:23 +01:00
Tamás Zolnai
3b05151641 cypress: move formulabar related check into beforeAll() helper method.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I46b05c8533b4f323e181d3d4fd2acc1e4626e164
2021-02-01 22:11:32 +01:00
Tamás Zolnai
6d62c32950 cypress: add a selector parameter to cursor related methods.
So we can specify which cursor we need here. The default is
the document cursor, but this methods can be used for
formulabar cursor or dialog cursor too. More cursors might
exists at the same time, that's why simple '.blinking-cursor'
selector does not work.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I1fd04e188ab53e70d0e8303fd7502f183c18bef3
2021-02-01 11:59:43 +01:00
Tamás Zolnai
db0e7e9973 cypress: simplify typeIntoDocument() method.
cy.click() will grab the focus to the textarea.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I20f0df2fd8a31d3ff4b85ba38fdc503c10987dbb
2021-01-13 16:43:35 +01:00
Tamás Zolnai
c29ed235ba cypress: improve moveCursor() helper method.
View also jumps with cursor movement, so we can't be
sure that the vertical/horizontal pozition actually
increase / decrease. Better to test only that the position
was changed.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2358348c3f6d4f2278eff4e2db4a8409bc86b25a
2020-12-31 18:53:26 +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
Tamás Zolnai
e368d04695 cypress: NC: make test retries work.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic8ca85e34de5ee26ee27d24a001de060b6169e86
2020-12-15 15:09: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
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
93403db249 cypress: generalize mobile interference tests for Calc.
Also use a bit longer waiting time for mobile wizard to
become idle. With the interfering user the timing is
a bit different.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I4f24c700cd718bd129b713f2fd12819f92772b64
2020-12-03 14:56:19 +01:00
Tamás Zolnai
52bb718620 cypress: introduce interference testing for mobile tests.
Added `make check-interfer-mobile` command for running
interference tests. Now it works with writer tests.
I'll generalize it later.


Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2181a8653d61cc6ed873e2887a3e42767f46f177
2020-12-01 13:25:20 +01:00
Tamás Zolnai
50df517e65 cypress: NC: these log configs are not necessary anymore.
Change-Id: Iafa7f6f415d336b8b281bd7df528ec4baf2ec2a4
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-19 13:47:24 +01:00
Tamás Zolnai
e066d047ea cypress: NC: improve iframe handling a bit.
Create an alias for the iframes, so we don't need
to find them every time, but we can use the
reference to them. It make the log more clear
and also makes things faster.

Change-Id: I6ca21f951568e46cec3d6a574ce1798b522067ea
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-19 10:07:20 +01:00
Tamás Zolnai
cc85a51eeb cypress: workaround an issue of afterEach() hook.
For some reason, assertions do not work properly
in afterEach hook after a test failure. So in case
of test failure we don't check the admin page,
whether the test file was actually closed, but we
just wait a constant time.

Change-Id: If2eb927b0383816639689ec67eef7e3cd1142366
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 17:50:15 +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
b3ce314264 cypress: skip afterAll() in case of failure for NC only.
Change-Id: I37c13cd9c40fe034236e675fd1ba1ed8f0dea216
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-16 02:30:16 +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
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
d328f930ce cypress: php-proxy: close php-proxy connection by the end of the test.
For some reason if we use proxy.php continuously, then
it will eventually fail on the test. With visiting the
localhost in the afterEach method we can avoid that.

Change-Id: If56c8e40e9e2b9002c1c5b0b91851e4a19a2c9bd
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-12 16:38:11 +01:00
Tamás Zolnai
ccce74796c cypress: NC: close firstrunwizard when subsequentLoad is true.
Change-Id: I305d877a468da70c78b68e6f70778ff490cd3024
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-05 14:49:42 +01:00
Tamás Zolnai
4a9174cf5f cypress: NC: deduplicate file loading test code.
Change-Id: I296316366ace68ba4b559c2d82e54623d0738aa7
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-03 22:00:16 +01:00
Tamás Zolnai
ad6839488b cypress: NC: in NC the sidebar is not visible by default.
Change-Id: I37d8f436fc528568f449a58e43ccc7ed8142c866
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-03 16:06:07 +01:00
Tamás Zolnai
67d63553b1 cypress: NC: hide firstrunwizard more effectively.
Change-Id: I4a8bc873dc1657a0e554ec6132f5fc41531bb3d3
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-03 10:20:19 +01:00
Tamás Zolnai
d3ce9d0a31 cypress: NC: hide firstrunwizard.
Change-Id: I3b02cbe19578db2ecc8bcb597faa575a1552b55f
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-10-29 17:56:18 +01:00
Tamás Zolnai
5db82b9622 cypress: NC: visit the files URL directly.
Change-Id: I9d4666235308354f74105edfa0f5b1831ab0bf14
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-10-28 19:06:20 +01:00
Tamás Zolnai
f650b761b5 cypress: try to fix nextcloud test failures.
Change-Id: Idc9a948b0b689b484d609c8778c574c921918a5a
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-10-28 17:24:58 +01:00
Tamás Zolnai
3f52832cfb cypress: update nextcloud test to work with NC 20 version.
We got some new exceptions and also we have a start
screen now.

Change-Id: I22288ede30540437e8b0a5d3ce4c607d42a465bc
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-10-28 15:12:02 +01:00
Tamás Zolnai
d401101833 cypress update: 5.1.0 -> 5.3.0.
Fixes this issue:
https://github.com/cypress-io/cypress/issues/8621

Change-Id: Ied225391e7e72dfd9df852481ad29b6368c194cf
2020-10-23 12:58:18 +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
Ezinne Nnamani
e88e656dae Created the cypress test for the underline attribute in desktop writer
Change-Id: I5d9fd7655380d6926ca1f64b03128098fbb15270
2020-10-17 15:52:03 +02:00
Tamás Zolnai
a8e9a745b9 cypress: update some writer tests related to canvas rendering 2.
In these cases, we can use the cursor position to verify changes
instea of tiles.

Change-Id: Ibc96c7a2df92aad5d7daa26a40e7c004a68e95e4
2020-10-13 15:15:06 +02:00
Tamás Zolnai
7dfb91cbad cypress: more effective testing of saving.
Change-Id: I2d32597e7ed55a6b470b0a6d0c40d94ce3a96c2d
2020-10-07 16:12:01 +02:00
Andrea Gelmini
9d01540680 Fix typos
Change-Id: I7d487f32ca43e19023760ef3c6bb1683607f93d1
2020-10-07 12:51:08 +02:00
Tamás Zolnai
4370817eea cypress: reenable sidebar existance check.
Issue was fixed:
4f41ac6096

Change-Id: I1d67ebae3b4d529e8e9b5060dbb107dd67f92851
2020-10-02 13:47:04 +02:00
Tamás Zolnai
a460dab972 cypress: remove workaround for getting initial tile.
Let's check the canvas to exist and wait until the
first tile arrives and so the canvas is not fully
white.

Change-Id: I7102298a406d61246fc40a0842bafb2cd124d81e
2020-10-02 13:47:04 +02:00
Tamás Zolnai
11b384b195 cypress: NC: test nextcloud specific features.
Change-Id: I52bc1709f29de1d69c2ae52c806bedad4eee8bc4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103254
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-23 16:41:44 +02:00
Tamás Zolnai
95fbcdebed cypress: fix stopping test run in interactive test runner.
I reported the issue. Let's have a workaround until,
the bug fix is released.

Change-Id: I7d7719d311e0c0584b7d6e710286f28962d00a96
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103038
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-20 14:23:08 +02:00
Tamás Zolnai
5b6c0b8e1c cypress: NC: update afterAll method for mobile.
Newly close button does not actually close the document,
but steps back to read only mode. So we need to push it
twice.

Change-Id: Ic38f1e658396d9afe49496cfb75aa68df1c4623f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102997
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 14:12:26 +02:00
Tamás Zolnai
011efb4ac4 cypress: improve moveCursor() helper method.
Change-Id: I41b781a2cd2f413b4daea979478351d29588fda3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102966
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-17 19:10:54 +02:00
Tamás Zolnai
1fa089901e cypress: php-proxy: fix shape related tests.
Change-Id: I59e115785357e213346c9c403dc3078ef0b2b706
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102891
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-17 12:23:32 +02:00
Tamás Zolnai
f6d5cf9c3f cypress: support running tests with php-proxy.
Change-Id: I9fe4a974582e0475026f6798a338bae033e6d7e6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102733
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-15 15:40:22 +02:00
Tamás Zolnai
3aca775a04 cypress: NC: make assertCursorAndFocus() work with NC.
Change-Id: Ia77779248cf3c40fd3e269318215ac689fcb0de4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102472
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-11 18:28:24 +02:00