summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-11-03 12:44:29 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-11-09 12:30:51 +0100
commite259c659c4d3e27524c1aa76d61c7e4735e764c7 (patch)
tree3de380fbb5863b939d2c91db90418fbdca8f99a4 /sd
parenta5f5a404caa813a1748df5d2372fb1659fcaf3a9 (diff)
tdf#91762: sd: Add UItest
Change-Id: Ia3c75206a5207a95162970ac6607be96dac9fcb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105243 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit cd142f2ab2e165b13c5ab14728b70bdd40d8517a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105460
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/uitest/impress_tests/tdf91762.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/sd/qa/uitest/impress_tests/tdf91762.py b/sd/qa/uitest/impress_tests/tdf91762.py
new file mode 100644
index 000000000000..36ac3566ee10
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf91762.py
@@ -0,0 +1,36 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf91762(UITestCase):
+
+ def test_tdf91762(self):
+ self.ui_test.create_doc_in_start_center("impress")
+ xTemplateDlg = self.xUITest.getTopFocusWindow()
+ xCancelBtn = xTemplateDlg.getChild("cancel")
+ self.ui_test.close_dialog_through_button(xCancelBtn)
+
+ self.xUITest.executeCommand(".uno:AssignLayout?WhatLayout:long=1")
+
+ self.ui_test.execute_dialog_through_command(".uno:InsertTable")
+ xDialog = self.xUITest.getTopFocusWindow()
+ self.assertEqual('5', get_state_as_dict(xDialog.getChild('columns'))['Text'])
+ self.assertEqual('2', get_state_as_dict(xDialog.getChild('rows'))['Text'])
+ xOkBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOkBtn)
+
+ document = self.ui_test.get_component()
+ self.assertEqual(25198, document.DrawPages[0].getByIndex(1).Size.Width)
+ self.assertEqual(1923, document.DrawPages[0].getByIndex(1).Size.Height)
+
+ self.assertEqual(1400, document.DrawPages[0].getByIndex(1).Position.X)
+ self.assertEqual(3685, document.DrawPages[0].getByIndex(1).Position.Y)
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: