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>
- 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
cy.click() will grab the focus to the textarea.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I20f0df2fd8a31d3ff4b85ba38fdc503c10987dbb
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Now we have it in the general calc helper file.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id7f12441b9612a630f6b348a9e6db6235f4b6c45
* 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
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>
The development environment is necessary analyse
the logs, so disable setting SAL_LOG instead to
add a parameter to already a long list of options
Change-Id: Id8e4a66e1dcb32c636806e47e1d69270af4c53f5
Signed-off-by: Henry Castro <hcastro@collabora.com>
jsdialog updates require main container for control to have
id equal to the widget id. In case of radiobutton it wasn't true.
Fix it for desktop for now and leave for mobile as is (used
in cypress tests - so needs reworking)
Change-Id: I9220b289185ff6a72ea08360f0fa0570db40f95b
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
A minor cleanup of UploadResult to make tidy
it up a little bit and make it less specific.
Single-argument constructors should be explicit
to avoid unexpected conversion and other surprises.
Change-Id: I57599805743dffddac620f501dc6ca79c2217f89
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>