sw/qa/uitest/writer_tests6/tdf118883.py | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
New commits: commit 67b5e875c65c5ed72a170a03d33992edd3802c75 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue May 18 16:56:33 2021 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue May 18 21:16:11 2021 +0200 tdf#118883: sw: Add UItest Change-Id: I38e7c1a0accf569a70d1d3bc5e04042538afadff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115756 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/uitest/writer_tests6/tdf118883.py b/sw/qa/uitest/writer_tests6/tdf118883.py new file mode 100644 index 000000000000..300412344fb0 --- /dev/null +++ b/sw/qa/uitest/writer_tests6/tdf118883.py @@ -0,0 +1,40 @@ +# -*- 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 libreoffice.uno.propertyvalue import mkPropertyValues + +class Tdf118883(UITestCase): + + def test_tdf118883(self): + self.ui_test.create_doc_in_start_center("writer") + + # Insert shape with Ctrl key + xArgs = mkPropertyValues({"KeyModifier": 8192}) + self.xUITest.executeCommandWithParameters(".uno:BasicShapes.rectangle", xArgs) + + writer_document = self.ui_test.get_component() + self.assertEqual(1, writer_document.DrawPage.getCount()) + + self.xUITest.executeCommand(".uno:Copy") + + self.ui_test.execute_dialog_through_command(".uno:CloseDoc") + xDialog = self.xUITest.getTopFocusWindow() + xDiscardBtn = xDialog.getChild("discard") + self.ui_test.close_dialog_through_button(xDiscardBtn) + + calc_doc = self.ui_test.create_doc_in_start_center("calc") + + self.xUITest.executeCommand(".uno:Paste") + + calc_document = self.ui_test.get_component() + + # Without the fix in place, this test would have failed wiht + # AssertionError: 1 != 0 + self.assertEqual(1, calc_document.DrawPages[0].getCount()) + + 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