diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-24 14:30:55 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-02-24 19:47:56 +0100 |
commit | 62b1c81d11035bfd9323dc49b1e99cae55e89ffa (patch) | |
tree | de47519df9c5cc9b3d78fcd179ac99d408687667 /sw/qa/uitest/writer_tests7 | |
parent | 8ae9d4727d8010a8f5d51f76ff0ebc5f88f0709f (diff) |
tdf#140239: sw: Add UItest
Change-Id: I140cc21fa5682f1dd869da0f135337b97c3e38cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111485
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/uitest/writer_tests7')
-rw-r--r-- | sw/qa/uitest/writer_tests7/forms.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py index 5c8f22ba08c2..eb1f266fbf10 100644 --- a/sw/qa/uitest/writer_tests7/forms.py +++ b/sw/qa/uitest/writer_tests7/forms.py @@ -39,4 +39,35 @@ class Forms(UITestCase): self.assertEqual("Multi-line", get_state_as_dict(xChild)['SelectEntryText']) self.ui_test.close_doc() + + def test_tdf140239(self): + + self.ui_test.load_file(get_url_for_data_file("tdf140239.odt")) + + self.xUITest.executeCommand(".uno:JumpToNextFrame") + + 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') + + self.assertEqual("None", get_state_as_dict(xAction)['SelectEntryText']) + self.assertEqual("false", get_state_as_dict(xURL)['Enabled']) + + xAction.executeAction("SELECT", mkPropertyValues({"TEXT": "Open document/web page"})) + + self.assertEqual("Open document/web page", get_state_as_dict(xAction)['SelectEntryText']) + self.assertEqual("true", get_state_as_dict(xURL)['Enabled']) + + xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "1"})) + xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "2"})) + xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "3"})) + xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "4"})) + xURL.executeAction("TYPE", mkPropertyValues({"TEXT": "5"})) + + # Without the fix in place, this test would have failed with + # AssertionError: '12345' != '54321' + self.assertEqual("12345", get_state_as_dict(xURL)['Text']) + + self.ui_test.close_doc() + # vim: set shiftwidth=4 softtabstop=4 expandtab: |