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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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