tdf#159927 unit test for impress date/time language detection
make -srj1 UITest_impress_tests \
UITEST_TEST_NAME="tdf159927_dateTime.tdf159927.test_tdf159927" \
SAL_USE_VCLPLUGIN=gen
Change-Id: Ic0f13fd7f7f427cc85f8f7c4d144ecfb5b722291
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164070
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sd/qa/uitest/data/tdf159927_dateTime.odp b/sd/qa/uitest/data/tdf159927_dateTime.odp
new file mode 100644
index 0000000..a0481660
--- /dev/null
+++ b/sd/qa/uitest/data/tdf159927_dateTime.odp
Binary files differ
diff --git a/sd/qa/uitest/impress_tests/tdf159927_dateTime.py b/sd/qa/uitest/impress_tests/tdf159927_dateTime.py
new file mode 100644
index 0000000..1a72d19
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf159927_dateTime.py
@@ -0,0 +1,28 @@
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
# This file is part of the LibreOffice project.
#
# 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.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
import time
class tdf159927(UITestCase):
def test_tdf159927(self):
with self.ui_test.load_file(get_url_for_data_file("tdf159927_dateTime.odp")) as document:
with self.ui_test.execute_dialog_through_command(".uno:HeaderAndFooter", close_button="cancel") as xDialog:
language_list = xDialog.getChild("language_list")
# Expected: the existing language of the date/time field: Finnish
# Actual without the fix: the user's locale as specified in tools - options.
self.assertEqual(get_state_as_dict(language_list)["SelectEntryText"], "Finnish")
#time.sleep(2)
# vim: set shiftwidth=4 softtabstop=4 expandtab: