sw/qa/uitest/writer_tests7/tdf135938.py |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit 2b985829b9b33f5900202d40b5c258220b749d68
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Jan 26 16:55:24 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jan 26 20:12:34 2023 +0000

    UITest_writer_tests7: improve test a bit
    
    To see where the problem might be
    
    Change-Id: I0baed63408c96eddffbaa39e172bc922c0a78241
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146197
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/uitest/writer_tests7/tdf135938.py 
b/sw/qa/uitest/writer_tests7/tdf135938.py
index 00a72bec26ff..07298ab8d8e1 100755
--- a/sw/qa/uitest/writer_tests7/tdf135938.py
+++ b/sw/qa/uitest/writer_tests7/tdf135938.py
@@ -27,10 +27,19 @@ class tdf135938(UITestCase):
                 xName.executeAction("TYPE", mkPropertyValues({"TEXT": "ABC"}))
                 xInsert = xDialog.getChild("ok")
                 xInsert.executeAction("CLICK", tuple())
+
+                xSelect = xDialog.getChild("select-ref")
+                self.assertEqual("1", get_state_as_dict(xSelect)["Children"])
+                self.assertEqual("ABC", 
get_state_as_dict(xSelect.getChild(0))["Text"])
+
                 xName.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
                 xName.executeAction("TYPE", mkPropertyValues({"TEXT": "DEF"}))
                 xInsert.executeAction("CLICK", tuple())
 
+                self.assertEqual("2", get_state_as_dict(xSelect)["Children"])
+                self.assertEqual("ABC", 
get_state_as_dict(xSelect.getChild(0))["Text"])
+                self.assertEqual("DEF", 
get_state_as_dict(xSelect.getChild(1))["Text"])
+
                 # Search for insert reference type
                 xFilter = None
                 for childIx in range(len(xTreelistType.getChildren())):
@@ -43,6 +52,8 @@ class tdf135938(UITestCase):
                         # Without the fix in place, this test would have 
failed with
                         # AssertionError: 'ABC' != 'DEF', i.e., the text of 
the name field did not change
                         self.assertEqual(get_state_as_dict(xName)["Text"], 
"ABC")
+
+                        self.assertEqual("1", 
get_state_as_dict(xSelect)["Children"])
                         break
 
                 # Check if insert reference entry was found

Reply via email to