sw/qa/uitest/data/tdf140239.odt |binary sw/qa/uitest/writer_tests7/forms.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+)
New commits: commit 62b1c81d11035bfd9323dc49b1e99cae55e89ffa Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Feb 24 14:30:55 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Feb 24 19:47:56 2021 +0100 tdf#140239: sw: Add UItest Change-Id: I140cc21fa5682f1dd869da0f135337b97c3e38cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111485 Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/uitest/data/tdf140239.odt b/sw/qa/uitest/data/tdf140239.odt new file mode 100644 index 000000000000..53d2537e900c Binary files /dev/null and b/sw/qa/uitest/data/tdf140239.odt differ 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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits