summaryrefslogtreecommitdiff
path: root/uitest/calc_tests
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-02-19 23:56:13 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-02-27 09:42:46 +0000
commitc873f8d75a2a4bc28a13553755c6d38b0e026e11 (patch)
tree88e81c7f08301f12d0df75317b8078d3eb39b971 /uitest/calc_tests
parent2b0748ed1fb727cb52b5c9e423b00242d155d099 (diff)
uitest: move all the conditional format tests into an own test
Change-Id: I5673341b05c8352bc1d46f1483c265ccdc6a1cc5 Reviewed-on: https://gerrit.libreoffice.org/34667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'uitest/calc_tests')
-rw-r--r--uitest/calc_tests/tdf105411.py35
-rw-r--r--uitest/calc_tests/tdf105466.py31
-rw-r--r--uitest/calc_tests/tdf96453.py89
3 files changed, 0 insertions, 155 deletions
diff --git a/uitest/calc_tests/tdf105411.py b/uitest/calc_tests/tdf105411.py
deleted file mode 100644
index 8f08c2f22fb5..000000000000
--- a/uitest/calc_tests/tdf105411.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-from uitest.framework import UITestCase
-
-class tdf105411(UITestCase):
-
- def test_delete_conditional_format(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog")
-
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
-
- xDeleteBtn = xCondFormatDlg.getChild("delete")
- xDeleteBtn.executeAction("CLICK", tuple())
-
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
-
- xDeleteBtn = xCondFormatDlg.getChild("add")
- xDeleteBtn.executeAction("CLICK", tuple())
-
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
-
- xOkBtn = xCondFormatDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/uitest/calc_tests/tdf105466.py b/uitest/calc_tests/tdf105466.py
deleted file mode 100644
index e1cfd2d0a27e..000000000000
--- a/uitest/calc_tests/tdf105466.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-from uitest.framework import UITestCase
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf105466(UITestCase):
-
- def test_changing_conditional_format(self):
-
- self.ui_test.create_doc_in_start_center("calc")
-
- self.ui_test.execute_modeless_dialog_through_command(".uno:ConditionalFormatDialog")
-
- for i in range(0,4):
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
- xTypeLstBox = xCondFormatDlg.getChild("type")
- xTypeLstBox.executeAction("SELECT", mkPropertyValues({"POS": str(i)}))
-
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
- xOkBtn = xCondFormatDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xOkBtn)
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
-
diff --git a/uitest/calc_tests/tdf96453.py b/uitest/calc_tests/tdf96453.py
deleted file mode 100644
index 696fff87da3f..000000000000
--- a/uitest/calc_tests/tdf96453.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-from uitest.framework import UITestCase
-
-import os
-
-from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
-
-from libreoffice.calc.document import get_sheet_from_doc
-from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
-
-def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
-
-class ConditionalFormatDlgTest(UITestCase):
-
- def test_simple_open_manager(self):
-
- calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf96453.ods"))
-
- self.ui_test.execute_dialog_through_command(".uno:ConditionalFormatManagerDialog")
-
- xCondFormatMgr = self.xUITest.getTopFocusWindow()
-
- xCancelBtn = xCondFormatMgr.getChild("cancel")
- xCancelBtn.executeAction("CLICK", tuple())
-
- self.ui_test.close_doc()
-
- def test_tdf96453(self):
-
- calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf96453.ods"))
-
- sheet = get_sheet_from_doc(calc_doc, 0)
- conditional_format_list = get_conditional_format_from_sheet(sheet)
- self.assertEqual(conditional_format_list.getLength(), 2)
-
- self.ui_test.execute_dialog_through_command(".uno:ConditionalFormatManagerDialog")
-
- xCondFormatMgr = self.xUITest.getTopFocusWindow()
-
- # check that we have exactly two conditional formats in the beginning
- xList = xCondFormatMgr.getChild("CONTAINER")
- list_state = get_state_as_dict(xList)
- self.assertEqual(list_state['Children'], '2')
-
- # remove one conditional format
- xRemoveBtn = xCondFormatMgr.getChild("remove")
- xRemoveBtn.executeAction("CLICK", tuple())
-
- # check that the table only shows one
- # but the document still contains two
- list_state = get_state_as_dict(xList)
- self.assertEqual(list_state['Children'], '1')
-
- self.assertEqual(conditional_format_list.getLength(), 2)
-
- # add a new conditional format through the add button
- xAddBtn = xCondFormatMgr.getChild("add")
- self.ui_test.execute_dialog_through_action(xAddBtn, "CLICK", event_name = "ModelessDialogVisible")
-
- xCondFormatDlg = self.xUITest.getTopFocusWindow()
- xCondFormatOkBtn = xCondFormatDlg.getChild("ok")
- self.ui_test.close_dialog_through_button(xCondFormatOkBtn)
-
- # we need to get a pointer again as the old window has been deleted
- xCondFormatMgr = self.xUITest.getTopFocusWindow()
-
- # check again that we now have 2 and not 3 entries in the list
- # and still only 2 conditional formats in the document
- xList = xCondFormatMgr.getChild("CONTAINER")
- list_state = get_state_as_dict(xList)
- self.assertEqual(list_state['Children'], '2')
-
- self.assertEqual(conditional_format_list.getLength(), 2)
-
- # close the conditional format manager
- xCancelBtn = xCondFormatMgr.getChild("cancel")
- self.ui_test.close_dialog_through_button(xCancelBtn)
-
- self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab: