summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/calc_tests7/tdf117987.py
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/uitest/calc_tests7/tdf117987.py')
-rw-r--r--sc/qa/uitest/calc_tests7/tdf117987.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/sc/qa/uitest/calc_tests7/tdf117987.py b/sc/qa/uitest/calc_tests7/tdf117987.py
index 3de0b176ed01..9ad154275f1b 100644
--- a/sc/qa/uitest/calc_tests7/tdf117987.py
+++ b/sc/qa/uitest/calc_tests7/tdf117987.py
@@ -10,16 +10,14 @@ from libreoffice.calc.document import get_cell_by_position
class tdf117987(UITestCase):
def test_highlight_cell_after_moving_cursor(self):
- self.ui_test.create_doc_in_start_center("calc")
- xCalcDoc = self.xUITest.getTopFocusWindow()
- gridwin = xCalcDoc.getChild("grid_window")
+ with self.ui_test.create_doc_in_start_center_guarded("calc") as document:
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
- colorProperty = mkPropertyValues({"BackgroundColor": 16776960})
- gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
- self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
- gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
- self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
+ colorProperty = mkPropertyValues({"BackgroundColor": 16776960})
+ gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+ self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
+ gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "DOWN"}))
+ self.xUITest.executeCommandWithParameters(".uno:BackgroundColor", colorProperty)
- document = self.ui_test.get_component()
- self.assertEqual(get_cell_by_position(document, 0, 0, 1).CellBackColor, 16776960)
- self.ui_test.close_doc()
+ self.assertEqual(get_cell_by_position(document, 0, 0, 1).CellBackColor, 16776960)