[Libreoffice-commits] core.git: sc/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 24 06:17:36 UTC 2020
sc/qa/uitest/calc_dialogs/openDialogs.py | 3 +-
sc/qa/uitest/calc_tests6/tdf104378.py | 36 +++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
New commits:
commit dad6851b1cb68fe8828230e4b59a08de05ae13a2
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Oct 23 17:53:29 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sat Oct 24 08:16:57 2020 +0200
tdf#104378: sc: Add UItest
Change-Id: I2258de72c3aae6b7d9aaa2c65c8c551384d84024
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104736
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/calc_dialogs/openDialogs.py b/sc/qa/uitest/calc_dialogs/openDialogs.py
index a3bb7fb249bf..abf6857c02e1 100644
--- a/sc/qa/uitest/calc_dialogs/openDialogs.py
+++ b/sc/qa/uitest/calc_dialogs/openDialogs.py
@@ -139,7 +139,8 @@ dialogs = [
# {"command": ".uno:SpellDialog", "closeButton": "close"},
# an extra dialog appears
{"command": ".uno:Hyphenate", "closeButton": "cancel"},
- {"command": ".uno:ChineseConversion", "closeButton": "cancel"},
+ #{"command": ".uno:ChineseConversion", "closeButton": "cancel"},
+ # tested in sc/qa/uitest/calc_tests6/tdf104378.py
# {"command": ".uno:AutoCorrectDlg", "closeButton": "cancel"},
# tested in sc/qa/uitest/calc_tests6/autocorrectOptions.py
{"command": ".uno:GoalSeekDialog", "closeButton": "cancel", "skipTestOK": True},
diff --git a/sc/qa/uitest/calc_tests6/tdf104378.py b/sc/qa/uitest/calc_tests6/tdf104378.py
new file mode 100644
index 000000000000..44c786019636
--- /dev/null
+++ b/sc/qa/uitest/calc_tests6/tdf104378.py
@@ -0,0 +1,36 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+
+class tdf104378(UITestCase):
+
+ def test_tdf104378(self):
+ calc_doc = self.ui_test.create_doc_in_start_center("calc")
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+
+ enter_text_to_cell(gridwin, "A1", "遠程MySQL連接遠程MySQL連接遠程MySQL連接")
+
+ self.ui_test.execute_dialog_through_command(".uno:ChineseConversion")
+
+ xDialog = self.xUITest.getTopFocusWindow()
+ xOKBtn = xDialog.getChild('ok')
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ document = self.ui_test.get_component()
+
+ # Without the fix in place, this test would have failed with
+ # - 远程MySQL連接遠程MySQL連接遠程MySQL連接
+ # + 远程MySQL连接远程MySQL连接远程MySQL连接
+ self.assertEqual(get_cell_by_position(
+ document, 0, 0, 0).getString(), "远程MySQL连接远程MySQL连接远程MySQL连接")
+
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list