diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-09-24 21:16:05 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-10-04 11:44:26 +0200 |
commit | 40927b3792450142966cc7b5137ec6f084680d30 (patch) | |
tree | 0006ff6d3d90cc52e34cbd2d47856a6db9a9f058 /sc/qa/uitest | |
parent | 3b2a01c70a5d9496c95aebbcc1c69d5af0981e49 (diff) |
tdf#134351: do not apply autofilter if all entries are selected
Change-Id: I33cdfe07cc53b579bbe16486f302daf7bd3da841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103388
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sc/qa/uitest')
-rw-r--r-- | sc/qa/uitest/autofilter/autofilter.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py index 57504e66e8e9..e1aea9c1e303 100644 --- a/sc/qa/uitest/autofilter/autofilter.py +++ b/sc/qa/uitest/autofilter/autofilter.py @@ -8,6 +8,7 @@ from uitest.framework import UITestCase from uitest.path import get_srcdir_url +from uitest.uihelper.common import get_state_as_dict from libreoffice.uno.propertyvalue import mkPropertyValues from libreoffice.calc.document import get_row @@ -70,4 +71,31 @@ class AutofilterTest(UITestCase): self.assertTrue(is_row_hidden(doc, 3)) self.assertFalse(is_row_hidden(doc, 4)) + def test_tdf134351(self): + doc = self.ui_test.load_file(get_url_for_data_file("autofilter.ods")) + + xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") + xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"})) + + xFloatWindow = self.xUITest.getFloatWindow() + xCheckListMenu = xFloatWindow.getChild("check_list_menu") + + xTreeList = xCheckListMenu.getChild("check_list_box") + + self.assertEqual(2, len(xTreeList.getChildren())) + self.assertTrue(get_state_as_dict(xTreeList.getChild('0'))['IsSelected']) + self.assertTrue(get_state_as_dict(xTreeList.getChild('1'))['IsSelected']) + + xOkBtn = xFloatWindow.getChild("ok") + xOkBtn.executeAction("CLICK", tuple()) + + self.assertFalse(is_row_hidden(doc, 0)) + # Without the fix in place, this test would have failed here + self.assertFalse(is_row_hidden(doc, 1)) + self.assertFalse(is_row_hidden(doc, 2)) + self.assertFalse(is_row_hidden(doc, 3)) + self.assertFalse(is_row_hidden(doc, 4)) + + self.ui_test.close_doc() + # vim: set shiftwidth=4 softtabstop=4 expandtab: |