summaryrefslogtreecommitdiff
path: root/uitest
AgeCommit message (Collapse)AuthorFilesLines
2021-12-23work around off-by-ones on i386 in uicheck uitests...Rene Engelhard1-4/+4
<@x1sc0> _rene__, I guess we could use assertAlmostEqual with delta=1 there, but maybe once we add it, the next assert also fails for you? Change-Id: Ic64641ccdf9ca721997b4a842b646cf4b9e30f16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121641 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: René Engelhard <rene@debian.org> Tested-by: René Engelhard <rene@debian.org> Tested-by: Jenkins
2021-12-15uitest: simplify codeXisco Fauli1-3/+1
Change-Id: Id3355be0e763217a4915b53d22220c30536415e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126852 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-02uilogger: Adapt code to the new syntax of uitestsXisco Fauli1-42/+36
also fix the license header Change-Id: Icc759c695f192e1768210f66bff57a936df5fc4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126219 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-01uitest: fix license headersXisco Fauli19-0/+40
Change-Id: I6b1a2808af9e6bb4d3240a83798c3c5958ef38e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126183 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2021-12-01tdf#132293 removed some unused imports from uitest4k5h1t2-2/+0
Change-Id: I491b08dd8af69083a13c4dc00223314a6203e2d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126160 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-11-27blind fix for UITest_impress_demo failuresNoel Grandin1-0/+3
Change-Id: Ia26c5a15fa4487c68cf6d4bc2aee41a3ded7f6a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125941 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-09uitest: pos must be of type strXisco Fauli1-0/+1
Change-Id: Iea469066b11abefd889143d11f86c4cdcb5e03ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124923 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-04blind fix for UITest_impress_demo failedXisco Fauli1-0/+9
Change-Id: I66dcc0d260585e5f44410a16bc25a32d8d373ae0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124715 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-04tdf#119206: sw: Add UItestXisco Fauli1-1/+2
Change-Id: Iaf0e3be8a43eaaa4abb1efff9bc844ff38602d77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124654 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-25uitest: execute setActiveFrame in load_file firstXisco Fauli1-6/+20
In 4839b7ca3b5a730edf90ebebc749db145efec098 < Fix UITests that use File Open dialog to load documents > the order of execution of load_file method was changed, making the code after the yield keyword to be executed after the test code is run, which is not what the original code did. We need to execute that code before running the test code, specially setActiveFrame Change-Id: I4ba436cbdf4fe2261589527f8d38a916d47b94aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124154 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-13uitest: combine execute_modeless_dialog_through_command methodsXisco Fauli5-20/+6
Change-Id: Idada1927f6b8b55133e1ff8c776a987699df1dc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122012 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-13uitest: guard the remaining execute_modeless_dialog_through_commandXisco Fauli4-39/+24
Change-Id: I239fe94cc8983e679c82aa43d74d8099b13e73b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122011 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-13uitest: guard execute_modeless_dialog_through_command in sdXisco Fauli1-2/+7
Change-Id: I4d67318af30b00182253de5f6ccf9cafd7664ee1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121911 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-08uitest: sc: factor out common codeXisco Fauli1-0/+52
Change-Id: Iaba3b9633eac26516bbb4bb0b6baadb4c6772fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121808 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-02Revert "uitest: try harder to close the dialog when it fails..."Xisco Fauli1-8/+0
This reverts commit ff641dc9e4d2aff1d1cbe4425cd9c03a2edc847e. Reason for revert: This patch is wrong, when close_button is set, the exceptions will be caught here so the test won't fail Change-Id: Id884abe70ab5602f914742e91bb2ed644c23b041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118303 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-30uitest: combine create_doc_in_start_center methodsXisco Fauli20-44/+39
Change-Id: I59ea0d0dbd203590e7cedec51d0481c953e5172b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118155 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-30uitest: guard the remaining create_doc_in_start_centerXisco Fauli19-354/+318
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I2a6149b318d1fdaa36efe5d65af4c238827eaaf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118154 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-30uitest: guard create_doc_in_start_center in sdXisco Fauli2-22/+10
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I314f3e2245bf57538073499f60528a455cba1a91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118138 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-29uitest: try harder to close the dialog when it fails...Xisco Fauli1-0/+8
... and close_button is None. Change-Id: I01318fd3eff5c9d8775443529ad1a7b18d537968 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118117 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-29uitest: combine execute_dialog_through_command methodsXisco Fauli12-32/+28
Change-Id: Iaa03d37a9ac3862b8cb08a81e37a611632433880 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118077 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-29uitest: guard remaining execute_dialog_through_commandXisco Fauli11-174/+106
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Ib8e7c5f5e2c9b8a7756fe533ea4f30349dd68761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118076 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-29uitest: guard execute_dialog_through_command in scXisco Fauli1-1/+2
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Id49eb66ba2827a6e2d0a737e48726a1d1c49c814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118029 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-29uitest: guard execute_dialog_through_command in sdXisco Fauli2-10/+10
Mostly done with a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I162dcf802474a27580cfbe9349d1a48d3a111c9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117999 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-28uitest: log the active UITEST_TEST_NAMEJan-Marek Glogowski1-4/+6
From the original commit bff02d54960b55e16d5c1220719bb86dc1fdd205 ("uitests - error if UITEST_TEST_NAME not set to anything useful"), it doesn't look like logging the test_name_limit_found is needed. Change-Id: Ibe1e6a5d63a968b06c4c8e8b4979d5b8caf8f54c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118016 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins
2021-06-26uitest: introduce load_empty_fileXisco Fauli1-2/+11
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 Fauli1-18/+13
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 Fauli2-12/+8
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 Fauli21-376/+445
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 Bergmann1-0/+7
...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 Fauli21-445/+376
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 Fauli3-36/+26
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 Fauli1-14/+12
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 Kaganski1-2/+12
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 Castro1-0/+10
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 Kaganski1-0/+31
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 Kaganski1-4/+9
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 Fauli1-1/+1
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 Fauli1-11/+3
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 Fauli1-0/+12
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 formatHossein1-0/+2
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 READMEHossein1-0/+0
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 Grandin1-0/+3
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 Grandin3-21/+0
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 Kukshiev4-5/+2
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 Fauli1-2/+8
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 Fauli1-1/+1
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 Fauli1-0/+2
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 Fauli1-4/+11
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 Fauli1-10/+1
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 Fauli1-0/+5
Change-Id: Ib0b84349c138d361001af4547d91a81d8b5d8e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109166 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>