tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / qa / uitest / csv_dialog / tdf142395.py
blob718a3ac47b2bef010ed3ddc9ba8ed3fbe839247f
1 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 from uitest.framework import UITestCase
10 from libreoffice.uno.propertyvalue import mkPropertyValues
11 from libreoffice.calc.document import get_cell_by_position
12 from libreoffice.calc.csv_dialog import load_csv_file
14 class Tdf142395(UITestCase):
16 def test_tdf142395(self):
17 with load_csv_file(self, "tdf142395.csv", True) as xDialog:
18 # Remove the text delimiter
19 xTextDelimiter = xDialog.getChild("textdelimiter")
20 xTextDelimiter.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
21 xTextDelimiter.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
23 document = self.ui_test.get_component()
25 self.assertEqual("a", get_cell_by_position(document, 0, 0, 0).getString())
26 self.assertEqual(" b", get_cell_by_position(document, 0, 1, 0).getString())
27 self.assertEqual(" c", get_cell_by_position(document, 0, 2, 0).getString())
29 # Without the fix in place, this test would have failed with
30 # AssertionError: ' ' != '晦餪'
31 self.assertEqual(" ", get_cell_by_position(document, 0, 3, 0).getString())
33 self.assertEqual("e", get_cell_by_position(document, 0, 0, 1).getString())
34 self.assertEqual(" f", get_cell_by_position(document, 0, 1, 1).getString())
35 self.assertEqual(" g", get_cell_by_position(document, 0, 2, 1).getString())
36 self.assertEqual(" ", get_cell_by_position(document, 0, 3, 1).getString())
38 self.ui_test.close_doc()
40 # vim: set shiftwidth=4 softtabstop=4 expandtab: