diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2025-02-04 17:15:09 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2025-02-04 22:20:33 +0100 |
commit | 8dc9d06735684dd217c6258fe02ef373426456dd (patch) | |
tree | c7d489471303e2abad6473a3aa4fbbad5abd5932 /sc | |
parent | b37942159448fa902ed0b1c635e9c556872492bd (diff) |
tdf#149907: sc: Add UItest
Change-Id: If21693a5e3cb92e0c465417f8989ad2fa9670432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181128
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/uitest/autofilter2/tdf149907.py | 37 | ||||
-rw-r--r-- | sc/qa/uitest/data/autofilter/tdf149907.ods | bin | 0 -> 7950 bytes |
2 files changed, 37 insertions, 0 deletions
diff --git a/sc/qa/uitest/autofilter2/tdf149907.py b/sc/qa/uitest/autofilter2/tdf149907.py new file mode 100644 index 000000000000..d4e84638e9ea --- /dev/null +++ b/sc/qa/uitest/autofilter2/tdf149907.py @@ -0,0 +1,37 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# 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_url_for_data_file, get_state_as_dict, select_by_text +from libreoffice.calc.document import is_row_hidden + +class tdf149907(UITestCase): + + def test_tdf149907(self): + + with self.ui_test.load_file(get_url_for_data_file("tdf149907.ods")) as doc: + + with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog: + xField1 = xDialog.getChild("field1") + xVal1 = xDialog.getChild("val1") + xCond1 = xDialog.getChild("cond1") + self.assertEqual('Test', get_state_as_dict(xField1)['SelectEntryText']) + self.assertEqual('=', get_state_as_dict(xCond1)['SelectEntryText']) + self.assertEqual('1', get_state_as_dict(xVal1)['Text']) + select_by_text(xCond1, ">") + + self.assertFalse(is_row_hidden(doc, 0)) + # Without the fix in place, it would have failed here with AssertionError: False is not true + self.assertTrue(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.assertFalse(is_row_hidden(doc, 5)) + self.assertFalse(is_row_hidden(doc, 6)) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/data/autofilter/tdf149907.ods b/sc/qa/uitest/data/autofilter/tdf149907.ods Binary files differnew file mode 100644 index 000000000000..716c4551ef1d --- /dev/null +++ b/sc/qa/uitest/data/autofilter/tdf149907.ods |