summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-05-08 13:24:10 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2023-05-08 22:40:21 +0200
commit2c4bfbf224aa5ced905bbe569ca56ecf5e00115f (patch)
tree71334fd03aa81cdb6127f0a0c1389f243bb3af02 /sc/qa
parent43f72183ce12835f6a3a5185e708a00e968d27da (diff)
tdf#144549: sc: Add UItest
Change-Id: If0839d3f33e6fb7d5264b61d033b33e98f3ff44d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151504 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/uitest/autofilter/colorfilter.py40
-rw-r--r--sc/qa/uitest/data/autofilter/tdf144549.odsbin0 -> 17464 bytes
2 files changed, 40 insertions, 0 deletions
diff --git a/sc/qa/uitest/autofilter/colorfilter.py b/sc/qa/uitest/autofilter/colorfilter.py
index 967b17e36d6a..ecfc6924d37f 100644
--- a/sc/qa/uitest/autofilter/colorfilter.py
+++ b/sc/qa/uitest/autofilter/colorfilter.py
@@ -102,6 +102,46 @@ class ColorFilterTest(UITestCase):
self.assertTrue(is_row_hidden(doc, 6))
self.assertFalse(is_row_hidden(doc, 7))
+ def test_tdf144549(self):
+ with self.ui_test.load_file(get_url_for_data_file("tdf144549.ods")) as doc:
+
+ xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+ xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "B1"}))
+
+ for i in range(12):
+ self.assertFalse(is_row_hidden(doc, i))
+
+ with self.ui_test.execute_modeless_dialog_through_command(".uno:DataFilterStandardFilter") as xDialog:
+ xField1 = xDialog.getChild("field1")
+ xCond1 = xDialog.getChild("cond1")
+
+ self.assertEqual("Value", get_state_as_dict(xField1)['DisplayText'])
+
+ select_by_text(xCond1, "Font color")
+ self.assertEqual("Font color", get_state_as_dict(xCond1)['DisplayText'])
+
+ xColor1 = xDialog.getChild("color1")
+
+ # Without the fix in place, this test would have failed with
+ # AssertionError: '3' != '1'
+ self.assertEqual('3', get_state_as_dict(xColor1)["EntryCount"])
+
+ select_pos(xColor1, "0")
+
+ 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.assertFalse(is_row_hidden(doc, 4))
+ self.assertFalse(is_row_hidden(doc, 5))
+ self.assertTrue(is_row_hidden(doc, 6))
+ self.assertTrue(is_row_hidden(doc, 7))
+ self.assertTrue(is_row_hidden(doc, 8))
+ self.assertTrue(is_row_hidden(doc, 9))
+ self.assertFalse(is_row_hidden(doc, 10))
+ self.assertTrue(is_row_hidden(doc, 11))
+ self.assertTrue(is_row_hidden(doc, 12))
+
def test_tdf142579_conditional_format(self):
with self.ui_test.load_file(get_url_for_data_file("tdf142579_cond_format.ods")) as doc:
diff --git a/sc/qa/uitest/data/autofilter/tdf144549.ods b/sc/qa/uitest/data/autofilter/tdf144549.ods
new file mode 100644
index 000000000000..811e5676a2df
--- /dev/null
+++ b/sc/qa/uitest/data/autofilter/tdf144549.ods
Binary files differ