Commit graph

13776 commits

Author SHA1 Message Date
Tamás Zolnai
c3e1986d63 cypress: remove workaround for multi-user test cases.
We had an issue with loading two views to the same document
at the same time.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8b1ba92eca5e59bfa50cbcd637f1076d5e15c664
2021-01-14 15:04:13 +01:00
Tamás Zolnai
efb96f0700 cypress: reenable paragraph_prop multi-user test.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If57964320d2615c81b0bcbc57c0f942e463c60ea
2021-01-14 15:04:13 +01:00
Tamás Zolnai
d1118b43be Fix wrong view info when opening two views close in time.
The issue is that we passed viewinfo messaged to do _docLayer
in wrong order because of the too simple delaying mechanism.

Wrong scenario steps:
viewinfo-1 arrives: _docLayer is not initialized yet -> 100 ms delay.
viewinfo-2 arrives: _docLayer is initialized now -> pass to _docLayer.
viewinfo-1's timeout: _docLayer is initialized now -> pass to _docLayer

Better to use the more sophisticated delaying method.
See _tryToDelayMessage() and related methods. They keep the order
of the messages.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I335b350b1553cfdee573f7d2e57c86c4b8f9af84
2021-01-14 15:04:13 +01:00
Miklos Vajna
78f192399d Revert "wsd: disable ssl by default, enable ssl termination by default"
This reverts commit f6bf6f49ed. I did not
consider that this makes it harder to do a local developer setup with
reverse proxy + make run; also that if you don't read the doc to set up
a reverse proxy, then the default now serves http content and advertises
https, which is not helping sysadmins.

This needs more thinking how to improve one scenario without hurting
others.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic789faa2dc5bb19a79d651dc81d4eaaf0b48607a
2021-01-14 13:59:44 +01:00
Tamás Zolnai
6786f563f8 cypress: print out test failure output online during parallel build.
Before this commit failure logs were gathered inside an error log
file and they were displayed after all tests are finsihed.
After this commit we print this failures logs when the error occurs
and also at the end of the test run. Sometimes Jenkins does not finish
the whole build because of timeout abortion. In this case, it would
be helpful to see some failure logs.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ibe7cb6aa2c9f99912d604c4b642cda363352ffcd
2021-01-14 12:57:41 +01:00
mert
f72d394a02 Fix calc text-input focus problem on Android
Change-Id: Iacd279f741c35703807f14a9798fbe2ef0f45d50
Signed-off-by: mert <mert.tumer@collabora.com>
2021-01-14 11:27:12 +03:00
Szymon Kłos
fe5454faa6 popup: improve text layout
Change-Id: Id3700692706bb67b8e626b24a2ae9c10dff1f772
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-14 08:16:33 +01:00
Andreas-Kainz
79374db3ae Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I3ce2be9cc6362c09725fe1692e6853f195274211
2021-01-14 06:29:37 +01:00
Ashod Nakashian
ce3dd02ef3 wsd: new NetUtil file for network utilities
Move the connect function into the NetUtil
translation unit to aid using it for the
upcoming async socket logic.

The NetUtil should also come in handy for
the miscellaneous network helpers we have.

Change-Id: I2ee0c6e3e1769fd87572d7407d3b4979b59ffe6a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 22:05:18 -05:00
Ashod Nakashian
18446d63cf wsd: test: don't report test timeout outside of tests
Change-Id: I6c5042578a3b718e2305139c0e4ea390b4a43ed3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 22:03:29 -05:00
Ashod Nakashian
307900ef9f wsd: misc and cosmetics
Change-Id: I407a20af9297278bdfd06ef3587cdb1d5fff0195
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 16:24:29 -05:00
Ashod Nakashian
417d19bce6 wsd: log when simulating socket error to help troubleshoot
When we simulate socket error it's hard to understand
what is going on, since there is no real errno to
explain the -1 return value. This is at least true
in the SSL case where we don't set errno (perhaps
we should?). At any rate, it's good form to log
that we are messing up with the return value and
that the real socket API hasn't been even invoked.

Change-Id: Ib76f0259dbdcfe0cfae97343c11ca45461079fa1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 16:24:29 -05:00
Ashod Nakashian
6713c2a8d5 wsd: avoid reading the config entry more than once
This code is executed regularly, at every poll.
The config getter internally throws exceptions,
catches and handles, before returning. While
this isn't performance sensitive, it is noisy
to have such poor-behaving code executed
frequently and regularly.

But the real motivation is the pain this exception
causes when debugging an exception. GDB ends up
catching this rogue exception, which is hardly
useful or helpful.

At any rate, we don't need to get a config entry
more than once, as they can't change during the
lifetime of the process.

Change-Id: Ic69fb94674b74b298987131d44d9baa27e9fa4aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 16:24:29 -05:00
Michael Meeks
673c3cfb98 Remove un-used _isLoading and ScopeGuard.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I0f7536023cbbef52087c3110565d046dd1ab8835
2021-01-13 16:55:35 +00:00
Shubham Goyal
3a3867e1c6 Resolve #805 : Remove Mutex lock
Signed-off-by: Shubham Goyal <22shubh22@gmail.com>
Change-Id: I80da9d085590e67c0998ce971225a8c9903c0bb7
2021-01-13 16:55:35 +00:00
Pedro Pinto Silva
ad87fb854d Fontwork: layout improvements
- iconview fix layout without using hard-coded margins
- fontwork: make sure the elements start at the same left position as the title and that they occupy the dialog evenly
- hide unnecessary label
- space-around when on mobile

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia92acf1cbf09a3e7c6e996f9a846163835b115af
2021-01-13 16:57:16 +01:00
Tamás Zolnai
db0e7e9973 cypress: simplify typeIntoDocument() method.
cy.click() will grab the focus to the textarea.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I20f0df2fd8a31d3ff4b85ba38fdc503c10987dbb
2021-01-13 16:43:35 +01:00
Ashod Nakashian
06c5c90dd5 wsd: test: support SSL in classic tests
Add support for configuring the SSL certificates
when running the test binary as well as setting
up the SSL context.

Also adds the SSL socket headers with proper
compile-time guards for when SSL is disabled.

Change-Id: I99992639a66a64871f8ff8a2b2105279ead63ca1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
feac95ab77 wsd: test: shorter poll interval during tests
Technically, the poll interval should be
irrelevant because the tests should wakeupWorld
when they need to break the poll. However, it
turns out that many tests implicitly rely on
the poll interval to be large, and if for
any reason the poll wakes up, the tests either
advance their phase too soon, or assert, causing
random failures and reliability issues.

As the tests should now be more robust (at
least the ones that were non-deterministic
in this way), we can now lower the interval
to catch other cases (either extant or in the
future).

Change-Id: Id0d472e70875db8669bb21c6582b0d5052b19bfb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
95a9c5aaee wsd: test: simplify sending commands
This introduces a new macro, WSD_CMD,
used in tests only, to send a command
while logging it and its file/line of
origin.

Makes the tests more readable and the
logs more informative.

Only a handful of tests updated.

Change-Id: I55a38b35d7140a1f31f20c3c904d7eff6b19346f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
3b8058d7ac wsd: test: make Version Restore test robust and simpler
This makes the test more deterministic and simpler.

We should only modify the document after it's fully
loaded. After that, we can immediately restore the
version. So we really only need three phases and
the onDocumentLoaded callback.

Change-Id: Ic59c9d4c8e03edb8e80853daf482a6c065e7c015
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
6db0d213bc wsd: test: make owner-termination test robust and simpler
We only modify the document after it has fully loaded.

Otherwise, we risk intermittent failures due to timing
issues with when the modify commands are processed.

It's also more readable this way.

Notice that we do close the document right after
sending the modify commands. This is to test that
the modification is actually registered and is
visible when the close command is processed.
This is the whole point of this test in the first place.

Change-Id: Id3bd598b9416be901a73d6cf804563d81a245ebb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
24f443ccf4 wsd: test: make UnitWOPI test robust and simpler
We avoid relying on poll timing for the different
phases, instead we use the document events callbacks
to trigger the different phases of the test.

This improves the reliability of the test and makes
it more readable.

Change-Id: Ief3374acf823a89dca1412ff808cc09095f8e2e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
ae9cc18212 wsd: test: make DocumentConflict test robus and simpler
This makes the test less reliable on the timing of the
poll that pumps the phases by using the proper callbacks
for the different document events.

We need to wait until the document is fully loaded before
we modify it. Here we do that in onDocumentLoaded.

Change-Id: Ibf4a5b5601449b729b1e62b621f82c1957eb8a65
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
15b6ddccd0 wsd: test: move inherited filterSendMessage to onFilterSendMessage
This allows the UnitBase class to handle the messages
and dispatch to convenient handlers. This simplifies
the implementation of unit-tests and makes the
parsing more centralized than it is now.

Change-Id: Ice8f169ecfd12d49ee7cbd4fb9021a163b14f4ba
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
1fb968ac08 wsd: test: remove redundant wakeupWorld and log the exit status
And introduce passTest and failTest to log a reason
and be more informative when reading logs.

Change-Id: I5090793b802a29135de8ea3783a457e189cc7df3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Miklos Vajna
f6bf6f49ed wsd: disable ssl by default, enable ssl termination by default
The intention is to have defaults which are close to how people
typically use Online in production.

However, keep using ssl for 'make run', so that the https environment in
the browser is unchanged.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7fd725a83b0e9ca1012f2c0e0c3bf038e5fa0059
2021-01-13 13:33:44 +01:00
Pedro Pinto Silva
04ca03925d Notebookbar: disable command: easier to scan its status
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5f89c40f65a111de1a08d6e55eaaa68499449ed3
2021-01-13 11:35:28 +01:00
Andreas-Kainz
1f5feb1534 Notebookbar: disable commands without gray background
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I539d70ab1ba07d27cf34b61a8bf1a333e0bc4531
2021-01-13 11:35:28 +01:00
Szymon Kłos
ddcc45860c jsdialog: TreeView doubleclick to activate row
Change-Id: I312770470bf05c07c85c7962ce97132558c031f6
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
5aed87e10b Add fontwork dialog to the ui
Change-Id: I3c66f2e6db4fbfa5dd42484e260113e6233d62fd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
bfc91864c0 jsdialog: implemented IconView
Change-Id: Ifb27b008396cba9c4695058096ae4f1757fa0a26
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
8e6ea69206 jsdialog: draggable only using titlebar
Change-Id: I7ee2cf4f1bc0d39a13b8689e3ab1db395665d201
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
08d49d9e9a Mark current linespacing setting in menu
Change-Id: I283082d7d78359861a7920290e99f90393ef6588
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
33ab7bdc6f autofilter: don't allow to place outside screen
Change-Id: If4a0583e4160726bd0801a029161ba09442ab4f3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
1088e59a0c Initialize menubar only once
readonly for some reason is fired twice

Change-Id: I04db49decb810f3cc5238b50bf377f38b22a97c1
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
220c93ce2f notebookbar: clear timeout on remove
Change-Id: I8d7290e48a0c0235cdfb6c96f15205da0c220aa6
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Tamás Zolnai
6352574018 cypress: remove duplicate selectFirstColumn() helper method.
Now we have it in the general calc helper file.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id7f12441b9612a630f6b348a9e6db6235f4b6c45
2021-01-13 05:00:19 +01:00
Andras Timar
2dc31a7648 check if we run in a container
* and fix error reporting: we do not abort every time when loolforkit
  is invoked with incorrect user name

* and better readability of the conditions

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idc9db40c00d41c95160db130eb324c487f14de17
2021-01-12 22:24:28 +01:00
Andreas-Kainz
e50a2d8ce4 Writer NB: Layout tab fix icon size of align commands
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I96b21a616756d79ebb45a1d12e8bdeb4dfabc80d
2021-01-12 18:36:15 +01:00
Pedro Pinto Silva
393bc9e810 NotebookBar: Promote saveas to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I357b0959458cf3ca72ec7cc0d8b10ee9fad2bdaf
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
e0cadd813c NotebookBar: Promote shareas to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6526ec70eac50d9295f9a53687e4ba41613205ec
2021-01-12 16:52:57 +01:00
Szymon Kłos
33e9d0de53 notebookbar: share revhistory and print with menubar
Change-Id: I27166ab6ff97901945a55f1eb75297875090f5ff
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
0e84320d7e NotebookBar: Promote Revision History to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I33c8a6ced4b502aae4aac8dfcb745c5b46c88556
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
4091145598 Notebookbar: Promote Print to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic100b0857d9617c5fcdf3d2ea8a992206cd0cf5d
2021-01-12 16:52:57 +01:00
Ezinne Nnamani
74f14cccdf Created Cypress test for Merge cells in Desktop Calc
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: Iba89ea0a2bc5b788c9202247d5cada801fc6d5f6
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2021-01-12 13:44:07 +01:00
Szymon Kłos
bbecabed82 mobilewizard: refresh sidebar after border change
Change-Id: If4ef31d47c3831cbc4918b2cf168cae9acd542e0
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Szymon Kłos
8e25f04e8b mobilewizard: add disabled state for toolbox children
Change-Id: I5fb30e63b05a32f986c6eab587bea089ba5f2294
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Szymon Kłos
702f3b3036 mobilewizard: send XLineColor data properly
Change-Id: I79a53f23a7efdc6f404192baedc0ac4bf50c2bb3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Ashod Nakashian
07cf0d52ef wsd: default UserFriendlyName if missing
While UserFriendlyName is an optional field
in the WOPI protocol, Core needs it for
the Author of the document. When it's blank
the Author is not set and the document fails
to load.

By default we are at least able to load the
document with a sensible placeholder for the
Author. Meanwhile, we log a warning to let
the integrators know of the issue.

Documentation updated.

Change-Id: I4dd2c9d164b4d889f85701a4a27ee8d395bff220
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-11 22:07:21 -05:00