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
.calc
.document
import get_cell_by_position
11 from libreoffice
.uno
.propertyvalue
import mkPropertyValues
13 class tdf115474(UITestCase
):
14 def test_tdf115474_Warning_Dialog(self
):
15 with self
.ui_test
.create_doc_in_start_center("calc") as document
:
16 gridwin
= self
.xUITest
.getTopFocusWindow().getChild("grid_window")
17 gridwin
.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C1000000"}))
18 with self
.ui_test
.execute_dialog_through_command(".uno:AutoFormat", close_button
="") as xDialog
:
19 formatlb
= xDialog
.getChild("formatlb")
20 entry
= formatlb
.getChild("2") # pick Box list blue
21 entry
.executeAction("SELECT", tuple())
23 xOKBtn
= xDialog
.getChild("ok")
24 with self
.ui_test
.execute_blocking_action(xOKBtn
.executeAction
, args
=('CLICK', ()), close_button
="no"):
25 # no background color set, we've skipped autoformat!
26 self
.assertEqual(get_cell_by_position(document
, 0, 0, 0).CellBackColor
, -1)