diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-25 21:37:53 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-26 08:56:55 +0100 |
commit | 12921f1d4f8d1c6fc2202627e70d0d7bcee847ac (patch) | |
tree | d473932f00d7c3ab193be5a97a8914e5aadf7352 /sw | |
parent | 9b9eb423eeeb41bb87cd13c2a83dc3e878fbac6e (diff) |
tdf#131522: sw: Add unittest
Change-Id: I8920f12c655b7106a3eb2a5a3916793453c3694a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111569
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/writer_tests7/forms.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py index bd6b8efc96d4..d241fc38a876 100644 --- a/sw/qa/uitest/writer_tests7/forms.py +++ b/sw/qa/uitest/writer_tests7/forms.py @@ -50,6 +50,7 @@ class Forms(UITestCase): self.ui_test.execute_modeless_dialog_through_command(".uno:ControlProperties") xAction = self.ui_test.wait_until_child_is_available('listbox-Action') xURL = self.ui_test.wait_until_child_is_available('urlcontrol-URL') + xEntry = self.ui_test.wait_until_child_is_available('entry') self.assertEqual("None", get_state_as_dict(xAction)['SelectEntryText']) self.assertEqual("false", get_state_as_dict(xURL)['Enabled']) @@ -69,6 +70,20 @@ class Forms(UITestCase): # AssertionError: '12345' != '54321' self.assertEqual("12345", get_state_as_dict(xURL)['Text']) + xEntry.executeAction("FOCUS", tuple()) + self.assertEqual("Push Button", get_state_as_dict(xEntry)['Text']) + + xEntry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) + xEntry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) + xEntry.executeAction("TYPE", mkPropertyValues({"TEXT": "Push"})) + + # Move the focus to another element so the changes done before will take effect + xAction.executeAction("FOCUS", tuple()) + + # tdf#131522: Without the fix in place, this test would have failed with + # AssertionError: 'Push' != 'Push Button' + self.assertEqual("Push", get_state_as_dict(xEntry)['Text']) + self.ui_test.close_doc() def test_tdf138701(self): |