It has a bug, it executes twice beforeEach function
if fails or unhandled exception.
Change-Id: I005815d440af0309cf797e52fbfb3693896418a9
Signed-off-by: Henry Castro <hcastro@collabora.com>
problem:
every time running cypress test would change the properties,
in alphabetic order
this will make sure to avoid unintentional changes
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id7b955ad2154ec6393a4cb9d115f369db25b5008
Fix some issues it found and disable the following checks for now. Some
of them needs module support to work and some of them needs project
compilation using tsc rather than per file compilation.
cypress_test/ extends loleaflet's eslintrc so, its package.json needs to
have the typescript lint plugin as well.
Disabled checks:
@typescript-eslint/no-unused-vars // This can be enabled after fixing
all places it finds.
@typescript-eslint/no-inferrable-types // Lets do explicit typing
whenever we can.
no-var // This needs a lot of conversion of var to let.
@typescript-eslint/no-explicit-any
@typescript-eslint/no-namespace // ES5 has no module support
no-inner-declarations // ,,
no-constant-condition // This is sometimes useful
@typescript-eslint/triple-slash-reference // ES5 no module support.
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib4fd8b4fcee42216d4322fd043a1873302db375a
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
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
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
* 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>
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>