sc/qa/uitest/calc_tests8/tdf125051.py |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit a8f0e824c4d467c51b8269d25b071adda200c932
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Jul 20 13:31:13 2025 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Jul 20 15:13:56 2025 +0200

    Skip the test when the dictionary is not available
    
    See https://lists.freedesktop.org/archives/libreoffice/2025-July/093552.html
    
    Change-Id: I449b2cd490ea7e5bf49893c4ebff98fa8886856d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188083
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/qa/uitest/calc_tests8/tdf125051.py 
b/sc/qa/uitest/calc_tests8/tdf125051.py
index abf9836e97f9..d923a3ff7580 100644
--- a/sc/qa/uitest/calc_tests8/tdf125051.py
+++ b/sc/qa/uitest/calc_tests8/tdf125051.py
@@ -16,7 +16,18 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 
 # Bug 125051 - EDITING: CRASH when start SpellCheck
 class tdf125051(UITestCase):
+    def hasExtension(self, identifier):
+        m = 
self.xContext.getByName("/singletons/com.sun.star.deployment.ExtensionManager")
+        # Only check bundled extensions for now; it doesn't seem useful to 
check user and shared ones in UITests
+        p = (i for i in m.getDeployedExtensions("bundled", None, None) if 
i.getIdentifier().Value == identifier)
+        return any(r.IsPresent and not r.Value.IsAmbiguous and r.Value.Value 
for r in (i.isRegistered(None, None) for i in p))
+
     def test_tdf125051_crash_spelling_dialog(self):
+        # Check if English spellchecker is installed and active
+        if not self.hasExtension("org.openoffice.en.hunspell.dictionaries"):
+            print("Skipping test_tdf125051_crash_spelling_dialog: English 
spellckecker is unavailable")
+            return # can't test without English spell checker
+
         with self.ui_test.create_doc_in_start_center("calc") as document:
             xCalcDoc = self.xUITest.getTopFocusWindow()
             gridwin = xCalcDoc.getChild("grid_window")

Reply via email to