diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-08 10:43:56 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-04-08 14:59:02 +0200 |
commit | e90706dd0448772acf28d4e4762b7298cd4e0b60 (patch) | |
tree | ade74e92adab4a9aca8ee1de8a15825ecac2c027 | |
parent | f153be729ed12ea301642e7d2551ec60b70a2a61 (diff) |
tdf#141547: sc: Add UItest
Change-Id: I97c3019c354b825d17a60c3dc964c8048b4164e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113794
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/uitest/calc_tests4/tdf141547.py | 42 | ||||
-rw-r--r-- | sc/qa/uitest/data/tdf141547.xlsx | bin | 0 -> 19869 bytes |
2 files changed, 42 insertions, 0 deletions
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 Binary files differnew file mode 100644 index 000000000000..414ef23b34f1 --- /dev/null +++ b/sc/qa/uitest/data/tdf141547.xlsx |