Age | Commit message (Collapse) | Author |
|
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.
Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: Ie261167fc3e1ed9073210e0f8b179455da340c83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167620
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
|
|
keeps crashing on the Windows jenkins boxes
Change-Id: I80415432dab9a2967c9a85fcf89f3840eecc91e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163454
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia4dfbd1afcf01028d8292ca656979d7017196244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159669
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
|
|
The API doesn't actually work there yet because we don't get any event,
so there's no point in exposing it there, and it makes it clear it
isn't available there, avoiding future user to wonder why their tests
do not behave there.
Change-Id: I38dcc98ad3bc3b669df64bc1c53c91ef48a0d717
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
On e.g. Windows we need to let the dialogs fully finish starting up
before we can properly interact with them, and especially close them
again.
We notice new dialogs with the WindowActivate event, but this will
happen before the dialog is fully set up internally, leading to
failures on Windows. In practice, the WindowActivate event might be
dispatched before the dialog setup function finishes, leading to an
intermediate state at WindowActivate time.
Work around this by running the user code in an idle timer in response
to the WindowActivate event, so that the setup code can return before
the callback is dispatched.
Based on findings by Michael Weghorn, thanks!
Change-Id: Ieecee09d84144570fe1943ca12dc1db6d9f64524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146378
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I7e3d78e6cf80afb72be61942ac95c474dae0424d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147669
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Interacting with dialogues in tests is non-trivial, so introduce
helpers to make it simpler and less error-prone.
Add tests for the infrastructure itself as well.
Change-Id: I8ea6087a61380194eb2b5ec9f25091db00f5a550
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142258
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
The reason for accepting empty attribute was eliminated in commit
2f91ab025de850fe5af8114565755a8deed55911 (Merge two assertXPath
overloads that both check number of nodes, Nov 25 16:36:57 2022)
Change-Id: I6cd77eb0f73650dfdafd55946b5269ffe3f0bde5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143304
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
See tdf#42949 for motivation
Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132369
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
|
|
This resulted in segfault instead of a useful test failure message.
Was this way ever since 548b360c0e4693aac0cbdd2fcc1aab433fc54010,
and before in 6e31cbb4eaea3c6600248ba59a22853acc1d6606 and
9791453283407a0a129a71767a290058ac759da2.
Change-Id: I498d1c84a4eaf3e8180dedd67d1176cf6f8c1a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118916
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
in unit tests
Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Previously, for an XML like this:
<sharedItems>
<d v="2017-07-10T09:11:02"/>
<d v="2017-07-10T09:11:03"/>
<m/>
</sharedItems>
the call like
int pos = getXPathPosition(pDoc, "/x:sharedItems", "absent");
gave 3. That could result in mistakes, when a test would assert
on position "3" for a child element which name is mistyped.
I made such a mistake when creating a unit test trying to assert on
a position of the last element, and writing its name as "x:m", like
in rXPath itself; the return was 3, and I initially wrongly assumed
that the return is 1-based (like in xpath bracketed expressions).
rChildName made const OString&, for consistency with rXPath, or with
rAttribute in getXPath: child name is just a part of a longer xpath.
Change-Id: I7ba9c4466c75b1b10fce1ccf26ef3b56b4e11e87
Reviewed-on: https://gerrit.libreoffice.org/71614
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
... to guarantee that e.g. getXPath will always fail for non-empty
non-existing attribute
Change-Id: I22cf932eda020abf16608341fcd1769b35478883
Reviewed-on: https://gerrit.libreoffice.org/70891
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|