diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-06-16 16:30:56 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-06-16 17:24:53 +0200 |
commit | bfe6500f2560f13a2114a52167bcee4f997da037 (patch) | |
tree | da432ab9e59a8a4cb2cdbafd6b3c9502137cdb52 /sfx2/qa | |
parent | 20c17b0ffb89102d086f80303887a8594f0c3c8c (diff) |
sfx2: add uitest for pdf signing
Fails with 058caeef45f9abf12e4e243aafbbb1c2ebcbc057 (tdf#130354 sfx2:
make PDF signing UI work again, 2020-06-02) reverted.
Change-Id: I4f4ffaeed4b93c033bc2fdaa76ff817d172c8853
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96469
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2/qa')
-rw-r--r-- | sfx2/qa/uitest/doc/data/pdf-sign.pdf | bin | 0 -> 2235 bytes | |||
-rw-r--r-- | sfx2/qa/uitest/doc/objserv.py | 32 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sfx2/qa/uitest/doc/data/pdf-sign.pdf b/sfx2/qa/uitest/doc/data/pdf-sign.pdf Binary files differnew file mode 100644 index 000000000000..8dedb6998b23 --- /dev/null +++ b/sfx2/qa/uitest/doc/data/pdf-sign.pdf diff --git a/sfx2/qa/uitest/doc/objserv.py b/sfx2/qa/uitest/doc/objserv.py new file mode 100644 index 000000000000..af00590736ea --- /dev/null +++ b/sfx2/qa/uitest/doc/objserv.py @@ -0,0 +1,32 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +from uitest.framework import UITestCase +import org.libreoffice.unotest +import pathlib + +def get_url_for_data_file(file_name): + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() + +# Test for sfx2/source/doc/objserv.cxx. +class Test(UITestCase): + + def testPdfSigning(self): + # Start Impress. + impress_doc = self.ui_test.load_file(get_url_for_data_file("pdf-sign.pdf")) + doc = self.xUITest.getTopFocusWindow() + + # Now use File -> Digital signatures -> Digital signatures. + self.ui_test.execute_dialog_through_command(".uno:Signature") + xDialog = self.xUITest.getTopFocusWindow() + # Without the accompanying fix in place, this test would have failed with: + # uno.com.sun.star.uno.RuntimeException: Could not find child with id: close vcl/source/uitest/uiobject.cxx:452 + self.ui_test.close_dialog_through_button(xDialog.getChild("close")) + + self.ui_test.close_doc() + + +# vim: set shiftwidth=4 softtabstop=4 expandtab: |