diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-30 16:35:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-01 09:17:43 +0100 |
commit | 3ed60d22c3c2a43d0460520485c3b6ecca00e239 (patch) | |
tree | c40610c68bacdc8002439bf64976528e1b7c20ba /writerperfect/qa/uitest | |
parent | 7f0641de763d2fd425c80f630f3ae6bcde778e7a (diff) |
EPUB export: add UI to test custom media directory
Sets the RVNGMediaDir filter data key at UNO level.
Change-Id: I9919e5ca39c9f4f126d1d67946c8bec99ce0381d
Reviewed-on: https://gerrit.libreoffice.org/45603
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 196556b2fb8d..301f090e3362 100644 --- a/writerperfect/qa/uitest/epubexport/epubexport.py +++ b/writerperfect/qa/uitest/epubexport/epubexport.py @@ -83,6 +83,20 @@ class EPUBExportTest(UITestCase): coverImage = [i.Value for i in filterData if i.Name == "RVNGCoverImage"][0] self.assertEqual("cover.png", coverImage) + def testMediaDir(self): + def handleDialog(dialog): + dialog.getChild("mediadir").executeAction("TYPE", mkPropertyValues({"TEXT": "file:///foo/bar"})) + 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 RVNGMediaDir key was missing, EPUBExportDialog::OKClickHdl() did not set it. + mediaDir = [i.Value for i in filterData if i.Name == "RVNGMediaDir"][0] + self.assertEqual("file:///foo/bar", mediaDir) + def testMeta(self): def handleDialog(dialog): dialog.getChild("identifier").executeAction("TYPE", mkPropertyValues({"TEXT": "baddcafe-e394-4cd6-9b83-7172794612e5"})) |