sd/qa/uitest/impress_tests/tdf91762.py |   36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

New commits:
commit cd142f2ab2e165b13c5ab14728b70bdd40d8517a
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Nov 3 12:44:29 2020 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Nov 3 15:24:58 2020 +0100

    tdf#91762: sd: Add UItest
    
    Change-Id: Ia3c75206a5207a95162970ac6607be96dac9fcb7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105243
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

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:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to