Commit graph

38 commits

Author SHA1 Message Date
Tamás Zolnai
dbad4b2c0c Update cypress: 6.1.0 -> 6.2.1.
It fixes a hang related to retries. It might be useful
in our case too. I've seen hangs on Jenkins, which might be
related.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8320f9b38c59074d2b5dd3d7b0cad0c5828b0849
2021-01-20 09:18:59 +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
e8961e5123 Revert "downgrad wait-on: 5.2.0 -> 3.3.0"
This reverts commit a409b221f8.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I5662bfbf7b1209c0919eca2b8debefae9c82450d
2020-12-28 15:11:06 +01:00
Tamás Zolnai
a409b221f8 downgrad wait-on: 5.2.0 -> 3.3.0
We get syntax error from outside cypress test code.
It might be one of the 3rd-party packages. Revert wait-on
package to a previous version and let's see whether the
issue goes away or not.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I902536fd7124ebaca58a3491400606c89e5e7483
2020-12-15 16:54:43 +01:00
Tamás Zolnai
9b181385b1 update cypress: 5.5.0 -> 5.6.0.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I6a290e8520311a89d2c5e214152be58bd7e2904e
2020-12-04 16:33:26 +01:00
Tamás Zolnai
be8f8ea874 Update eslint of cypress test code: 6.8.0 -> 7.12.0.
Change-Id: I3508579dc608d56e63d842e413dc14d4c760965c
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 11:57:23 +01:00
Tamás Zolnai
ffccbfaf4f Update cypress-select-tests: 1.5.7 -> 1.5.8.
Change-Id: I5b3a67b3bacf3efb8ffbef98d8967608c2f81742
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 11:57:23 +01:00
Tamás Zolnai
1ed1f0705f Update cypress: 5.3.0 -> 5.5.0.
Change-Id: I0c1431eaa3f49c3a4705a9cd438162cd7ccd0fe8
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-13 11:57:23 +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
Andras Timar
25764d83ca change git repo URL and product name in package.json files
Change-Id: I15b786fa1fb3be78c4fe6e83777fc7df396de434
2020-10-05 14:04:40 +02:00
Tamás Zolnai
ea8c2eef02 update wait-on: 4.0.0 -> 5.2.0
Change-Id: Ia9f9b1ef51bfb88879e2a66eca30282eb58c6eb4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102994
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:37 +02:00
Tamás Zolnai
1e6dcf05d8 update cypress-log-to-output: 1.0.8 -> 1.1.2
Change-Id: I2e69d0cc24a32f44be7767ceca1ffe0d42ee5285
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102993
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:29 +02:00
Tamás Zolnai
03a65ba7f1 update cypress-file-upload: 4.0.7 -> 4.1.1
Change-Id: I312aa63f0fe394032fe06e9248a5a4da9eec6de1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102992
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:04 +02:00
Tamás Zolnai
5b1b66ac51 update cypress: 4.12.1 -> 5.1.0
* Fixes random failures in interactive test runner.
* Introduces test retries, what we did with an own script so far.

Change-Id: Iab5c32e854618a694e7d10d3c92c1c6c32465983
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102991
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:49:59 +02:00
Tamás Zolnai
76c2481190 update cypress: 4.9.0 -> 4.12.1.
Change-Id: I97e94f32697cac9002aa34632b6a80f8c6a0e127
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100434
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-08-10 15:37:37 +02:00
Tamás Zolnai
86f2db47a4 cypress: add an option to dump only console.error() messages.
With the ENABLE_LOGGING flag we get all errors coming from
the browser, which is a lot. So I introduce ENABLE_CONSOLE_LOG
flag now, which dumps only console.error() messages, so we
can debug the client code easier when we run a test in headless mode.

It will be useful for multi-user tests, where we can't use the
interactive test runner, because we need to run more users at
the same time.

Change-Id: Icfa62412b83e37398c54e9ac7b4120d76a87fb92
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99071
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-07-20 18:15:55 +02:00
Tamás Zolnai
b48e9ec349 update cypress: 4.7.0 -> 4.9.0.
Change-Id: I3d1763b171d7163d7a96343f0687a2d64c61e062
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98431
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-07-09 16:36:33 +02:00
Tamás Zolnai
b15f641297 cypress: introduce clickOnIdle() and inputOnIdle() methods.
This method waits until the item is idle,
e.g. not detached for a while. Using this we can
workaround false failures caused by GUI flickering.
For example, mobile wizard is updated all the time
which makes hard to test it reliably. We can use
this clickOnIdle() method, which is slower than the
simple click(), but is more reliable.

Change-Id: I2f970eb0cf400382c8384c91ab7c84b1e02e63af
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98373
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-07-08 17:00:27 +02:00
Tamás Zolnai
fb3c49f396 update cypress-failed-log: 2.6.2 -> 2.7.0.
Change-Id: I9bf9f441d776898fc0d1cd143f197badc28f3943
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96354
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-06-15 23:24:23 +02:00
Tamás Zolnai
952f40f62e update cypress: 4.5.0 -> 4.7.0
Change-Id: I50d149f7cc3638a0a3abceae8f977952384b914d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96353
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-06-15 16:42:03 +02:00
Tamás Zolnai
71f2d7b95d cypress: test insertion of local images.
Adding a file for insertion from cypress code
is not trivial. I added cypress-file-upload package
which can be used for this.

Change-Id: Ife7da586d1d87c2c4580730af29857c1d0d91750
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96232
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-06-12 18:55:56 +02:00
Tamás Zolnai
5149305dba cypress: better way of filter out tests based on core version.
We use cypress-select-tests to filter out tests before
the tests are started. One advantage is that these tests
are showed as skipped in the log and also beforeAll() is
not called for these test cases which can speed things up.

Also we can avoid to add too much noise to the test code.
When we are working with more branches, we can just add
blacklists separately for all branches.

Change-Id: Ie7808614e42a19a0820f372720cc391511e165f5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95585
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-06-06 17:53:37 +02:00
Tamás Zolnai
d96ca09ced cypress: update version 4.3.0 -> 4.5.0
Change-Id: I87432005dc9c9cb264c0cae260e5adad84e4ef14
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94665
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-05-22 14:58:29 +02:00
Tamás Zolnai
af76b48460 cypress: add a custom ESLint rule against cy.get().contains() usage.
Since cypress retries only the last command, it's better to use
the compact cy.contains(selector, content) version, instead of
cy.get(selector).contains(content) call.

Change-Id: Ie1f4c17bbf736058ecf6bd996b46384fdff19446
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93081
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-28 18:42:56 +02:00
Tamás Zolnai
3a13984b6b cypress: remove cypress-wait-until package.
We can use should method everywhere with a callback function
parameter. When there is no a specific item, which this should
is connected to we can use 'body' or any other existing item.

Change-Id: I3e1c5ca930b28304e886971ee50201d93a086b45
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92931
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-26 17:13:24 +02:00
Tamás Zolnai
e814adfb28 cypress: integrate cypress-wait-until package.
There are cases sometimes, where we can't use cypress'
nice retry feature for waiting to an assumption to
be true. A workaround for this issue is the cypress-wait-until
package, which makes us able to use the retry feature for
any use case.
An example is the position of an element. I don't know
a way to wait on the position to get changed in the cypress
test framework. So we can use cy.waitUntil() here instead.

Please use this new package when it's really necessary,
do not replace the better cypress calls with it.

Change-Id: I8c553456e351664e30043b8ccd5ace51f1c0298d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91554
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-02 13:50:06 +02:00
Tamás Zolnai
112882a3f7 update cypress: 4.1.0 -> 4.3.0
Change-Id: Ib8d642e0ba7b02a20207c53e1134d08dc92b2840
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91427
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-31 17:05:05 +02:00
Tamás Zolnai
dc15a4c398 cypress: integrate cypress-failed-log package.
To get a better log in case of error.

Change-Id: Id8f72c78cb8a80e30ba3012147caa8106e1e7ce2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90470
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-13 15:00:54 +01:00
Michael Meeks
54c03079ea cypress: update to 4.1.0.
This seems to make things work on openSUSE 15.1

Change-Id: I23f6b738d1c1a3737a968f244477bc8c8c5c7bb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90420
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 19:01:51 +01:00
Tamás Zolnai
eb53dd5a8c cypress: Always search for an available port number.
Change-Id: Ibfb80d43cd7f7d4c8cab8e3621bebfc2201d4b2d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89066
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-20 04:49:38 +01:00
Tamás Zolnai
ad0d6c5742 cypress: Update cypress version.
Change-Id: I3873ae24f30f04fa40f758f19ac77a78b63f5c26
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87770
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-31 15:33:05 +01:00
Tamás Zolnai
c782c033b0 cypress: Use a better wait method for loolwsd server
Use the wait-on npm module for this.

Change-Id: I602f95aa79d46cf7b55bcc598e612bbc5342c52b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87150
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 17:37:28 +01:00
Tamás Zolnai
abac31d4fe cypress: Remove obsolete scripts.
These were replaced by make commands.

Change-Id: I98978b52801b44a36c09388cf5eb3ed5a09326c3
2020-01-21 16:13:01 +01:00
Tamás Zolnai
d413d55f91 cypress: Use eslint to check coding conventions during build.
Use loleaflet's config file to have the same
conventions under cypress_test folder too.
Update test code to pass esling check.

Change-Id: Iade932e6d3cd8941b5fc0897c56c68d2493f0dce
2020-01-21 16:13:01 +01:00
Tamás Zolnai
66eb121856 cypress: Running make check locally works better then cyrun.
Change-Id: Ifcbefa925b3b46e7955cd3cfb107b105f053cf59
2020-01-21 16:13:01 +01:00
Tamás Zolnai
740267611f cypress: Update README about test execution.
Change-Id: I6c7b7fd8c77f89289630a06f9dbaf94ae5082aa8
2020-01-21 16:13:01 +01:00
Tamás Zolnai
f2444df726 cypress: Add some commands to make easier to run tests.
Change-Id: I9428522717d3912ca20374a1efb1c61999ffc77f
2020-01-21 16:13:01 +01:00
Tamás Zolnai
524bbb3398 cypress: Initial integration of cypress test framework.
Change-Id: Ibf300b33d32ce3e7f1affbaf0a59364ddb618b56
2020-01-21 16:13:01 +01:00