summaryrefslogtreecommitdiff
path: root/uitest/math_tests
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-09-05 20:24:13 +0300
committerخالد حسني <khaled@libreoffice.org>2023-09-05 20:28:34 +0200
commitee187f6ed7873f3ebc1f845a4384a84713be1e9c (patch)
tree263663df8a2debf9ebeb71aacfac58569154465d /uitest/math_tests
parent15e0dfe709636b517bc1876caa3853606d9b499c (diff)
starmath: Always insert using SmCursor when inline editing is enabled
Choosing which code path based on which widget has focus is not a very good idea, and leads to unreliable UI tests as each code path inserts the text slightly differently (one code path inserts plain text then parses the whole equation again, while the other parses the new text then inserts the parsed node directly). Change-Id: Ib2ca942c537e466f6ff100be7f95adaead99f1d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156578 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'uitest/math_tests')
-rw-r--r--uitest/math_tests/start.py3
-rw-r--r--uitest/math_tests/tdf147755.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/uitest/math_tests/start.py b/uitest/math_tests/start.py
index 6b3278acf907..7504387a16f7 100644
--- a/uitest/math_tests/start.py
+++ b/uitest/math_tests/start.py
@@ -57,10 +57,11 @@ class SimpleMathTest(UITestCase):
xElement.executeAction("DOUBLECLICK", tuple())
xEditView = xMathDoc.getChild("editview")
+ xEditView.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"}))
type_text(xEditView, "1")
xEditView.executeAction("TYPE", mkPropertyValues({"KEYCODE":"F4"}))
type_text(xEditView, "2")
- self.assertEqual("1 <> 2 ", get_state_as_dict(xEditView)["Text"])
+ self.assertEqual("{ 1 <> 2 }", get_state_as_dict(xEditView)["Text"])
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/math_tests/tdf147755.py b/uitest/math_tests/tdf147755.py
index 4ee9bc169507..755efbe6b51d 100644
--- a/uitest/math_tests/tdf147755.py
+++ b/uitest/math_tests/tdf147755.py
@@ -26,7 +26,7 @@ class Tdf147755(UITestCase):
xEditView = xMathDoc.getChild("editview")
# Without the fix in place, this test would have failed with
- # AssertionError: '%ALPHA ' != ''
- self.assertEqual("%ALPHA ", get_state_as_dict(xEditView)["Text"])
+ # AssertionError: '%ALPHA' != ''
+ self.assertEqual("%ALPHA", get_state_as_dict(xEditView)["Text"])
# vim: set shiftwidth=4 softtabstop=4 expandtab: