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 libreoffice
.uno
.propertyvalue
import mkPropertyValues
12 from libreoffice
.calc
.document
import get_cell_by_position
14 class tdf117987(UITestCase
):
16 def test_highlight_cell_after_moving_cursor(self
):
17 with self
.ui_test
.create_doc_in_start_center("calc") as document
:
18 xCalcDoc
= self
.xUITest
.getTopFocusWindow()
19 gridwin
= xCalcDoc
.getChild("grid_window")
21 colorProperty
= mkPropertyValues({"BackgroundColor": 16776960})
22 gridwin
.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
23 self
.xUITest
.executeCommandWithParameters(".uno:BackgroundColor", colorProperty
)
24 gridwin
.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
25 self
.xUITest
.executeCommandWithParameters(".uno:BackgroundColor", colorProperty
)
27 self
.assertEqual(get_cell_by_position(document
, 0, 0, 1).CellBackColor
, 16776960)
29 # vim: set shiftwidth=4 softtabstop=4 expandtab: