Commit graph

24 commits

Author SHA1 Message Date
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