summaryrefslogtreecommitdiff
path: root/uitest
AgeCommit message (Collapse)Author
2021-06-26uitest: introduce load_empty_fileXisco Fauli
to make sure the documents are closed in inverse order when different documents are used in the same test Change-Id: I97ff33f9f91423d06f4e74bba6fc6a5312b24a17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117914 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-25uitest: raise exception if timeout is reachedXisco Fauli
Change-Id: Ibcde404456f5c71484d925c47eb2a0c20c601033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117785 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-25uitest: guard execute_dialog_through_actionXisco Fauli
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I8b0e4aa746f7973b1bd1343219820d8b2315cf19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117703 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-24Revert "uitest: guard create_doc_in_start_center"Xisco Fauli
This reverts commit 374baf308979306aa35575118c40ccd7caae1e29. Many uitests are failing randomly in jenkins for no apparent reason Change-Id: I5960330fab4967518bfeea32b3b8c5f8bfbea57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117752 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-23Introduce wait_for_top_focus_window to fix UITest_calc_tests9Stephan Bergmann
...which I had seen hang at least once, and after a manual `kill -9` of the hung soffice.bin process (still yielding in UI loop from within executing a dialog), it failed with > ====================================================================== > ERROR: test_tdf57841 (tdf57841.Tdf57841) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "sc/qa/uitest/calc_tests9/tdf57841.py", line 27, in test_tdf57841 > self.assertEqual('true', get_state_as_dict(xDialog.getChild("tab"))['Selected']) > uno.com.sun.star.uno.RuntimeException: Could not find child with id: tab vcl/source/uitest/uiobject.cxx:467 (The subtle difference in naming is that wait_for_top_focus_window waits indefinitely, while its sister wait_until_* functions (like wait_until_child_is_available) can time out. There is no good reason here to allow for timing out.) Change-Id: I3e4dc68871f42d64160d8e411fe9a661bbaec192 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117739 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-22uitest: guard create_doc_in_start_centerXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I75ef7712af3676363a9a464acf83f6f68ffc4f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117617 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-22uitest: guard load_fileXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Ia924293dc2a12230fd13f69fd734875ced86be8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117593 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-21uitest: guard execute_blocking_actionXisco Fauli
so even if an assert fails, the dialog is closed afterwards for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I9a3adb52546238d960eeaaaf03b6bdbbd5718cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117392 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-08editengine-columns: Create document model and dialog pageMike Kaganski
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-07sw/qa/uitest: close the dialog if thrown an exceptionHenry Castro
if a unit test opens a dialog and exception is thrown if does not exist a control, the terminate() method fails, the unit test will wait indefinitely for the subprocess to terminate. Change-Id: I6dc77b2db8ce042ead78d13ce57e91892cd2db90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113896 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-06-06UITest: introduce guarded context managersMike Kaganski
They should be used wherever we need to make sure to execute some action in tests regardless of the assertion success. They follow their plain counterparts, and execute finalizing code at all outcomes. This e.g. allows to assert when a dialog is open, and have it properly closed on failure, so that the test is not left in hung state. Only two wrappers are implemented now: load_file and execute_dialog_through_action. sc/qa/uitest/chart/chartLegend.py is updated to use them. Change-Id: Ib9cf44304f0d3ab8fa3377922ed36d2d866031b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116692 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-04Fix UITests that use File Open dialog to load documentsMike Kaganski
It relied upon the component being loaded before the next Python code line is executed. OTOH, UITest.load_file uses EventListener to wait for the OnLoad event, which should be reused in all such cases. This moves the waiting code to a dedicated context manager, and modifies UITest.load_file to use it. Respective tests using the File dialog also use the new manager to wrap the action starting the loading process. Change-Id: Ic6eb0533b06e0ccc63dffc2ddc0e91d8159cae4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116693 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-04uitest: sd: simplify codeXisco Fauli
Change-Id: If4a3b1d5613e239a967b70309779dbdb6632e6ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115067 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-21uitest: just use .uno:CloseDoc and simplify codeXisco Fauli
Change-Id: Ic5fec6f1dd76aab6b11e822d127f0eb4c705ffae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114388 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-07uitest: factor out common codeXisco Fauli
Change-Id: I4ca17db1ff7221290fedb94700bfb2257e9c647e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113749 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-21select_by_text helper method for uitestsNoel Grandin
reduce the boilerplate associated with selecting an item in a combobox Change-Id: I035967d7b45c84788d67b9ab5bebf2dbfc13fdf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112817 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-17throw exception for errors in uitest actionsNoel Grandin
so we abort early when a uitest goes wrong, instead of letting tests become fragile because it looks like its passing, but the code is just accidentally working Remove code in python uitests that was not actually doing anything (and now crashes because we throw an exception for actions that don't mean anything) Change-Id: I9c52f9fdc06f1c01e9b93b58a5200f9c3684db1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112471 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-11tdf#132293 remove unused imports from uitestVictor Kukshiev
Change-Id: I8f47f87a25c3194c984a2deadcc3df86c6060847 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111499 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-24uitest: no need to pass the parent as a parameterXisco Fauli
Change-Id: I750b5600d3e4ef8ba5a0666133b9066904b4cbec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111450 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-10uitest: sd: check embedded document is open in a new dialogXisco Fauli
Change-Id: Ie2e9e7c9f97fba5f4bb8915098e61f86947197fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110702 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-01tdf#100024: uitest: add comment to existing testXisco Fauli
Change-Id: I120f54616df5c7399707b174b7609f6a82e1183c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110269 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-22tdf#118308: sc: Add UItestXisco Fauli
Change-Id: I4d23b4eda9ab3333eb0c062259601ba9bfb2179d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109775 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-15uitest: sw: factor out common code ( part 3 )Xisco Fauli
Change-Id: I8c65b9729b4a5c91c77c278282b54a9410876ca9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109259 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-12uitest: sc: factor out common code ( part 1 )Xisco Fauli
Change-Id: Ib0b84349c138d361001af4547d91a81d8b5d8e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109166 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-06uitest: sd: test rotate objectXisco Fauli
Change-Id: I3b4e8c4a0cfb29a42350de00b0086e407ac70946 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108811 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-17tdf#138976 change "Cancel" button to "Close" in Template Manager dialogSeth Chaiklin
Change-Id: I3e8cbdb70f70002f1fe2b873e899f25a72463358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107704 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-16uitest: sd: remove duplicated tests and add missing assertXisco Fauli
Change-Id: If2a100e3eef038cc1de1e28cf923e682be7618c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107841 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-16uitest: sd: Check Position and Size dialog after moving...Xisco Fauli
and resizing objects Change-Id: I63ccc96c07a973b53bf448d3a3d2d4eeac406c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107853 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-16uitest: sd: fix GOTOXisco Fauli
pages count starts from 0 Change-Id: I31ce182af1bccf9b129e9c0f2f409ee81419902b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107840 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-16uitest: sd: Add asserts to existing testsXisco Fauli
Change-Id: Ie95d5f1074c9431063e97ffffa521e17e97192b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107834 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-17tdf#137930: uitest: Add assert to check values are not resetXisco Fauli
Change-Id: I28ad4a717000fab894f3df7c41b8e8eeaff5fad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105177 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-05Make order of UITest *.py test file processing deterministicStephan Bergmann
...hoping that this can prevent issues like the one seen with 1b0eb76eb1787d9d9fbd7a7a73ee8ae47b62dc33 "tdf#137617: sc: Add UItest" followed by d1232ee6b5e5cc3c811ef3ad72c83e9bd884bfe3 "uitest: reset formula syntax back to Calc A1" (i.e., where the first commit's Gerrit Jenkins build had apparently only succeeded because it happened to run the tests in one specific order, different from the order in which later, failing builds ran it) Change-Id: I4f1b5ada10d60e77b45a0edeb89069fe9376b63e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105325 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-27uitest: move all calc tests to sc/qa/uitestXisco Fauli
and remove a few duplicated ones Change-Id: I409ca78dcd7a67e993f6b3a1493ffa6fefd127b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104864 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-27uitest: sw: forgot to move this fileXisco Fauli
Change-Id: I429e6ff82cb28bea0c700a7d382509a524aad57d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104827 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-27tdf#104649: move UItest to CppunitTestXisco Fauli
Change-Id: I950432390e65dfabb4562a61b6091b085b9f5d0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104813 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-26uitest: move all writer tests to sw/qa/uitestXisco Fauli
remove a few duplicated ones Change-Id: I25b031c8fe11ae28f55978f8a25528c307a908e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104814 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-24uitest: sc: get_url_for_data_file -> pathlib.PathXisco Fauli
Change-Id: Iea16b30e74a5bbc5fe155f1265d5c05bf104995c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104729 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-23uitest: get_url_for_data_file -> pathlib.PathXisco Fauli
Change-Id: Ib8495528e44f6b1e1f9992cb38d38cca21cfee42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104724 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-23uitest: move navigator tests to their own folderXisco Fauli
Change-Id: Iacc2e21fde8fc126752d0b1fa14cd1f962930d4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104723 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-23uitest: remove duplicated testsXisco Fauli
already covered in sc/qa/uitest/autofilter/autofilter.py Change-Id: I55259bdf741bcf3d51f7970b070bb15aaf144f22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104722 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-01uitest: factor out common duplicated codeXisco Fauli
Change-Id: Ib6d4edaf3bd1b0a4078c277d1139d7b0db479e2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103757 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-09-04uilogger : Add support in the Logger and DSL for MenuBtnAhmed ElShreif
For example the DSL syntax will be: >>Open List From menugearbtn >>Select item no 6 From List of menugearbtn >>Close List From menugearbtn Change-Id: I767948d9bc124a119632825d437746ea38c40ad3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101514 Tested-by: Jenkins Reviewed-by: Ahmed ElShreif <aelshreif7@gmail.com>
2020-09-01uilogger : Add support in the Logger and DSL for Writer-CommentsAhmed ElShreif
For example the DSL syntax will be: >>Delete Comment1 >>Leave Comment1 >>Show Comment1 >>Hide Comment1 >>Resolve Comment1 Change-Id: Ibdd52f3a12f1679f80e9f3290868c77fbf942d6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101513 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-09-01uilogger : Add support in the Logger and DSL for Calc-CommentsAhmed ElShreif
For example the DSL syntax will be: >>Open Comment >>Close Comment The set text is already added by default to the system Change-Id: Ic06e00e75e202eece82fa6265e1bb4083fd8c337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101502 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-08-29Fix typo in codeAndrea Gelmini
It passed "make on check" on Linux Change-Id: Ia1d8d828eea7ca3f39559bd2554cb9778ca6bb32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-27uilogger : Add support in the Logger and DSL for ValueSetAhmed ElShreif
For example the DSL syntax will be: >>Choose element with position 18 in 'colorset' from 'cui/ui/colorpage/colorset' Change-Id: I9186b870da096719873c8709dedbc4bb4d315e2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101267 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-08-24uilogger : Add support in the Logger and DSL for the ToolBoxAhmed ElShreif
The support is tested on the FindBar and it works well . For example the DSL syntax in the FindBar should be like: >>"Click on item number 3 in FindBar" Change-Id: I3ec5f5afc260df4b38dc4e420fcc48d9c774c29f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100811 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2020-08-21uilogger : Add support in the Logger and DSL for the LAUNCHMENU in CALCAhmed ElShreif
The support is tested on some random test cases. For example the DSL syntax will be: >>"Launch SELECTMENU from Col 3 and Row 5" Change-Id: Ic5b29ad8b377eed5c38aa1d0f680cbfb979763e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100958 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>