summaryrefslogtreecommitdiff
path: root/uitest
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25Defect type: IDENTIFIER_TYPOCaolán McNamara1-2/+2
identifier_typo: Using "Libreoffice" appears to be a typo: "Libreoffice" is only known to be referenced here, or in copies of this code. Identifier "LibreOffice" is referenced elsewhere at least 19 times. Change-Id: I201bcc7e226dde52eed2c0281d2b9839a234af1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91033 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-24weld writer navigatorCaolán McNamara1-1/+1
GtkToggleToolButton are much wider than vcl equivalents. Split the bottom toolbar into two toolbars. Rearrange their contents so the layout of each level visually match. Notes: Master documents have two modes, master content tree and the normal content tree. You can drag entries from the content tree into the document, drag mode drop down controls whether its a link or a copy etc that's dropped in. Documents can be dropped into the content and global trees. If outline tracking isn't active, then when content changes the tree is cleared and refilled, typically an effort is made to reselect the same entry that was previously selected. Additionally, if the amount of content didn't change an effort is made to scroll back to the location the scrollbar was at before the clear. Change-Id: I00c015145eac5b1acc3398d3c40861d830e4264a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89725 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-16uitest: use hex instead of int for colorsXisco Fauli2-7/+9
Change-Id: I7309a546546637a1837df8ac99807c2deb22c72a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90589 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-04uitest: speed up close_doc()Miklos Vajna1-15/+13
I used solenv/gbuild/Trace.mk to measure where the time is spent at the end of an incremental 'make check'. The last 95 seconds in spent executing UITest_demo_ui alone. If that test is executed in isolation, it takes 135 seconds. Profiling the test shows that some of that time is spent on waiting for an OnViewClosed event to be emitted after .uno:CloseDoc is dispatched. I'm not sure how this worked in the past, but seems that in case there is a single view, then we currently only emit OnUnloaded, which means we wait a minute for an event that does not arrive, then we silently move on. Fix the problem by closing the document via dispose(), the old code also just discarded all changes to the file. The new cost of UITest_demo_ui is 73 seconds (54% of baseline). The overall 'make check' is 84 seconds faster with this, too. Change-Id: I97e8e2af3ba355b8029920076e070d619b110b77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89984 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2020-03-03uitest: split up UITest_writer_demoMiklos Vajna22-5/+152
I used solenv/gbuild/Trace.mk to measure where the time is spent at the end of an incremental 'make check'. The last 141 seconds is spent executing UITest_writer_demo alone. If that test is executed in isolation, it takes 289 seconds. I measured the cost of all the individual .py suites and arranged them into 8 separate UITests, this way the make -j8 cost is 101 seconds (i.e. 35% of the baseline). IOW this is supposed to speed up 'make check' with 3m13s, provided you have the code already built. Change-Id: I1ffee3a06b8fd84d7b9a0295547900df11f11f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89835 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-19uitest: make sure UITEST_TEST_NAME matches exactly one test functionMiklos Vajna1-1/+1
So that something like: make -sr UITest_cui_dialogs UITEST_TEST_NAME="chardlg.Test.testSvxCharEffectsPageWriterAutomatic" Only executes testSvxCharEffectsPageWriterAutomatic, not testSvxCharEffectsPageWriter and testSvxCharEffectsPage as well. Change-Id: I0ed334259634e3b9b0db45d9f8462eb4accc689e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88987 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-02tdf#129568 Rename Default Style to Default Paragraph/Page/Table Styleayhanyalcinsoy1-2/+2
Change-Id: I21672c9b78e52c3c9b2687cb2c0ab21dcf67f19a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86538 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2020-01-25UITest: Actually time-out the waitMike Kaganski1-4/+12
Without that, if XDesktop::terminate() fails (e.g., because an assert in a test was false while a modal dialog was open, which left the dialog open, and so TerminationVetoException was thrown in XDesktop::terminate() by a listener), the wait never ends, and the assertion message gets lost when buildbot terminates the build, as happened in https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/51496/console. The timeout only available since python 3.3. The soffice process is not terminated in this case; hopefully it will be terminated when build cleanup will occur. Change-Id: I924775d0e58619d1fbd603e80ed1f8d047c91145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87362 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-28UITest: fix spellDialog.SpellingAndGrammarDialog.test_tdf46852Mike Kaganski1-1/+5
Two problems were present: 1. If local system default locale is not en_US, then in created document, text has some other language initially; and instrted text also gets this language. This may result in no replacement suggestions for the spelling errors, and "changeall" is not active, so expected sequence of changes and clicks does not happen. Fixed by setting language at cursor before paste explicitly. 2. On Windows, the returned text has \r\n paragraph breaks, which didn't match the regex having \n. Fixed by postprocessing the text before match. Change-Id: I320fc62c3c27dfe699fb45669c081df30cb66d6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85877 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-14Fix typoAndrea Gelmini1-2/+2
Change-Id: Ic2423f7b2e83ca957d42392c1fba2b7d636ac136 Reviewed-on: https://gerrit.libreoffice.org/85156 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-10Fix IdentationError and mixture of spaces and tabsJens Carl1-23/+23
Fix IdentationError and mixture of spaces and tabs found by python -m py_compile <file>. Change-Id: I1dc99196410d736ca33ead5deadfc61bc6584428 Reviewed-on: https://gerrit.libreoffice.org/83594 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-11-18Fix 'is' operator for comparisonJens Carl3-4/+4
The 'is' operator should not be used for comparison on some types of literals. In CPython this works by accident and CPython 3.8 introduced a SyntaxWarning (see https://bugs.python.org/issue34850). Change-Id: Ic4ba481579d13fd1496431ded59dd626a05fc0c6 Reviewed-on: https://gerrit.libreoffice.org/83033 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-11-08Add UI Test for tdf#128004Muhammet Kara1-1/+27
Change-Id: Id2b95d21799f8fa4b55a304afda739219fee06ff Reviewed-on: https://gerrit.libreoffice.org/82323 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-09name all Notebooks 'tabcontrol'Caolán McNamara2-2/+2
Change-Id: I5159ed77c2b3ba2f06e381a738a49dbe17a6a4dd Reviewed-on: https://gerrit.libreoffice.org/80542 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04Revert "uitest: make child soffice process die when parent dies"Stephan Bergmann1-1/+1
This reverts commit d35840a2111beafe018851314a624e268e3cde6a, now that 43aef04d77aafb9d055957642e62b559231f3711 "Reliably wait for soffice to terminate" makes sure that no soffice-related processes are left behind by UITests. Using PR_SET_PDEATHSIG had the following drawbacks: * It defeats debugging if a runaway process is forcefully killed by the test framework. (And there are already higher-layer mechanisms in place for the reliable termination of runaway tinderbox builds, see the commit message of 43aef04d77aafb9d055957642e62b559231f3711 mentioned above.) * It is brittle in that it can terminate soffice-related processes too early, as the signal is sent as soon as the parent's thread that spawned the child (and not the parent process as a whole) terminates. * It is Linux-only. Change-Id: Ia07f5dbaafc824bad0dfbdb1a2aabe6d5508741b Reviewed-on: https://gerrit.libreoffice.org/80186 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-04Reliably wait for soffice to terminateStephan Bergmann1-13/+1
...to avoid leftover soffice-related processes (oosplash, soffice.bin) from UITests, whose occasional presence on tinderboxes is discussed in the comments to <https://gerrit.libreoffice.org/#/c/79854/> "uitest: make child soffice process die when parent dies". Should sucha an soffice-related process fail to terminate, the UITest will now fail to terminate too, and (a) a developer can debug the hung processes or (b) a tinderbox can reliably kill all processes (cf. <https://gerrit.libreoffice.org/plugins/gitiles/lode/+/ bea0738dbadfe8784e5d3c00f533acf101db4e7e%5E%21> "tb_slave_wrapper: trap signal and kill -9 everything"). This is in line with the waiting in tearDown in unotest/source/python/org/libreoffice/unotest.py, and with the corresponding behavior of C++ and Java test frameworks in unotest. Change-Id: Ieb5c48964428bc05fa8c0f83af9426641d6df693 Reviewed-on: https://gerrit.libreoffice.org/80175 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-03Propagate soffice process failure from OfficeConnection's tearDownStephan Bergmann1-5/+3
...which had gone missing with 98cbfb087eed0d1defa6ef26385fcf47f95c05fc "uitest: kill the LibreOffice instance if it ignores terminate request". (None != 0 is true, so there is no need to map from ret_attr to ret, and that code can be cleaned up a bit.) Change-Id: Ic5e429d61a10a2bbd5c28aeee9d8465cb05c1e4a Reviewed-on: https://gerrit.libreoffice.org/80147 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-02uitest: share some code.Michael Meeks1-18/+11
Change-Id: I2f586bd5e2e4c3cf1fc052cdfe526532dca9acd4 Reviewed-on: https://gerrit.libreoffice.org/79884 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-01uitest: make child soffice process die when parent diesNoel Grandin1-1/+1
using PR_SET_PDEATHSIG. Note that this can only be called by the child process in question, so we have to pass a new command line argument down to activate it. And we have to plumb it through the wrapper oosplash process. I wonder where else our testing infrastructure could benefit from this Change-Id: I55e8e9f7f4e6cc415046df04c804e51475b8a4c9 Reviewed-on: https://gerrit.libreoffice.org/79854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-31Let's revert this so no confusion.Julien Nabet1-2/+2
This reverts commit 367719e77747bc142ac4b7ec5ee10d7c5e519c16. Change-Id: I36e4aef93f04fe593692edaa804512020464aa95 Reviewed-on: https://gerrit.libreoffice.org/78354 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-31Fix typos (Please do not commit)Andrea Gelmini1-2/+2
This commit is updated just to help Ahmed. He is going to fix this in the next implementation. Change-Id: I1cdebb27b5ded57694e97da7d990adce716448c0 Reviewed-on: https://gerrit.libreoffice.org/77743 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-20uitest: Fix typosAhmed ElShreif7-31/+31
Change-Id: I41023dd1fd06ca48849726d3372f74a4990c27a3
2019-08-19uitest: Reformat the python script of the CompilerAhmed ElShreif1-310/+570
Change-Id: I502aa9e998d084a82e738c0c0c68ad634cb5c76a
2019-08-19uitest: print useful message when textX is not installedMarkus Mohrhard1-2/+7
Change-Id: If6f6c71f72ba9def4885ffbd74cb7814f7465f2c
2019-08-19uitest: add the SideBar implementationAhmed ElShreif1-0/+10
Change-Id: I7de9bd97e868624476b5c39a5e37afc945206e4e
2019-08-19uitest: ignore the logging part of the QuerySaveDialog while closing the appAhmed ElShreif1-36/+52
Change-Id: I18fcc81fa54362dfaa574ec04125e66b37a5aad8
2019-08-19uitest: use prefix for names that has conflict with python's keywordsAhmed ElShreif1-32/+86
Change-Id: I01d044a96eeae60a070a5ca0fc8d6105d7333414
2019-08-19uitest: replace tabs with spacesAhmed ElShreif1-18/+21
Change-Id: I40779dfdb65037838e1a1b7bed5d89a656047ce6
2019-08-19uitest: add footer line supportAhmed ElShreif1-0/+3
Change-Id: I740995d811be030f406f9d3ff53c56d28af2b786
2019-08-19uitest: solve problem with un-named parentsAhmed ElShreif2-18/+50
1) Add recursively query for the parent until find an parent with a name. 2) Remove the parent part "from xxxxxx" from the log statment if there is un-named parent 3) Update the compiler to use the most top parent if there is command with no un-named parent Change-Id: Id7dd5092bc995312494b5536720141908e73af9a
2019-08-19uitest: log more events in Calc:Ahmed ElShreif2-1/+10
1) Rename Tab 2) Insert Tab Change-Id: I7a653a4b274c0c8058672c5b0aa1645bb5a51e3a
2019-08-19uitest: log more eventsAhmed ElShreif2-3/+30
Impress: 1) Delete Slide 2) Duplicate Slide 3) Rename Slide Draw: 1) Delte Page 2) Rename Page Change-Id: I124bdf96c58dfe00bdb039c5e93afc0dc6e7163d
2019-08-19uitest: add more events to ui loggerAhmed ElShreif2-4/+12
for Impress: add new Slide for Draw: add new Page Modify the UILogger System to save information about the name of the app Change-Id: I87fd98b2a11783e3410f1c0eba633631addf389b
2019-08-19uitest: start logging draw eventsAhmed ElShreif2-3/+30
Change-Id: I1b77b106db181a8cadc1ff0b2a5de6ad19fe6762
2019-08-19uitest: update UI logger grammarAhmed ElShreif8-67/+109
1) Make small changes in the UI logger Grammar 2) Add Comments to be more documented Change-Id: I5e68c33375870cf4a1f2537ee1a7eb997145f24f
2019-08-19uitest: log more eventsAhmed ElShreif4-7/+71
for Calc: 1) Delete some Cells 2) Remove content from some cells 3) Insert Cells 4) Cut Cells 5) Copy Cells 6) Paste Cells 7) Merge Cells 8) Split Cell ( Delete Merge ) for Writer: 1) Insert Table 2) Copy Text 3) Cut Text 4) Paste Text 5) Inser Break Page Also, Solve some bugs in the UI logger and UNO Commands. Change-Id: Ic7cacbc20e1e400900a9760b61e8b45ae96c84ff
2019-08-19uitest: solve some bugs in the ui loggerAhmed ElShreif2-23/+32
Change-Id: I39836423fad8cb361a8f007f648108618906be8a
2019-08-19uitest: add general functions to remove redundunt linesAhmed ElShreif1-216/+107
1) init_app 2) init_Object 3) write_line_without_parameters 4) write_line_with_one_parameters Then Rewrite the handlers again Change-Id: I8ceb01f4eaa48f1544ada8966c7585dcbd3e15aa
2019-08-19uitest: add more DSL commandsAhmed ElShreif2-7/+155
1) Calc (calc_Type_command - calc_switch_sheet - calc_Select_cell - calc_AutoFill_filter) 2) impress (impress_Type_command) 3) math (math_element_selector - math_Type_command) 4) General Commands Compiler: (setZoom_command) Change-Id: Ifd2608c38474633b579a216356fe53c859c24975
2019-08-19uitest: add special commands of writer app implementationAhmed ElShreif2-7/+61
1) Type Command 2) Select Command 3) GoTo page Change-Id: I5ee773b6cd322c2c1bf0eba58e704b2ff1399ce7
2019-08-19uitest: implement the missing part of the dialog compilerAhmed ElShreif1-5/+27
Change-Id: I08881b738b3e7922b74f9d007733278e2b6ef54e
2019-08-19uitest: add DSL compiler support for more UI itemsAhmed ElShreif2-4/+163
1) ButtonUIObject 2) CheckBoxUIObject 3) TabControlUIObject 4) ComboBoxUIObject 5) RadioButtonUIObject 6) ListBoxUIObject 7) SpinFieldUIObject 8) EditUIObject Change-Id: Ic81c2a0511351cf91f4514316b9c5854a64a4b05
2019-08-19uitest: start the implementation of the new DSL compilerAhmed ElShreif1-5/+137
1) finish the functions that will parse inputs 2) add function to initialize the UI test Case 3) add function to print the ui new test case 4) add the UNO caommands handler 5) add the Dialog commands handler 6) add the Starter commands handler Change-Id: Ided1c050023c5284457f62c4b8d5ea1cfa38c043
2019-08-19uitest: change small parts of the grammar and dialog loggerAhmed ElShreif5-12/+19
Change-Id: I615989baafe65a6f6ae26fcd452c1e21081168b4
2019-08-19uitest: Some new features in ui_logger projectAhmed ElShreif3-6/+58
this patch for: 1) general commands grammar 2) special commands of impress and math 3) log select element action 4) log SideBar Actions Change-Id: If375cd3396cfde45f70d7c202339c829b1c43471
2019-08-19uitest: just update zoom statementAhmed ElShreif2-2/+2
Change-Id: I0bc5c4179dcb94ed2cc4a551165fd135d884a75a
2019-08-19uitest: update the DSL grammarAhmed ElShreif9-9/+1
Change-Id: I15fe20f1c5e8339f6d5a857b0d0bbfa30b09b44a
2019-08-19uitest: new logger DSL grammarAhmed ElShreif9-0/+244
This patch is the first and second parts of the new DSL grammar. The grammar of all the UIObjects , Dialogs , starter commands , All of uno commands and Special commands for applications. example.ul shows an example of the new syntax of the expected new logger. Change-Id: Ib58aeab1da6627ebc464e4cb64253fd3bf91200e
2019-08-09Fix typosAndrea Gelmini1-1/+1
Change-Id: I545154bddfd29194630d744b4aa4f5c385321531 Reviewed-on: https://gerrit.libreoffice.org/77138 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-26UI tests opening all dialogs in writer and see if it crashesArtur Neumann5-0/+79
Open a dialog, close it by the given button e.g. "cancel" or "close". If the dialog has an enabled "OK" button open the dialog again and try to close it also using the OK button. For every dialog a complete new document is opened to ensure test-separation, otherwise one action could hamper the next action. For dialogs that already have other tests a "cancel/close" test was added to the previous test. As far as possible opening new documents was avoided in those cases. And in some cases a simple check was added to check if the "cancel" button does not change anything. Simmilar tests for calc have been renamed and code dublication has been removed by moving main part of the code to a helper file Change-Id: I01f197cae8bc6fe0345661fe042b655f16229485 Reviewed-on: https://gerrit.libreoffice.org/75124 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>