From 52eb3091f5303c4f57e8d79cfa7bf0b973b68d1d Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Mon, 2 Nov 2020 12:23:37 +0100 Subject: [PATCH] tdf#137930: uitest: Add assert to check values are not reset Change-Id: I28ad4a717000fab894f3df7c41b8e8eeaff5fad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105177 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- uitest/uitest/uihelper/common.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uitest/uitest/uihelper/common.py b/uitest/uitest/uihelper/common.py index 5d4c448f22a2..cf3a277aa15b 100644 --- a/uitest/uitest/uihelper/common.py +++ b/uitest/uitest/uihelper/common.py @@ -41,6 +41,11 @@ def change_measurement_unit(UITestCase, unit): actionProps = mkPropertyValues(props) xUnit.executeAction("SELECT", actionProps) + # tdf#137930: Check apply button doesn't reset the value + xApplyBtn = xDialogOpt.getChild("apply") + xApplyBtn.executeAction("CLICK", tuple()) + UITestCase.assertEqual(unit, get_state_as_dict(xUnit)['SelectEntryText']) + xOKBtn = xDialogOpt.getChild("ok") UITestCase.ui_test.close_dialog_through_button(xOKBtn)