summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-01-26 16:55:24 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-01-26 19:17:54 +0000
commit7b0b6e5232585c3756c94ae15ae695eaa1f4fbe1 (patch)
treee83f311a4d3dbde850aaa78598ad3b48756f9650 /sw
parent1bc2be265c528cebc0f3bf33b217edc46af56ff0 (diff)
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/+/146180 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/uitest/writer_tests7/tdf135938.py11
1 files changed, 11 insertions, 0 deletions
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