sw/qa/uitest/writer_tests7/forms.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 12921f1d4f8d1c6fc2202627e70d0d7bcee847ac Author: Xisco Fauli <[email protected]> AuthorDate: Thu Feb 25 21:37:53 2021 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Feb 26 08:56:55 2021 +0100 tdf#131522: sw: Add unittest Change-Id: I8920f12c655b7106a3eb2a5a3916793453c3694a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111569 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> 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): _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
