diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-03 12:44:29 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-03 15:24:58 +0100 |
commit | cd142f2ab2e165b13c5ab14728b70bdd40d8517a (patch) | |
tree | 8ea4d3f81207fbdc2d8818f264271dd3ba6468f0 /sd | |
parent | 5496233b063ca8f182e6643523b051527383364e (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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf91762.py | 36 |
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: |