summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2020-10-16 14:27:27 +0200
committerAndras Timar <andras.timar@collabora.com>2020-11-15 15:41:56 +0100
commit706aff509857a79cbd93a76410e63931747369f5 (patch)
tree04ba37f394988f8aca17ef1fbcd43dc8d534f5fc
parentea3cda08132a4e3bfda40bd7f8e4d38b6352e713 (diff)
uitest: Rename the "SET" to "TYPE" for Edit boxes + implement the real "SET".
To be consistent with the other controls: "TYPE" actually enters the characters one by one, while "SET" sets it as a whole. Change-Id: I967dc270b1d92fe76107732a511cc3e70d3d65c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104435 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105739 Tested-by: Jenkins
-rw-r--r--sw/qa/uitest/writer_tests3/customizeDialog.py2
-rw-r--r--vcl/source/uitest/uiobject.cxx13
2 files changed, 13 insertions, 2 deletions
diff --git a/sw/qa/uitest/writer_tests3/customizeDialog.py b/sw/qa/uitest/writer_tests3/customizeDialog.py
index 5b6ab664346a..52adae2b0ee1 100644
--- a/sw/qa/uitest/writer_tests3/customizeDialog.py
+++ b/sw/qa/uitest/writer_tests3/customizeDialog.py
@@ -35,7 +35,7 @@ class ConfigureDialog(UITestCase):
initialEntryCount = get_state_as_dict(xfunc)["Children"]
self.assertTrue(initialEntryCount != 0)
- xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"}))
+ xSearch.executeAction("TYPE", mkPropertyValues({"TEXT":"format"}))
# Wait for the search/filter op to be completed
timeout = time.time() + 1
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 32d8d2417f0f..90322d500611 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -720,7 +720,7 @@ void EditUIObject::execute(const OUString& rAction,
const StringMap& rParameters)
{
bool bHandled = true;
- if (rAction == "SET")
+ if (rAction == "TYPE")
{
if (rParameters.find("TEXT") != rParameters.end())
{
@@ -743,6 +743,17 @@ void EditUIObject::execute(const OUString& rAction,
bHandled = false;
}
}
+ else if (rAction == "SET")
+ {
+ auto it = rParameters.find("TEXT");
+ if (it != rParameters.end())
+ {
+ mxEdit->SetText(it->second);
+ mxEdit->Modify();
+ }
+ else
+ bHandled = false;
+ }
else if (rAction == "SELECT")
{
if (rParameters.find("FROM") != rParameters.end() &&