sc/qa/uitest/conditional_format/tdf164722.py |   43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

New commits:
commit 4e37feb060c2a5c823d1e762a87bdca09995f480
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Feb 19 14:08:56 2025 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Feb 19 16:13:04 2025 +0100

    tdf#164722: sc: Add UItest
    
    Change-Id: If7d778596d56750344cca56a6666aa02fe40adc0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181891
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/uitest/conditional_format/tdf164722.py 
b/sc/qa/uitest/conditional_format/tdf164722.py
new file mode 100644
index 000000000000..b6b1ed555d89
--- /dev/null
+++ b/sc/qa/uitest/conditional_format/tdf164722.py
@@ -0,0 +1,43 @@
+# -*- 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_state_as_dict
+from uitest.uihelper.calc import enter_text_to_cell
+
+class tdf164722(UITestCase):
+    def test_tdf164722(self):
+
+        with self.ui_test.create_doc_in_start_center("calc") as document:
+            xCalcDoc = self.xUITest.getTopFocusWindow()
+            gridwin = xCalcDoc.getChild("grid_window")
+
+            cond_formats = document.Sheets[0].ConditionalFormats
+            self.assertEqual(0, cond_formats.Length)
+
+            enter_text_to_cell(gridwin, "A1", "1")
+            enter_text_to_cell(gridwin, "A2", "2")
+            enter_text_to_cell(gridwin, "A3", "3")
+
+            self.xUITest.executeCommand(".uno:SelectColumn")
+
+            with 
self.ui_test.execute_dialog_through_command(".uno:ColorScaleFormatDialog") as 
xCondFormat:
+                pass
+
+            self.assertEqual(1, cond_formats.Length)
+
+            self.xUITest.executeCommand(".uno:Undo")
+
+            # Without the fix in place, it would have failed here
+            with 
self.ui_test.execute_dialog_through_command(".uno:ColorScaleFormatDialog") as 
xCondFormat:
+                pass
+
+            self.assertEqual(1, cond_formats.Length)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:

Reply via email to