[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 21 13:32:26 UTC 2021
sc/qa/uitest/autofilter/colorfilter.py | 43 ++++++++++++++++++++++++++++
sc/qa/uitest/data/autofilter/tdf142579.xlsx |binary
2 files changed, 43 insertions(+)
New commits:
commit 4ba0460e3cf3ce33794090968fd4c906422bbd25
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Sep 21 13:59:26 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Sep 21 15:31:53 2021 +0200
tdf#142579, tdf#143103: sc: Add UItest
Change-Id: I2bc3eabeeb23534d985649c4191798ca9281b7e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122389
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/autofilter/colorfilter.py b/sc/qa/uitest/autofilter/colorfilter.py
index a9d0d5d950aa..65a4ca5a483c 100644
--- a/sc/qa/uitest/autofilter/colorfilter.py
+++ b/sc/qa/uitest/autofilter/colorfilter.py
@@ -57,4 +57,47 @@ class ColorFilterTest(UITestCase):
self.assertTrue(is_row_hidden(doc, 7))
self.assertTrue(is_row_hidden(doc, 8))
+ def test_tdf142579(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf142579.xlsx")) as doc:
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A8"}))
+
+ # Blue Background Color rows are displayed
+ self.assertFalse(is_row_hidden(doc, 0))
+ self.assertFalse(is_row_hidden(doc, 1))
+ self.assertTrue(is_row_hidden(doc, 2))
+ self.assertTrue(is_row_hidden(doc, 3))
+ self.assertTrue(is_row_hidden(doc, 4))
+ self.assertTrue(is_row_hidden(doc, 5))
+ self.assertTrue(is_row_hidden(doc, 6))
+ self.assertTrue(is_row_hidden(doc, 7))
+
+ with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog:
+ xField1 = xDialog.getChild("field1")
+ xCond1 = xDialog.getChild("cond1")
+
+ # tdf#143103: Without the fix in place, this test would have failed with
+ # AssertionError: 'aaa' != ''
+ self.assertEqual("aaa", get_state_as_dict(xField1)['DisplayText'])
+ self.assertEqual("Background color", get_state_as_dict(xCond1)['DisplayText'])
+
+ xColor1 = xDialog.getChild("color1")
+
+ # tdf#142579: Without the fix in place, this test would have failed with
+ # AssertionError: '7' != '3'
+ self.assertEqual('7', get_state_as_dict(xColor1)["EntryCount"])
+
+ # Select Red Background Color
+ select_pos(xColor1, "3")
+
+ self.assertFalse(is_row_hidden(doc, 0))
+ self.assertTrue(is_row_hidden(doc, 1))
+ self.assertTrue(is_row_hidden(doc, 2))
+ self.assertTrue(is_row_hidden(doc, 3))
+ self.assertTrue(is_row_hidden(doc, 4))
+ self.assertTrue(is_row_hidden(doc, 5))
+ self.assertTrue(is_row_hidden(doc, 6))
+ self.assertFalse(is_row_hidden(doc, 7))
+
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf142579.xlsx b/sc/qa/uitest/data/autofilter/tdf142579.xlsx
new file mode 100644
index 000000000000..1fc53eba952f
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf142579.xlsx differ
More information about the Libreoffice-commits
mailing list