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 <xiscofauli@libreoffice.org>
diff --git a/uitest/uitest/uihelper/common.py b/uitest/uitest/uihelper/common.py
index 5d4c448..cf3a277 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)