sfx2/Module_sfx2.mk | 4 ++++ sfx2/UITest_sfx2_doc.mk | 20 ++++++++++++++++++++ sfx2/qa/uitest/doc/data/pdf-sign.pdf |binary sfx2/qa/uitest/doc/objserv.py | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+)
New commits: commit bec61d70434cc1c996230e553f33f5d1e0a6b430 Author: Miklos Vajna <[email protected]> AuthorDate: Tue Jun 16 16:30:56 2020 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Jun 29 09:08:01 2020 +0200 sfx2: add uitest for pdf signing Fails with 058caeef45f9abf12e4e243aafbbb1c2ebcbc057 (tdf#130354 sfx2: make PDF signing UI work again, 2020-06-02) reverted. (cherry picked from commit bfe6500f2560f13a2114a52167bcee4f997da037) Change-Id: I4f4ffaeed4b93c033bc2fdaa76ff817d172c8853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97244 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk index b3a1f061b853..1678125bac34 100644 --- a/sfx2/Module_sfx2.mk +++ b/sfx2/Module_sfx2.mk @@ -59,4 +59,8 @@ $(eval $(call gb_Module_add_screenshot_targets,sfx2,\ CppunitTest_sfx2_dialogs_test \ )) +$(eval $(call gb_Module_add_uicheck_targets,sfx2,\ + UITest_sfx2_doc \ +)) + # vim: set noet sw=4 ts=4: diff --git a/sfx2/UITest_sfx2_doc.mk b/sfx2/UITest_sfx2_doc.mk new file mode 100644 index 000000000000..b5e3ef8cebde --- /dev/null +++ b/sfx2/UITest_sfx2_doc.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# 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/. +# + +$(eval $(call gb_UITest_UITest,sfx2_doc)) + +$(eval $(call gb_UITest_add_modules,sfx2_doc,$(SRCDIR)/sfx2/qa/uitest,\ + doc/ \ +)) + +$(eval $(call gb_UITest_set_defs,sfx2_doc, \ + TDOC="$(SRCDIR)/sfx2/qa/uitest/doc/data" \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sfx2/qa/uitest/doc/data/pdf-sign.pdf b/sfx2/qa/uitest/doc/data/pdf-sign.pdf new file mode 100644 index 000000000000..8dedb6998b23 Binary files /dev/null and b/sfx2/qa/uitest/doc/data/pdf-sign.pdf differ 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: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
