summaryrefslogtreecommitdiffstats
path: root/cypress_test/integration_tests/mobile/writer/focus_spec.js
Commit message (Collapse)AuthorAgeFilesLines
* jsdialog: correctly setup & test value for spinfieldsbackport/5107/distro/collabora/co-21-11Szymon Kłos2022-09-011-1/+1
| | | | | | | | | | | | | Adding attribute by jQuery and testing in cypress was not working: visible value was correct after change but in DOM we had original value which was tested by Cypress. Use val() to setup value and have.value for cypress to test. Unify inputs so we don't use attributes but always props. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I1b3acccbd6d4ba493f867044b9b3c1f17b16873e
* cypress: give each test a unique test documentAshod Nakashian2022-01-111-2/+3
| | | | | | | | | | | | | | | | | We copy each test document into the work-dir and now we also give them a random prefix. This is critical to ensure that parallel runs do not re-use the same document. Also, when closing a document, we wait for the document-name to disappear from the admin console. Sharing the same document, or even the name, means we are likely to see random results. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> (cherry picked from commit d998f2c1c8a163c3ef870bbe8581a364df3905bb) Change-Id: I2f41566952c49c9c63ee206bcba6a4dd49cdd6d0
* jsdialog: use unique ids for unobuttonsSzymon Kłos2021-12-091-2/+2
| | | | | | | | | | now all uno buttons with the same command will share class not id: .unoXXX not #XXX this is needed for a11y Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I4dc75854bdb396fa9214f7cae5e7fffaef035e56
* cypress: fix: updated all failing specRash4192021-12-011-23/+11
| | | | | Signed-off-by: Rash419 <rashesh.padia@collabora.com> Change-Id: I9cee74fde361e8726f4621e52561313f29072205
* Writer mobile: Update focus spec.Gökay Şatır2021-07-091-26/+1
| | | | | Signed-off-by: Gökay Şatır <gokay.satir@collabora.com> Change-Id: I4226ea2925402e2b2cead8bdc9938b62d2a70af9
* cypress: remove some old disabled tests.Tamás Zolnai2021-02-261-25/+0
| | | | | Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Change-Id: I275d794bbb74e2fe8e1fd845061c0cb17f939c11
* cypress: disabled annotation/comment testsPranam Lashkari2020-11-301-1/+1
| | | | | | | | mobile tests annotation tests do not work with new comment wizard tests needs to be rewritten so temporarily disabled tests Signed-off-by: Pranam Lashkari <lpranam@collabora.com> Change-Id: I66e8f88cdbf921060af083e84d73b372e03f8dda
* cypress: do not run afterAll method in case of failure.Tamás Zolnai2020-11-131-1/+1
| | | | | | | | | After a test failure, it's common, that the afterAll method also fails which covers the right error message and also makes the following tests to be ignored. Change-Id: I5c1bbc5dd8b1b48dd2a8f1fc20a8ca3b8ecd8462 Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: update 'Shape related focus.' test.Tamás Zolnai2020-10-021-6/+8
| | | | Change-Id: I9dec33efadf5e6651cf75cf10f7af02114e34260
* cypress: introduce typeIntoDocument helper method.Tamás Zolnai2020-08-121-6/+3
| | | | | | | | | | | | | | | It was not consistent what we used to type into the document (e.g. 'body', 'textarea.clipboard' or '#document-container'). Also we need to use force parameter because 'textarea.clipboard' has no actual area which makes cypress fail with: '`cy.type()` failed because the center of this element is hidden from view'. Change-Id: I04e0a82ed8450d583e407715fde1855197cae109 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100574 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: simplify beforeAll() methods.Tamás Zolnai2020-07-311-1/+1
| | | | | | | | | | | | We don't need an explicit parameter indicating the platform type (e.g. mobile, desktop). We can check the userAgent to get that information. Change-Id: Ibbc041c4a389cff92203d245f55268ec4e93b0a0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99889 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: introduce clickOnIdle() and inputOnIdle() methods.Tamás Zolnai2020-07-081-6/+5
| | | | | | | | | | | | | | | | 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>
* cypress: introduce a better way of handling test file name.Tamás Zolnai2020-05-261-2/+4
| | | | | | | | | | | | | We both need the test file name in the beforeEach and afterEach method, so better to write it down twice. This also makes easier to handle more test files inside one test suite. Change-Id: I407d974c949c4485ffb6712fc833c14c3a6c50c6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94825 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: disable various regressed test cases.Tamás Zolnai2020-04-301-1/+1
| | | | | | | Change-Id: I316021a57e9bd3288138c1ac2e85af73d8efcf46 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93224 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: introduce a data attribute for acceptInputTamás Zolnai2020-04-221-24/+7
| | | | | | | | | | | | So we can use cypress calls to wait on the tested state using cypress' retry functionality. It's also useful to have the acceptInput state in the DOM, so we can check it in the interactive test runner. Change-Id: I17cd8f88b270f7a329d35e77dec4eedd7aa1c2a3 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92682 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: selectItemByContent() -> cy.contains()Tamás Zolnai2020-04-141-3/+3
| | | | | | | | | | | | | This helper method was introduced as a reliable alternative of cy.get(<selector>).contains(<content>). However we can have the same result using contains() differently: cy.contains(<selector>, <content>), which works reliable. Change-Id: I11553f7d280a0f3a94a8f353410308113dd1c825 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92194 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: extract openInsertionWizard() and closeInsertionWizard().Tamás Zolnai2020-04-091-12/+2
| | | | | | | Change-Id: I3ace4714d6848dfa1132240debe95ab63ac3d26b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91958 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: introduce selectItemByContent() method instead of contains().Tamás Zolnai2020-04-091-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cy.get().contains() behaves unexpectedly. With pseudo code: // First find the item using the selector do { item = get(selector) } while (item == undefined) // Then wait until it get's the right content. // Item points to an object which can change it time. do { } while (item.content != specified_content) What we actually need is something like this: // Wait for an item which matches both the selector and content. do { item = get(selector) } while (item == undefined || item.content != specified_content) The new selectItemByContent() method behaves like this. It just looks wierd when you experience a test failure in the interactive test runner and you check the DOM and you can see the right item with the rigth content and the test still fails. Change-Id: I0b1466a165451e831401e1f4b500ce16bd3f38b0 Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91955 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
* cypress: mobile: extract openHamburgerMenu() and closeHamburgerMenu() method.Tamás Zolnai2020-04-071-2/+2
| | | | | | | Change-Id: Ib288ccabee7aa06c5e9b8b0c54ac88055c1ae820 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91827 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: extract openMobileWizard() and closeMobileWizard() method.Tamás Zolnai2020-04-071-31/+6
| | | | | | | Change-Id: I02e33406510ade9cfc6de5f31854cee99a7c1fc0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91823 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: create a separate mobile helper file.Tamás Zolnai2020-04-071-14/+15
| | | | | | | 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>
* cypress: mobile: this focus test is still unreliable.Tamás Zolnai2020-03-311-3/+4
| | | | | | | Change-Id: I10556880dfa87bc4afea0f5b76b719a5ffa658d0 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91433 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* leaflet: shouldAcceptInput -> canAcceptKeyboardInputAshod Nakashian2020-03-251-7/+7
| | | | | | | | | Clearer name to differentiate intent from expectation. Change-Id: I74cc4c3bca11782bdd9cf72d6af4534357cefa64 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91016 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* cypress: check keyboard visibility when editing shapes in writerAshod Nakashian2020-03-251-1/+5
| | | | | | | Change-Id: I1580f4620459797b95eecb88edbcd12406531618 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90992 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* leaflet: do not expose map to cypress testsAshod Nakashian2020-03-251-6/+6
| | | | | | | | | | | | | | | | | | We only need to expose a couple of helpers to test the keyboard and clipboard, which are not possible to test via the UI. This patch reduces the surface area of exposed code to testing, to avoid misuse. The only needed helpers should be made available, and they are read-only functions, so there is no risk of changing the internal state from test code. Change-Id: Id4a1800e3d3b9364754a18fb11f61df612e56490 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90991 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
* cypress: mobile: better way of pushing hamburger menu button.Tamás Zolnai2020-03-231-4/+2
| | | | | | | Change-Id: Ifa4ebc3e490dddcdeee476c368b33a3cedd6ef17 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90931 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: move focus related tests to focus_spec.js.Tamás Zolnai2020-03-191-0/+87
| | | | | | | Change-Id: Ib8719f6d14e578ffc0125077942c063f4b5f3f37 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90718 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: add also an indicator to enableEditingMobile.Tamás Zolnai2020-03-181-8/+0
| | | | | | | | | Which indicates that the application stepped into edit mode. Change-Id: I196851c618fd3b6c670b26184e6bbca8050f2f5a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90711 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: reuse helper to enable editing in testsAshod Nakashian2020-03-181-8/+8
| | | | | | | Change-Id: I9565376bf3e34c2d95a14a5411cee732a77f9f0a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90647 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* Revert "cypress: mobile: reenable a focus related test."Tamás Zolnai2020-03-161-3/+4
| | | | This reverts commit 584e707ddb779fc909a98d03ae9488d6c3e39650.
* cypress: improve afterAll() method.Tamás Zolnai2020-03-131-1/+1
| | | | | | | | | | | | We need to actually wait, until the admin console displays the info coming from loolwsd. We also need to check only for the test document that the current test file is using. In parallel build, more jobs are using the same loolwsd. Change-Id: Ia85cf711f33c748cdbed8602a532fb590fe26b25 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90474 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
* cypress: mobile: reenable a focus related test.Tamás Zolnai2020-03-131-4/+3
| | | | | | | | | | | | | This test does not work since: ac961d7b67fcb5fb97cb6a620c913debb74ba8c1 Now I just remove that for cypress test, later we need to improve the mobile emulation. Change-Id: I18310fe27cd727b63b6f0e4f3e939cdbada05520 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90458 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: re-enable some skipped tests.Tamás Zolnai2020-03-041-1/+1
| | | | | | | Change-Id: I4163fdba2bc0fb7bcdc4d2b33f5deff6b0857013 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89960 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* Mobile: Insert: Add missing icons, add missing ids, create missing icons, ↵Pedro Pinto Silva2020-02-251-1/+1
| | | | | | | | | also add sub level icns for footerandheader and formattingmark (fixing cypress) Change-Id: Id3ca33095b5eae7d13129f4b9629e2c0faf302fb Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89371 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: use different test files for different test suits.Tamás Zolnai2020-02-251-2/+2
| | | | | | | Change-Id: I29ad09ce99128fe6700070e23cf66dfc0c553b70 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89389 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: disable an unstable focus related tests.Tamás Zolnai2020-02-241-2/+3
| | | | | | | | | It's unstable now, how focus behaves with shape. Change-Id: If429420852599315bff5d71f33f263f1d79a356c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89380 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* cypress: mobile: Organize tests based on component.Tamás Zolnai2020-02-121-0/+284
Change-Id: I49f6e76b219e4c55add05b5a8489e51c518625ab Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88553 Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>