tdf#141084: sw: Add UItest

Change-Id: Ib301adfe480217550b008f88938bb9cacc8c98ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113664
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/qa/uitest/writer_tests7/forms.py b/sw/qa/uitest/writer_tests7/forms.py
index 179e828..b931c5d 100644
--- a/sw/qa/uitest/writer_tests7/forms.py
+++ b/sw/qa/uitest/writer_tests7/forms.py
@@ -42,6 +42,27 @@ class Forms(UITestCase):

        self.ui_test.close_doc()

    def test_tdf141084(self):

        # Reuse document from tdf#140239
        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:FormProperties")
        xURL = self.ui_test.wait_until_child_is_available('urlcontrol-URL')
        xFrame = self.ui_test.wait_until_child_is_available('combobox-Frame')

        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' != 'file:///tmp/tmp/5file:///tmp/tmp/4file://[40 chars]mp/1'
        self.assertEqual("12345", get_state_as_dict(xURL)['Text'])

    def test_tdf140239(self):

        self.ui_test.load_file(get_url_for_data_file("tdf140239.odt"))