tdf#136855: sw: Add UItest
Change-Id: I2626f56d59456f0e4c0942f4783c6b5270534260
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126843
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/uitest/data/tdf136855.odt b/sw/qa/uitest/data/tdf136855.odt
new file mode 100644
index 0000000..10d951d
--- /dev/null
+++ b/sw/qa/uitest/data/tdf136855.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests4/spellDialog.py b/sw/qa/uitest/writer_tests4/spellDialog.py
index 20a69f5..4a31979 100644
--- a/sw/qa/uitest/writer_tests4/spellDialog.py
+++ b/sw/qa/uitest/writer_tests4/spellDialog.py
@@ -96,6 +96,23 @@ frog, dogg, catt"""
output_text = document.Text.getString().replace('\r\n', '\n')
self.assertTrue(re.match(self.TDF46852_REGEX, output_text))
def test_tdf136855(self):
supported_locale = self.is_supported_locale("en", "US")
if not supported_locale:
self.skipTest("no dictionary support for en_US available")
with self.ui_test.load_file(get_url_for_data_file("tdf136855.odt")) as writer_doc:
with self.ui_test.execute_modeless_dialog_through_command(".uno:SpellingAndGrammarDialog", close_button="close") as xDialog:
xChangeBtn = xDialog.getChild('change')
for i in range(6):
# Without the fix in place, this test would have crashed here
xChangeBtn.executeAction("CLICK", ())
output_text = writer_doc.Text.getString().replace('\n', '')
self.assertTrue(output_text.startswith("xx xx xx xxxxxxxxxxix xxxxxxxxxxxxxxviii"))
def test_tdf66043(self):
supported_locale = self.is_supported_locale("en", "US")
if not supported_locale: