summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-06-13 17:17:05 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-13 21:33:01 +0200
commit77a28966f06a7f872b305ff8e2c603e675a5c8d1 (patch)
tree883de8d67f1453748f0644743641a087f6101edd /uitest
parent31bf1a7f18de43014700869910767c8264cbd743 (diff)
uitest: sc: reset values in paste special dialog
in preparation for https://gerrit.libreoffice.org/c/core/+/135110 Change-Id: I0bfa8ddd9b814239a0e284b1b219cf760ee34826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135733 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/libreoffice/calc/paste_special.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/uitest/libreoffice/calc/paste_special.py b/uitest/libreoffice/calc/paste_special.py
new file mode 100644
index 000000000000..6f153ad14c86
--- /dev/null
+++ b/uitest/libreoffice/calc/paste_special.py
@@ -0,0 +1,30 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.uihelper.common import get_state_as_dict
+
+def reset_default_values(UITestCase, xDialog):
+ setToFalse = ['paste_all', 'formats', 'comments', 'objects', 'formulas',
+ 'link', 'transpose', 'skip_empty']
+ for childName in setToFalse:
+ xChild = xDialog.getChild(childName)
+ if get_state_as_dict(xChild)['Selected'] == 'true':
+ xChild.executeAction("CLICK", tuple())
+ UITestCase.assertEqual('false', get_state_as_dict(xChild)['Selected'])
+
+ setToTrue = ['text', 'numbers', 'datetime', 'cbImmediately']
+ for childName in setToTrue:
+ xChild = xDialog.getChild(childName)
+ if get_state_as_dict(xChild)['Selected'] == 'false':
+ xChild.executeAction("CLICK", tuple())
+ UITestCase.assertEqual('true', get_state_as_dict(xChild)['Selected'])
+
+ setToCheck = ['none', 'no_shift']
+ for childName in setToCheck:
+ xChild = xDialog.getChild(childName)
+ xChild.executeAction("CLICK", tuple())
+ UITestCase.assertEqual('true', get_state_as_dict(xChild)['Checked'])