Commit graph

43 commits

Author SHA1 Message Date
Tamás Zolnai
dd42ea0da7 cypress: mobile: extract openMobileWizard() and closeMobileWizard() method.
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>
2020-04-07 15:32:16 +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
Ashod Nakashian
e9157a886f leaflet: don't allow focus stealing
This improves typing in the formula-bar.

Change-Id: I14359b5b4e842b68b1807d286e1831b3805bb4ea
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91019
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-03-25 12:29:14 +01:00
Ashod Nakashian
2d36b936ba leaflet: shouldAcceptInput -> canAcceptKeyboardInput
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>
2020-03-25 12:28:37 +01:00
Ashod Nakashian
0b7f70786c leaflet: do not expose map to cypress tests
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>
2020-03-25 12:28:09 +01:00
Tamás Zolnai
efa7d4a08a cypress: mobile: better way of pushing hamburger menu button.
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>
2020-03-23 20:17:59 +01:00
Tamás Zolnai
3b1ca68a21 cypress: mobile: add spellchecking tests for impress.
Change-Id: I7b3909c79ca1fad27c5e3754a36f38f659e467e1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90712
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-19 14:48:42 +01:00
Tamás Zolnai
ff92eb0795 cypress: better core version detection.
To make it work both with release and debug core
build.
Also disable some tests failing with core/cp-6-2.

Change-Id: I5617712e19dc8aaba0c5f9fbdf9c17d9a19fb18b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90725
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-19 13:47:55 +01:00
Tamás Zolnai
c1b56a357c cypress: mobile: don't wait too long during long press.
In some use cases this time was too long and hammerjs
recognized a pan end by 'pointerup' event. We have
500 ms time set for long press in loleaflet code,
so use the exact value here.

Change-Id: Iab47c668ffa591ccfd7d2eeed10f2c3ec5664b89
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90723
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-19 12:20:03 +01:00
Tamás Zolnai
407f830f50 cypress: mobile: add also an indicator to enableEditingMobile.
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>
2020-03-18 20:45:36 +01:00
Ashod Nakashian
6e70407ba1 cypress: reuse select-all helper
Change-Id: I96a695dd96c07ab977ea0814117c642923e2f4db
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90648
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-18 10:14:53 +01:00
Ashod Nakashian
3bafa7d4ab leaflet: maintain the keyboard state after toolbar actions
Previously we supressed the keyboard after toolbar
actions, but that is problematic because then the
user is unable to delete/replace selected text,
because the keyboard is hidden and there is no way
of showing keyboard without changing the selection.

Now we maintain the keyboard state, which is likely
visible, since a selection shows the keyboard.

This might not be ideal, because the user might
hide the keyboard on the device and we will restore
it after invoking a toolbar action, but at least
it's more usable now. Unfortunately, there is no
API to track the keyboard visibility.

New Cypress tests added to validate the above.

The tests depend on checking the last keyboard
visibility state in Map, because there is no
reliable (or any?) way to know whether the keyboard
is visible or not. There are many cases where we
actually hide the keyboard, while having the input
focus on the textarea element, so that is no indication
that the keyboard is visible. We do this for usability
purposes. For example, during zooming, when selecting
cells and graphics/shapes, etc.

The purpose of the cell is to validate that we restored
the keyboard visibility or we changed it, depending
on which is expected after each operation.

Change-Id: If0f2e96909ff20753043734789397d190cedb502
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90663
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-03-18 07:30:08 +01:00
Ashod Nakashian
b2ec95dcfd cypress: new impress editing tests
Single- and double-click starts editing
text-boxes in Impress. Single-clicking works
only on text, not in the white-space.

Merges an existing test with a new one to
minimize redundancy where there is overlap.

Improved helpers to minimize duplication
and update a single place when there are changes
to the common operations/checks.

ESLint version set to 6 to support the inline
closure syntax that 5 doesn't support. This is
only used for tests, so perhaps we should have
a different ESLint config for leaflet to avoid
breaking IE11, which is pre-6.

Change-Id: I14ee65b18e310f4ff6b93ce81580b3d6aba0fa03
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90360
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-03-17 22:53:11 +01:00
Tamás Zolnai
f9cec18eda cypress: improve afterAll() method.
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>
2020-03-13 17:43:39 +01:00
Tamás Zolnai
7455f69dd7 cypress: mobile: improve core detection code.
Pushing ESC has an unexpected side-effect
on some tests.

Change-Id: I147fcc3aaac21e56450eececf60e8cb99b49655f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90467
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-13 14:47:53 +01:00
Tamás Zolnai
cb9fa14d23 cypress: fix failures caused by dirty test documents.
It seems sometimes writeFileSync() method does not
actually overwrites the document and some tests loads
a test document modified by an other test.
Hopefully removal of the file will solve this issue.

Change-Id: I2cecfd367acce185eeebbdc4269a73a9d1d2dd5a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90339
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-11 19:12:21 +01:00
Tamás Zolnai
b5fb0e87fb cypress: increase default timeout.
Change-Id: Iba6a4ee5c4af6479f9cbe2e2d6ed585dd906b593
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90325
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-11 13:48:31 +01:00
Tamás Zolnai
79073f6ce1 cypress: mobile: add first insertion related tests for calc.
Change-Id: I57561ef5687119cd53d99ea46e9ca3a269548422
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90237
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-10 11:18:04 +01:00
Tamás Zolnai
9396cedd28 cypress: mobile: move writer related helper functions to a separate file.
Change-Id: I02dee0270d3b572ae26b3f871fa4c41c0c397e54
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90222
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-09 14:56:56 +01:00
Tamás Zolnai
a0ce834641 cypress: mobile: fix random failure related to long press.
Change-Id: I61698639c0461c0acc6b2c97641d732b036a9d1b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90061
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-05 21:15:23 +01:00
Pedro Pinto Silva
f401f1f714 Hamburger menu: adding ids (so it uses the respective icon) and adjusting cypress file
Change-Id: I33ad1671cc859ea1af1350f3e3d3a83b33c355c5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89532
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-26 12:41:57 +01:00
Tamás Zolnai
4f864162e4 cypress: mobile: update table related tests.
Change-Id: Idd65edc8d3c007afec9e93e0a103379c579a178c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89379
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-24 22:10:38 +01:00
Tamás Zolnai
48bca31c9e cypress: mobile: make selectAllMobile() more stable.
Change-Id: Id8b919e3e0a18b28746541ee2a65e52f85458fa9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89353
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-24 16:05:13 +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
248fa4f21f cypress: mobile: Introduce a method to workaround wrong mobile wizard content.
Change-Id: I59ceb56f049378c3e236822b0059d0413e107b95
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88973
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-18 18:33:57 +01:00
Henry Castro
cefcfcfe19 loleaflet: mobile: use hyperlink tag for context menus
Change-Id: Iac83687794c90ff3439e7a5c833d24007ec52ec3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88545
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-02-17 15:58:11 +01:00
Tamás Zolnai
3b500642d4 cypress: Fix build failure related to field insertion.
Use en-US locale. In the tests of date / time fields
the date format contains the locale, which was set to en-US
originally.

Change-Id: Ida56dd8a3e64b0c81d70d010f3aabf40da7d73a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88620
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-13 18:53:34 +01:00
Henry Castro
ff7cd32ba2 cypress: ensure English locale
My browser is Spanish by default

Change-Id: I2f3a2aaf7a6b0856c778dc9b943e23f8c168a394
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88568
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-02-13 15:30:29 +01:00
Tamás Zolnai
5d41b930e6 cypress: mobile: Organize tests based on component.
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>
2020-02-12 19:14:42 +01:00
Tamás Zolnai
65d8f4062f cypress: Fix tests failing with CI.
Change-Id: Iea1292bf44d77403356b3e9800c2af4c2237d08d
2020-02-08 17:43:30 +01:00
Tamás Zolnai
8dece1a3c3 cypress: mobile: Update some table related test cases.
Change-Id: I7c780785aab9db40e9b1f6312728ee5459e7716b
2020-02-07 12:31:43 +01:00
Tamás Zolnai
f53e030339 cypress: mobile: emulate tap and long press events.
To achive a better test covarage.
Now, the simple click() method is recognized
as 'tap' by hummerjs. For long press we need
to use low level events.
I expect that we can emulate other mobile events too
on a similar way.

Change-Id: I5f43afafe087133e707eed6ff8a43765324d5e24
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88161
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-02-07 10:09:54 +01:00
Tamás Zolnai
ce063cdce4 cypress: mobile: Do the core detection inside a beforeAllMobile method.
Change-Id: I80717c8aca5b7e75f282c38aaa1608ddd14facda
2020-02-06 14:23:34 +01:00
Tamás Zolnai
e6ee678592 cypress: Introduce a way to detect LO core version.
And disable some failing tests for core/master.
No idea why these items are missing from paragraph
panel with core/master. Seems a regression from cp-6-2
to master.

Change-Id: Ia91f38cbcf74d0b45730c8643559c298376ae153
2020-02-06 14:23:34 +01:00
Tamás Zolnai
1a8b128ac2 cypress: mobile: Add more tests for table panel of mobile wizard.
Change-Id: I4a3126ccb01ed7afdefd0de6bacec11d23a7406a
2020-02-05 13:44:18 +01:00
Tamás Zolnai
14ce7ab937 cypress: mobile: Introduce copyTableToClipboard() method.
And use it to check insert table's properties.

Change-Id: I7b188ddd139db2f6de5e2872277dce022073171d
2020-02-04 15:33:49 +01:00
Tamás Zolnai
e7d8c7456f cypress: mobile: Use a bigger mobile screen size.
Change-Id: Ica3598dd2f963b46891114a67c76f0d4da205c11
2020-02-03 06:37:36 +01:00
Tamás Zolnai
1cfc1c59e9 cypress: Check the admin console to make sure the test document is closed.
Change-Id: I485e8596a30c7bb1efae140143627078cde66bca
2020-02-03 05:53:22 +01:00
Tamás Zolnai
43e09d20bb cypress: mobile: Extract after method to close document properly.
Change-Id: Id88aec59546cf1bdb51630405756a4321ecabd6c
2020-01-30 15:17:39 +01:00
Tamás Zolnai
92f93481dd cypress: mobile: Extract copy to clipboard method.
Change-Id: I1c4a74b7e50a1b8dae503c8fd8af04c9a49a07b6
2020-01-30 15:17:39 +01:00
Tamás Zolnai
8d906e4b1a cypress: mobile: Extract selection method.
Change-Id: I0fb69a9f5acf90ce76951a83b4220ac52e550fb2
2020-01-30 15:17:39 +01:00
Tamás Zolnai
89f05278bb cypress: Make test run fail when an exception is thrown.
Change-Id: Ie96cb771c9cec737c0352a843e42b14161cf9e7f
2020-01-27 17:17:04 +01:00
Tamás Zolnai
b64907e918 cypress: Extract test document loading code.
Change-Id: I77b2097bd9406ec63fbb9133678456444457ca2b
2020-01-26 02:41:06 +01:00