summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/Module_sfx2.mk4
-rw-r--r--sfx2/UITest_sfx2_doc.mk20
-rw-r--r--sfx2/qa/uitest/doc/data/pdf-sign.pdfbin0 -> 2235 bytes
-rw-r--r--sfx2/qa/uitest/doc/objserv.py32
4 files changed, 56 insertions, 0 deletions
diff --git a/sfx2/Module_sfx2.mk b/sfx2/Module_sfx2.mk
index 8ebe54cef9c7..d084ac929c0f 100644
--- a/sfx2/Module_sfx2.mk
+++ b/sfx2/Module_sfx2.mk
@@ -55,4 +55,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
--- /dev/null
+++ b/sfx2/qa/uitest/doc/data/pdf-sign.pdf
Binary files 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: