diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-29 11:46:12 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-29 17:54:17 +0100 |
commit | 06fa42837d8764e10627e7b97c04d0853e9976e3 (patch) | |
tree | ea5870fe3d2bd1d2db65f9e140ff5455da159789 /writerperfect/qa/uitest | |
parent | 612821223c574fe0956d348730d40623943821f3 (diff) |
EPUB export: add UI to set a custom cover image
Sets the EPUBCoverImage filter data key at UNO level.
Change-Id: I46eb3c0df1e6c34af0be070c32f9f37666dc718e
Reviewed-on: https://gerrit.libreoffice.org/45485
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/qa/uitest')
-rw-r--r-- | writerperfect/qa/uitest/epubexport/epubexport.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/writerperfect/qa/uitest/epubexport/epubexport.py b/writerperfect/qa/uitest/epubexport/epubexport.py index 4dfeed19e617..aaac6759adac 100644 --- a/writerperfect/qa/uitest/epubexport/epubexport.py +++ b/writerperfect/qa/uitest/epubexport/epubexport.py @@ -69,4 +69,18 @@ class EPUBExportTest(UITestCase): # Make sure that initializing with 2 different versions results in 2 different widget states. self.assertEqual(2, len(set(positions))) + def testCoverImage(self): + def handleDialog(dialog): + dialog.getChild("coverpath").executeAction("TYPE", mkPropertyValues({"TEXT": "cover.png"})) + dialog.getChild("ok").executeAction("CLICK", tuple()) + + uiComponent = self.ui_test._xContext.ServiceManager.createInstanceWithContext("com.sun.star.comp.Writer.EPUBExportUIComponent", self.ui_test._xContext) + + self.ui_test.execute_blocking_action(action=uiComponent.execute, dialog_handler=handleDialog) + propertyValues = uiComponent.getPropertyValues() + filterData = [i.Value for i in propertyValues if i.Name == "FilterData"][0] + # The EPUBCoverImage key was missing, EPUBExportDialog::OKClickHdl() did not set it. + coverImage = [i.Value for i in filterData if i.Name == "EPUBCoverImage"][0] + self.assertEqual("cover.png", coverImage) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |