summaryrefslogtreecommitdiff
path: root/writerperfect/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-12-01 10:55:09 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-12-01 16:30:25 +0100
commit913fbc822c0f0e285cd0dc3f919a2fb43a94c7ad (patch)
tree626a2f404a77f7903901d2d6b5235df96e1ee82f /writerperfect/qa
parentab7bdd1f91a7e6e25854601cca712488554ab960 (diff)
EPUB export: add UI to request fixed layout
Sets the EPUBLayoutMethod filter data key at UNO level. Change-Id: Ia07029bd83fec02e98cb6a3cc2bfea2ab742d769 Reviewed-on: https://gerrit.libreoffice.org/45644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerperfect/qa')
-rw-r--r--writerperfect/qa/uitest/epubexport/epubexport.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/writerperfect/qa/uitest/epubexport/epubexport.py b/writerperfect/qa/uitest/epubexport/epubexport.py
index 301f090e3362..b8e7d3f52fd9 100644
--- a/writerperfect/qa/uitest/epubexport/epubexport.py
+++ b/writerperfect/qa/uitest/epubexport/epubexport.py
@@ -97,6 +97,22 @@ class EPUBExportTest(UITestCase):
mediaDir = [i.Value for i in filterData if i.Name == "RVNGMediaDir"][0]
self.assertEqual("file:///foo/bar", mediaDir)
+ def testFixedLayout(self):
+ def handleDialog(dialog):
+ # Select the second entry to request fixed, not reflowable layout.
+ dialog.getChild("layoutlb").executeAction("SELECT", mkPropertyValues({"POS": "1"}))
+ 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 EPUBLayoutMethod key was missing, EPUBExportDialog::OKClickHdl() did not set it.
+ layout = [i.Value for i in filterData if i.Name == "EPUBLayoutMethod"][0]
+ # 1 stands for libepubgen::EPUB_LAYOUT_METHOD_FIXED.
+ self.assertEqual(1, layout)
+
def testMeta(self):
def handleDialog(dialog):
dialog.getChild("identifier").executeAction("TYPE", mkPropertyValues({"TEXT": "baddcafe-e394-4cd6-9b83-7172794612e5"}))