sc/qa/uitest/calc_tests4/tdf141547.py | 42 ++++++++++++++++++++++++++++++++++ sc/qa/uitest/data/tdf141547.xlsx |binary 2 files changed, 42 insertions(+)
New commits: commit e90706dd0448772acf28d4e4762b7298cd4e0b60 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Apr 8 10:43:56 2021 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Apr 8 14:59:02 2021 +0200 tdf#141547: sc: Add UItest Change-Id: I97c3019c354b825d17a60c3dc964c8048b4164e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113794 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/uitest/calc_tests4/tdf141547.py b/sc/qa/uitest/calc_tests4/tdf141547.py new file mode 100644 index 000000000000..066507aa9db8 --- /dev/null +++ b/sc/qa/uitest/calc_tests4/tdf141547.py @@ -0,0 +1,42 @@ +# -*- 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, get_url_for_data_file +from libreoffice.uno.propertyvalue import mkPropertyValues +from libreoffice.calc.document import is_row_hidden + +class tdf141547(UITestCase): + + def test_tdf141547(self): + + calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf141547.xlsx")) + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") + gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + + self.assertFalse(is_row_hidden(calc_doc, 0)) + for i in range(1, 7): + self.assertTrue(is_row_hidden(calc_doc, i)) + + # Without the fix in place, this test would have crashed here + self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") + xDialog = self.xUITest.getTopFocusWindow() + self.assertEqual("0", get_state_as_dict(xDialog.getChild("val1"))['Text']) + self.assertEqual("过帐日期", get_state_as_dict(xDialog.getChild("field1"))["DisplayText"]) + self.assertEqual("Empty", get_state_as_dict(xDialog.getChild("val2"))['Text']) + self.assertEqual("过帐日期", get_state_as_dict(xDialog.getChild("field2"))["DisplayText"]) + + xOKBtn = xDialog.getChild("ok") + self.ui_test.close_dialog_through_button(xOKBtn) + + self.assertFalse(is_row_hidden(calc_doc, 0)) + for i in range(1, 7): + self.assertTrue(is_row_hidden(calc_doc, i)) + + self.ui_test.close_doc() + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/tdf141547.xlsx b/sc/qa/uitest/data/tdf141547.xlsx new file mode 100644 index 000000000000..414ef23b34f1 Binary files /dev/null and b/sc/qa/uitest/data/tdf141547.xlsx differ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits