1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 from uitest
.framework
import UITestCase
8 from uitest
.uihelper
.common
import select_pos
9 from uitest
.uihelper
.common
import get_state_as_dict
10 import org
.libreoffice
.unotest
13 def get_url_for_data_file(file_name
):
14 return pathlib
.Path(org
.libreoffice
.unotest
.makeCopyFromTDOC(file_name
)).as_uri()
16 class Tdf137945(UITestCase
):
18 def test_tdf137945(self
):
19 calc_doc
= self
.ui_test
.load_file(get_url_for_data_file("tdf137945.ods"))
21 self
.ui_test
.execute_dialog_through_command(".uno:Validation")
22 xDialog
= self
.xUITest
.getTopFocusWindow()
23 xTabs
= xDialog
.getChild("tabcontrol")
24 select_pos(xTabs
, "1")
25 xInput
= xDialog
.getChild("inputhelp")
26 xTitle
= xDialog
.getChild("title")
28 self
.assertEqual("test", get_state_as_dict(xTitle
)['Text'])
29 # Without the fix in place, this test would have failed with
30 # '1 2 3 4 5 10 end' != '1 2 3 4 5 10 end'
31 self
.assertEqual("1 2 3 4 5 10 end", get_state_as_dict(xInput
)['Text'])
33 xOKBtn
= xDialog
.getChild("ok")
34 self
.ui_test
.close_dialog_through_button(xOKBtn
)
36 self
.ui_test
.close_doc()
38 # vim: set shiftwidth=4 softtabstop=4 expandtab: