From 7b0b6e5232585c3756c94ae15ae695eaa1f4fbe1 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 26 Jan 2023 16:55:24 +0100 Subject: 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 --- sw/qa/uitest/writer_tests7/tdf135938.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sw/qa/uitest') 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 -- cgit v1.2.3