sfx2: add uitest for pdf signing
Fails with 058caeef45
(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
This commit is contained in:
parent
20c17b0ffb
commit
bfe6500f25
4 changed files with 56 additions and 0 deletions
|
@ -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:
|
||||
|
|
20
sfx2/UITest_sfx2_doc.mk
Normal file
20
sfx2/UITest_sfx2_doc.mk
Normal file
|
@ -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:
|
BIN
sfx2/qa/uitest/doc/data/pdf-sign.pdf
Normal file
BIN
sfx2/qa/uitest/doc/data/pdf-sign.pdf
Normal file
Binary file not shown.
32
sfx2/qa/uitest/doc/objserv.py
Normal file
32
sfx2/qa/uitest/doc/objserv.py
Normal file
|
@ -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:
|
Loading…
Reference in a new issue