summaryrefslogtreecommitdiff
path: root/test/qa
AgeCommit message (Collapse)Author
2024-10-05Use good old string literals in assertXPath and friendsMike Kaganski
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
2024-05-14loplugin:ostr in testNoel Grandin
Change-Id: Ie261167fc3e1ed9073210e0f8b179455da340c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167620 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-02-15disable CppunitTest_test_a11y on WindowsNoel Grandin
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>
2023-11-19Extended loplugin:ostr: testStephan Bergmann
Change-Id: Ia4dfbd1afcf01028d8292ca656979d7017196244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159669 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann
Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2023-03-03Disable test::AccessibleTestBase::awaitDialog() on macos altogetherColomban Wendling
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>
2023-03-03test: Run user dialog callback in idle timeColomban Wendling
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>
2023-02-25Fix typosAndrea Gelmini
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>
2023-02-24test: Add accessibility test dialog infrastructureColomban Wendling
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
2022-11-25Require valid attribute in getXPathMike Kaganski
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>
2022-04-02Recheck modules t* with IWYUGabor Kelemen
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>
2021-07-15Fix UB calling operator<<(std::basic_ostream) with nullptrMike Kaganski
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>
2020-05-07fix memory leak of xmlDoc objectsNoel Grandin
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>
2019-05-01Make getXPathPosition assert on requested child foundMike Kaganski
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>
2019-04-18Add a test to check XPath testing facilities in XmlTestToolsMike Kaganski
... 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>