tdf#138851: sc: Add UItest

Change-Id: Ia3197a3da56d853ba805157af25fceefa461c85e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107677
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/qa/uitest/range_name/create_range_name.py b/sc/qa/uitest/range_name/create_range_name.py
index f1cbe4a..e4fab4e 100644
--- a/sc/qa/uitest/range_name/create_range_name.py
+++ b/sc/qa/uitest/range_name/create_range_name.py
@@ -170,6 +170,17 @@ class CreateRangeNameTest(UITestCase):
        # and AssertionError: '=Sheet1.localRangeName' != '=localrangename'
        self.assertEqual("=Sheet1.localRangeName", get_cell_by_position(document, 0, 1, 0).getFormula())

        self.ui_test.execute_dialog_through_command(".uno:DefineName")
        xDialog = self.xUITest.getTopFocusWindow()

        # tdf#138851: Without the fix in place, this test would have failed with
        # AssertionError: 'Sheet1' != 'Document (Global)'
        xScope = xDialog.getChild("scope")
        self.assertEqual("Sheet1", get_state_as_dict(xScope)['SelectEntryText'])

        xOkBtn = xDialog.getChild("ok")
        self.ui_test.close_dialog_through_button(xOkBtn)

        self.ui_test.close_doc()

# vim: set shiftwidth=4 softtabstop=4 expandtab: