Commit graph

190 commits

Author SHA1 Message Date
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
Tamás Zolnai
fdbca4dcf1 cypress: mobile: restore original selectAllMobile() in writer_helper.js.
Using CTRL+A is simpler, but with using the Hamburger menu we can
make sure that menu item is working. CTRL+A is not an actual
feature on mobile. Also it's good that we use hamburger menu, so
we can check interaction of hamburger menu and other wizards
using the same bottom panel.

Change-Id: I640e515070046ad18b00be69509ed895844962a0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90710
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-18 20:44:48 +01:00
Pedro Pinto Silva
a28a759212 Mobile: Writer: Insert: Add missing icons to Formatting marks submenu
Change-Id: Ieadca0bdb5668d0bdc8ee9356879b652b540ab3c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90659
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2020-03-18 15:35:48 +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
4ff5406701 cypress: reuse helper to enable editing in tests
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>
2020-03-18 10:14:31 +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
bc5bf2eb2a cypress: calc assert we are in text edit mode in focus test
Change-Id: I21471d14d4bc44b20d252757c3bbb770e069bc81
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90649
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-03-18 04:56:01 +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
29aa5e15d2 cypress: calc-mobile: add tests for spellchecking menu.
Change-Id: If0c1af21c69b49452ccdc24e3c908396a045e03d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90615
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-17 18:23:10 +01:00
Tamás Zolnai
8fb24f51f4 cypress: mobile: disable this unstable test.
Testing focus is hard in general. Easy to hit race contiditions
when focus behaves inconsistently.

Change-Id: Ib16789d5a9875e8041785ba353b7ab8f7c82a7a7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90658
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-17 17:36:04 +01:00
Tamás Zolnai
d534dc9c03 cypress: mobile: this TODO is solved already.
Change-Id: I88f0579efaa135ba987d6c40750c173004152e97
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90614
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-17 12:36:40 +01:00
Tamás Zolnai
4c57f43d60 cypress: mobile: skip this unstable test.
Change-Id: Ie9f78fd2bc50bd153a490271322236b2c5a3bf6d
2020-03-16 12:31:38 +01:00
Tamás Zolnai
7b4bf196d2 Revert "cypress: mobile: reenable a focus related test."
This reverts commit 584e707ddb.
2020-03-16 10:29:30 +01:00
Tamás Zolnai
8c6bc949da cypress: better parallel build detection.
Now it works both with '-j' and with '-j <number>'.

Change-Id: I41ebace6fd799f103ce557a8cf8419fea786faca
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90496
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-14 22:04:32 +01:00
Tamás Zolnai
8638c87af7 cypress: mobile: simplify selectAllMobile() in writer_helper.js.
Change-Id: Icd889564b6191ad0f50008b989b06ecaf94d35e5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90488
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-14 12:46:10 +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
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
Tamás Zolnai
52d9cde47c cypress: mobile: improve selectAllMobile in writer_helper.js.
Change-Id: I789a7b7c5b03b9f222730ec2fd06c8c9514578d7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90469
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-13 15:00:43 +01:00
Tamás Zolnai
e4e24c6869 cypress: ignore helper.js files during running tests.
Change-Id: I2d74c4138a2ed05fd97630edf16d3daf4a67de91
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90468
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-13 15:00:37 +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
584e707ddb cypress: mobile: reenable a focus related test.
This test does not work since:
ac961d7b67

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>
2020-03-13 12:03:56 +01:00
Tamás Zolnai
f49783b7be cypress: add package.json as a dependency of local npm installation.
So packages will be reinstalled, when packages.json changes.

Change-Id: I4731b4995bc969a474ea3fcd36e1135ed03ec62c
2020-03-12 19:02:32 +01:00
Tamás Zolnai
25e3beb65e cypress: fix tests failing with the new cypress version.
Change-Id: I0a5b307b7770e0150304329ba136f4ed059c6928
2020-03-12 19:02:32 +01:00
Michael Meeks
54c03079ea cypress: update to 4.1.0.
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>
2020-03-12 19:01:51 +01:00
Michael Meeks
9e0ec98aaf cypress: rename the user-agent to not include a space.
Makes some combinations of chrome etc. happy it seems.

Change-Id: Ica8063e42a8719f2ba45de9084ad1fddd6fb58bd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90419
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 18:51:30 +01:00
Tamás Zolnai
8c23b7a511 cypress: mobile: make shape related tests more stable.
It seems the default client viewport is not alway the same.
Selecting a long text and then go to the start of the paragraph
will force to have the same view before testing shape
insertion.

Change-Id: I590c69f02faea1b45b087ee47f04b55bf3b08312
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90431
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 18:19:26 +01:00
Tamás Zolnai
96b81b18d0 cypress: mobile: update shape related tests.
Default client view was changed.

Change-Id: Ie8506b133fba43bcddff238fc0cefc31911e3dee
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90426
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 17:47:50 +01:00
Tamás Zolnai
fd1dee501d cypress: disable supportFile option.
Parallel build sometimes fails because of missing supportFile.
We don't actually use the supportFile. An empty support file
is generated by the framework.

Change-Id: I09d79678638ae9776e1568bff5f9267623d966f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90374
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 12:07:03 +01:00
Tamás Zolnai
d0fe43bffa cypress: catch also AssertionError.
Change-Id: I78a5d0f5a160a68197019735565689f61a5cdb39
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90372
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 12:06:55 +01:00
Tamás Zolnai
f1a75a2d30 cypress: mobile: use mobile wizard indicator before useing contains().
Change-Id: I9565b6f14dc00d21bf0a446af8e554843bc511bc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90371
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 12:06:49 +01:00
Tamás Zolnai
9ebdf2329a cypress: mobile: replace contains() with .should('have.text',...)
It seems contains does not mean a retry functionality
which tries to find the item in the given time window.

Change-Id: Ib26a5d84a1dacbddcb56dec6fd4a0901ba7d2295
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90351
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 12:06:42 +01:00
Tamás Zolnai
e7a267d4c5 cypress: mobile: check the selected state of font combobox item.
Change-Id: I41a8fc86fbb1ad9bd5d48ac6d47c15e9322fa677
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90350
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-12 12:06:30 +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
67f8ee7aa9 cypress: mobile: Don't check the actual date here.
Change-Id: Ia324d83bf62d2e3dbc36087c3ff29f934b125953
2020-03-11 09:34:28 +01:00
Tamás Zolnai
bbf31dc62a cypress: mobile: test changing font properties in calc.
Change-Id: I23b26ed9d9866bace0b8f83a7e54674d8c49d451
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90292
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-10 19:48:43 +01:00
Tamás Zolnai
3e2daa3c1c cypress: mobile: fix random timeout failures.
Change-Id: Ib24afb049ccd37899a15fcd416f36a6e2c0c4b1e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90260
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-10 16:01:54 +01:00
Tamás Zolnai
59f3da937c cypress: mobile: add more calc insertion tests.
Change-Id: Ifc7e1a857c0068f11a7b1339af82379f562a0c42
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90252
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-10 16:01:35 +01:00
Tamás Zolnai
ae759479f7 cypress: better way to find out test failure.
Change-Id: I2a398714976f65977cc64490206e7e57c1da5d86
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90256
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-10 14:56:51 +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
90c5717466 cypress: mobile: avoid hard coded coordinates for calc focus tests.
Change-Id: I9da74fcd090371cbea5b3a8c8836bf9236f709b3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90224
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-09 15:39:40 +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
b1b566c79f cypress: mobile: extend test of comment insertion.
Change-Id: Idb8539a353e884206b7e7b4885b60fa706f81d10
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90111
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-06 15:44:20 +01:00
Tamás Zolnai
8164c2cbc1 cypress: mobile: extend test of hyperlink insertion.
Change-Id: I433b819d5e76c56018fa15da539c48b1ceaeb022
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90110
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-06 15:31:03 +01:00
Tamás Zolnai
68924966c0 cypress: mobile: merge styles tests to font tests.
There is not much more we can test about styles,
since now we have only an apply style button.

Change-Id: I92a1a6dc60701743af44928966475cf4471b317b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90108
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-06 15:19:34 +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
Tamás Zolnai
6114b8c8ce cypress: mobile: enable some mobile wizard's state related checks.
Change-Id: I0bf19450f14e8e8d99e1a103558499d53f21f760
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89995
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-03-04 21:10:13 +01:00
Tamás Zolnai
883b28fbd5 cypress: mobile: re-enable some skipped tests.
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>
2020-03-04 13:58:33 +01:00
Tamás Zolnai
d9a23d9668 parallel-cypress: improve console output of parallel test run.
Change-Id: I29440bafdba101c3f4e86de7d587330b972289de
2020-03-03 16:00:30 +01:00
Tamás Zolnai
033e353e9d parallel-cypress: restore original sequential build.
Running all tests in one command will display a better output
and also might be faster.

Change-Id: Ib061fad28eeb1246c774bfb7fd958c3f5b9c317b
2020-03-03 12:41:54 +01:00