summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-02-24 20:23:27 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-02-24 23:23:20 +0100
commitaf64bc49d872d8a040d66387303def98eae5cd51 (patch)
tree3a7209712f488a346551d9853a5fe9bad8abce42
parentbfcbccbf0c2798e6a36f43b72060289a9c0ca73f (diff)
tdf#138271: sw: Add UItest
Change-Id: I9bfa7e83fcafe9b809daf93e5a41bc74c9d5e3f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111501 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/qa/uitest/data/tdf138271.odtbin0 -> 8763 bytes
-rw-r--r--sw/qa/uitest/writer_tests7/forms.py35
2 files changed, 35 insertions, 0 deletions
diff --git a/sw/qa/uitest/data/tdf138271.odt b/sw/qa/uitest/data/tdf138271.odt
new file mode 100644
index 000000000000..ea09b5577b57
--- /dev/null
+++ b/sw/qa/uitest/data/tdf138271.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py
index 8c77560e0b61..bd6b8efc96d4 100644
--- a/sw/qa/uitest/writer_tests7/forms.py
+++ b/sw/qa/uitest/writer_tests7/forms.py
@@ -139,4 +139,39 @@ class Forms(UITestCase):
self.ui_test.close_doc()
+ def test_tdf138271(self):
+
+ self.ui_test.load_file(get_url_for_data_file("tdf138271.odt"))
+
+ self.xUITest.executeCommand(".uno:JumpToNextFrame")
+
+ aOldValue = ["-1000000.00", "1000000.00"]
+ aNewValue = ["-100.00", "100.00"]
+
+ for i, name in enumerate(['formattedcontrol-Value min.', 'formattedcontrol-Value max.']):
+
+ self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties")
+ xChild = self.ui_test.wait_until_child_is_available(name)
+
+ self.assertEqual(aOldValue[i], get_state_as_dict(xChild)['Text'])
+
+ xChild.executeAction("FOCUS", tuple())
+ xChild.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xChild.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xChild.executeAction("TYPE", mkPropertyValues({"TEXT": aNewValue[i]}))
+
+ #Close the dialog and open it again
+ self.xUITest.executeCommand(".uno:ControlProperties")
+
+ self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties")
+ xChild = self.ui_test.wait_until_child_is_available(name)
+
+ # Without the fix in place, this test would have failed here because
+ # the values wouldn't have changed
+ self.assertEqual(aNewValue[i], get_state_as_dict(xChild)['Text'])
+
+ self.xUITest.executeCommand(".uno:ControlProperties")
+
+ self.ui_test.close_doc()
+
# vim: set shiftwidth=4 softtabstop=4 expandtab: