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:42:17 +0100
commitfc5aeeb8d9d44808d18880f6812075830bb5d11c (patch)
tree3b1420408a7b1503b10f2ca30871574375f86968
parent99d3442285f983deb142a12ceb91574ef9800dec (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. Also I believe Modify() should be called, not UpdateData()... 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/+/105616 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--uitest/writer_tests/customizeDialog.py2
-rw-r--r--vcl/source/uitest/uiobject.cxx13
2 files changed, 13 insertions, 2 deletions
diff --git a/uitest/writer_tests/customizeDialog.py b/uitest/writer_tests/customizeDialog.py
index 9d2311eb46a6..5812c51e098e 100644
--- a/uitest/writer_tests/customizeDialog.py
+++ b/uitest/writer_tests/customizeDialog.py
@@ -36,7 +36,7 @@ class ConfigureDialog(UITestCase):
initialEntryCount = get_state_as_dict(xfunc)["Children"]
self.assertTrue(initialEntryCount is not 0)
- xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"}))
+ xSearch.executeAction("TYPE", mkPropertyValues({"TEXT":"format"}))
# Wait for the search/filter op to be completed
time.sleep(1)
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 3d6242697066..818a4513b7f6 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -710,7 +710,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())
{
@@ -733,6 +733,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() &&