Commit Graph

29 Commits (master)

Author SHA1 Message Date
Neil Guertin d1822e4298 Cypress test logging improvements
Print full test name in beforeEach and afterEach
Hide xhr requests
Hide repeated actual and expected values on passed assertions
Add information to failure message

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ic1a20481c05afb05b9c29d0bd428b59615d49dc7
2024-02-08 11:55:06 -05:00
Neil Guertin 090a52cece Remove cSetLevel (unused)
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ic1eaae123ae70f5f09553d6c69bfa699a02a921f
2024-02-07 07:16:37 -05:00
Neil Guertin d209ec78cc Upgrade to Cypress 13
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I8edbcbb72e1ad016df0ff6a2466d20865f517683
2024-02-06 10:05:11 -04:00
Neil Guertin b69642e9fb Remove waits from cypress tests
Remove most calls to cy.wait(), reduce and comment the rest.
Stub waitUntilIdle and clickOnIdle
Fix many failing tests
Reduce total cypress runtime by 45%

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I62ddfdcbc3ab107654459ebece2d325eca0c6156
2024-02-02 17:05:40 -05:00
Neil Guertin 0dd5dd6f60 Rename getFrame() to cframe()
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I1f220687eb972d4b3d65cb26fe0201b1ccd24993
2024-01-05 07:12:17 -05:00
Neil Guertin f4c855792f Use new custom command cy.getFrameWindow()
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I4f54b35f01b41bfb47a1d5d359de5cdab4cb9640
2023-12-27 10:06:05 +03:00
Neil Guertin 5979eb9a1f Add cy.getFrame() custom command
The intent is to eventually replace cy.cGet and some other helper
functions with getFrame, which is cleaner and has better logging on both
pass and fail.

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I911a5552d69634495a9036d020754351665419cf
2023-12-25 10:51:37 +03:00
Neil Guertin fa87fb803e Better logging for cy.cGet()
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I587415c7601fd6bb10f3aa6e708109fd7ccd3b81
2023-12-21 08:10:34 -05:00
Henry Castro 3c0731bf2c cypress: add emacs mode lines
Change-Id: I2cb19d34639ea6af55c693fad7bef8855a0ccba3
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-07-10 10:49:04 -04:00
Henry Castro f3787c85e8 cypress: install package 'cypress-terminal-report'
https://github.com/archfz/cypress-terminal-report

Change-Id: I242e421aeb02ee3861b16af78af87c6a9db22ad5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-07-10 10:49:04 -04:00
Henry Castro 1ac16a13f1 cypress: remove plugin package 'cypress-failed-log'
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>
2023-07-10 10:49:04 -04:00
Henry Castro 51ae4a836e cypress: logging stack traces of the unit test failing
Change-Id: Ic06c62b1cbd467abe17a5ff859848ca10673b4a4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-07-10 10:49:04 -04:00
Henry Castro a32cbb311d cypress: logging unhandled exceptions
Change-Id: I82bd3552fbf0b844492340762899b5c492148eca
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-07-10 10:49:04 -04:00
Gökay Şatır cf24f725e2 Update multi-user tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I75125728e20bee789fce085c31d93b7650312eec
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
2023-05-05 07:07:14 +03:00
Gökay Şatır 2a1db594ad Update writer desktop tests.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I974bb8ee2e7d77cae29ac97b2c0f6b687e90e005
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
2023-05-05 07:07:14 +03:00
Gökay Şatır 74fa2ab02c Update calc desktop tests.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia53a5a8a3c783f59254a183341d483640e6a2525
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
2023-05-05 07:07:14 +03:00
Gökay Şatır c9217176bb Update Cypress and make related changes.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ie896ea22b5591ea5e7d574f2436ece7a31da4c0c
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2023-05-05 07:07:14 +03:00
Rash419 74844c3dc8 cypress: introducing multiuser tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib6c86d74dd7f0414f3c63ed66e99504c870516a3
2021-07-27 14:58:09 +05:30
Michael Meeks d04547da1b cypress: reduce interval in waitUntil to speedup tests.
165s to 145s for impress/slide_properties_spec.js

Change-Id: I3dcce9a0d0c63123a0cde5cb89c074e6a08b8824
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-06-29 17:12:01 +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 8367d996b7 cypress: slow down test execution in interactive test runner.
Otherwise things happens very fast, so hard to follow what
happens.
Also the new changes of tile rendering broke the screenshot
feature of cypress, so the screenshots taken during the test
became useless. So an alternative is to run test slower,
so we can see what happens on the UI.

Change-Id: I09b48ca606cf45768cba04f5639a5d4b5317545d
2020-10-19 13:53:53 +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 f6d5cf9c3f cypress: support running tests with php-proxy.
Change-Id: I9fe4a974582e0475026f6798a338bae033e6d7e6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102733
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-15 15:40:22 +02:00
Tamás Zolnai da6f94a3ed cypress: fix attachFile is not a function error.
Include the related package directly in the test files,
where we use it. Somtimes supportfile is not handled correctly
in parallel build, which lead to missing function error.

Change-Id: Id4740a9384f0fe170a26b76ecd393a5beda1f5c5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96723
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-06-19 16:10:42 +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 82f022d8b9 cypress: try to fix TypeError: cy.waitUntil is not a function.
Import cypress-wait-until directly in the test file. This module
is not intended to use everywhere, so it's not a big issue
if we need to import it before use.

Change-Id: I33ff8ae1eae2ec124b286cd7760d5571e5c67531
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91874
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-08 11:11:31 +02:00
Tamás Zolnai b045fa90f2 cypress: mobile: create a separate mobile helper file.
Change-Id: I3d57a8a691f8085db12b00e7b508295ce8f33a26
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91807
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-07 13:50:07 +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 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