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/.
10 from uitest
.framework
import UITestCase
11 from uitest
.uihelper
.common
import get_state_as_dict
12 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
14 class tdf137459(UITestCase
):
16 def test_tdf137459(self
):
18 with self
.ui_test
.create_doc_in_start_center("writer"):
21 self
.xUITest
.executeCommand(".uno:InsertAnnotation")
22 # wait until the comment is available
23 xComment1
= self
.ui_test
.wait_until_child_is_available('Comment1')
25 xEditView1
= xComment1
.getChild("editview")
26 sText
= "Ctrl+Del should not delete BACKWARDS"
27 xEditView1
.executeAction("TYPE", mkPropertyValues({"TEXT": sText
}))
28 self
.assertEqual(get_state_as_dict(xComment1
)["Text"], sText
)
30 xEditView1
.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+DELETE"}))
31 self
.assertEqual(get_state_as_dict(xComment1
)["Text"], sText
)
34 # vim: set shiftwidth=4 softtabstop=4 expandtab: