Commit graph

185 commits

Author SHA1 Message Date
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
df8144d44c Revert "cypress: make sure the cell selection is visible before run test steps."
This reverts commit 129ae61684.

This is actually undefined, whether the cell cursor would be there
or not. We get cell cursor messages after loading the document,
so if we step into editing mode before these messages, then we
will have the cell cursor, but if we wait some seconds after
opening the document, then the cell cursor won't be displayed.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I7a4e9e5adbbbe312f21789fe872726bbf67565e6
2021-02-02 13:49:50 +01:00
Gökay Şatır
855c7aaf7c Cypress: Make column & row header tests work with canvas sections.
CanvasSectionContainer has now capability of creating divs below sections, for testing.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia735758ce27af558718da50935502723112e838e
2021-02-02 09:49:48 +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
c69b163c38 cypress: let's be more specific here about the cursor.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If9d475374fb27a727f5cf7f38f3a0b4b47f142f6
2021-02-01 13:28:54 +01:00
Tamás Zolnai
64a22ea2dd cypress: make dblClickOnFirstCell() method closer to real mouse events.
It causes an issue for calc to use cypress's dblclick() method
and it will select the wrong cell. In the log, I see only a
double click when we simulate user events with cypress, however
when I do double click manually, first I see a single click and
then a double click in the log. So let's do the same with cypress
simulation too.


Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I18e92fc354558e09bb5cb3a12e45cbb669ac97bc
2021-02-01 13:28:54 +01:00
Tamás Zolnai
02e22e20f3 cypress: make dblClickOnFirstCell() more stable.
Visibility of the blinking cursor is not good enough
on dekstop, beacuse it changes position after it is
displayed. So let's wait some time to step cell editing
mode.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I86fe7fd5be68f36126ba3d390b29740b33cf3d8e
2021-02-01 11:59:43 +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
129ae61684 cypress: make sure the cell selection is visible before run test steps.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I3ce151f8ebe9405c5830630e941c94ab9ef2f7ae
2021-01-29 12:42:46 +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
Ezinne Nnamani
74f14cccdf Created Cypress test for Merge cells in Desktop Calc
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: Iba89ea0a2bc5b788c9202247d5cada801fc6d5f6
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2021-01-12 13:44:07 +01:00
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
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
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
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
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
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
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
a67bf6198f cypress: NC: remove this check.
It does not work correctly in NC environment.

Change-Id: I1358f0f80aa05ddb118fc1cfd4237a5fac875fcc
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-19 10:07:20 +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
eea13adc99 cypress: extract checkDialogAndClose() method.
Change-Id: Ib5f2d7c7304390e660ec36878fe060e4f39a9312
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
9fdfefe3a8 cypress: extract selectFromListbox() method.
Change-Id: I58da02f2a082e3683da62022c3bf9cb656621cb5
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 12:04:22 +01:00
Tamás Zolnai
d38360ff74 cypress: extract selectColorFromPalette() method.
Change-Id: I6ce70b2ee51dde2c6449236d911519776f75f892
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-18 12:04:22 +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
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
2297388a32 cypress: NC: try to fix revision history related tests.
Let see whether waiting some time after context switch
makes things better. Cypress does not support iframes
very well.

Change-Id: If6011f16c54e3473bef20546f39bb45941c40dc9
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-10 20:18:32 +01:00
Tamás Zolnai
6a96d3f6d9 cypress: NC: sidebar can be hidden by default in NC.
Change-Id: I5292ba2bcbf840f0128bd28be3f381672b45fa7f
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-09 21:56:09 +01:00
Tamás Zolnai
9973736000 cypress: NC: fix up code.
Change-Id: I6d931a59f4281c85347b0e824aefbcd8cf2e129f
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-09 13:30:37 +01:00
Tamás Zolnai
fad24063e0 cypress: show statusbar / sidebar for NC.
In NC statusbar and sidebar an be hidden by
default. Let's avoid test failures because of
that.

Change-Id: If6083df431bfc438f72be4f13e078ea335df114a
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-09 12:54:20 +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
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
0a0d2b89cf cypress: NC: fix restore previous version test case.
Change-Id: I9b5eb6ffb8e938e30a3817f01e57e6c89ca30add
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-03 22:00:16 +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