sc/qa/uitest/autofilter2/tdf153972.py      |    6 +++---
 sc/qa/uitest/autofilter2/tdf95520.py       |    2 --
 sc/qa/uitest/data/autofilter/tdf153972.ods |binary
 3 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 15a88c00ef4b48009abff781d960c84d6d878ecc
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Jun 12 13:05:56 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Jun 12 15:51:48 2023 +0200

    sc: uitest: fix sporadic test failures
    
    Sometimes theses tests fail with
    
    ======================================================================
    FAIL: test_tdf153972 (tdf153972.tdf153972)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File 
"/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64_branch/sc/qa/uitest/autofilter2/tdf153972.py",
 line 37, in test_tdf153972
        self.assertEqual('Lime', 
get_state_as_dict(xSubMenu.getChild('0'))['Text'])
    AssertionError: 'Lime' != '#81D41A'
    - Lime
    + #81D41A
    
    ======================================================================
    FAIL: test_tdf95520 (tdf95520.tdf95520)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File 
"/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64_branch/sc/qa/uitest/autofilter2/tdf95520.py",
 line 36, in test_tdf95520
        self.assertEqual('Red', 
get_state_as_dict(xSubMenu.getChild('1'))['Text'])
    AssertionError: 'Red' != '#FF0000'
    - Red
    + #FF0000
    
    See 
https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil_branch/10807/consoleFull#4610001379567f988-cbcf-4519-af05-6000b834f13f
    
    and I believe the reason is the color palette fails to load in
    sc/source/ui/view/gridwin.cxx:752 and then its not able to
    translate #81D41A to Lime.
    Adapt the test and document to use colors without a color name
    
    Change-Id: Ie1119fe0ff31147b5395076969e41481706d8dfb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152897
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/qa/uitest/autofilter2/tdf153972.py 
b/sc/qa/uitest/autofilter2/tdf153972.py
index 1697300c95a4..423f9db185ef 100644
--- a/sc/qa/uitest/autofilter2/tdf153972.py
+++ b/sc/qa/uitest/autofilter2/tdf153972.py
@@ -34,9 +34,9 @@ class tdf153972(UITestCase):
             # Without the fix in place, this test would have failed with
             # AssertionError: 4 != 0
             self.assertEqual(4, len(xSubMenu.getChildren()))
-            self.assertEqual('Lime', 
get_state_as_dict(xSubMenu.getChild('0'))['Text'])
-            self.assertEqual('Red', 
get_state_as_dict(xSubMenu.getChild('1'))['Text'])
-            self.assertEqual('Yellow', 
get_state_as_dict(xSubMenu.getChild('2'))['Text'])
+            self.assertEqual('#7FD41A', 
get_state_as_dict(xSubMenu.getChild('0'))['Text'])
+            self.assertEqual('#FE0000', 
get_state_as_dict(xSubMenu.getChild('1'))['Text'])
+            self.assertEqual('#FEFF00', 
get_state_as_dict(xSubMenu.getChild('2'))['Text'])
             self.assertEqual('No Fill', 
get_state_as_dict(xSubMenu.getChild('3'))['Text'])
 
             # Choose Red
diff --git a/sc/qa/uitest/autofilter2/tdf95520.py 
b/sc/qa/uitest/autofilter2/tdf95520.py
index 33b9e1948b9a..c5339c3f8db0 100644
--- a/sc/qa/uitest/autofilter2/tdf95520.py
+++ b/sc/qa/uitest/autofilter2/tdf95520.py
@@ -33,9 +33,7 @@ class tdf95520(UITestCase):
             self.assertEqual('false', 
get_state_as_dict(xSubMenu.getChild('0'))['IsChecked'])
             self.assertEqual('#00FF00', 
get_state_as_dict(xSubMenu.getChild('0'))['Text'])
             self.assertEqual('false', 
get_state_as_dict(xSubMenu.getChild('1'))['IsChecked'])
-            self.assertEqual('Red', 
get_state_as_dict(xSubMenu.getChild('1'))['Text'])
             self.assertEqual('false', 
get_state_as_dict(xSubMenu.getChild('2'))['IsChecked'])
-            self.assertEqual('Yellow', 
get_state_as_dict(xSubMenu.getChild('2'))['Text'])
 
             # Choose Red
             xSubMenu.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"DOWN"}))
diff --git a/sc/qa/uitest/data/autofilter/tdf153972.ods 
b/sc/qa/uitest/data/autofilter/tdf153972.ods
index e720419bda2e..e60828be9c8b 100644
Binary files a/sc/qa/uitest/data/autofilter/tdf153972.ods and 
b/sc/qa/uitest/data/autofilter/tdf153972.ods differ

Reply via email to