diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-22 00:01:07 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-12-22 01:17:44 +0100 |
commit | daca12903bb21f43468c3e96fa78bb881b956484 (patch) | |
tree | 3127c3962a30e9054a3556124bebbc26b1afde76 /uitest | |
parent | e69d4c2f9294e11572ad76c59ddc55f286fbe77d (diff) |
uitest: convert transpose manual test to automated test
http://manual-test.libreoffice.org/manage/case/187/
Change-Id: Ia15514127c91ad9391329e96ad23e72b39f9b5f0
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/manual_tests/calc.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py index b0d7b2e2d29b..76a81f0c1591 100644 --- a/uitest/manual_tests/calc.py +++ b/uitest/manual_tests/calc.py @@ -131,4 +131,40 @@ class ManualCalcTests(UITestCase): self.ui_test.close_doc() + def test_transpose(self): + self.ui_test.create_doc_in_start_center("calc") + + xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window") + enter_text_to_cell(xGridWin, "B3", "abcd") + enter_text_to_cell(xGridWin, "B4", "edfg") + enter_text_to_cell(xGridWin, "C3", "35") + enter_text_to_cell(xGridWin, "C4", "5678") + + xGridWin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:C10"})) + + self.xUITest.executeCommand(".uno:Cut") + + xGridWin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + + self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") + + xPasteSpecialDlg = self.xUITest.getTopFocusWindow() + + xAllChkBox = xPasteSpecialDlg.getChild("paste_all") + xAllChkBox.executeAction("CLICK", tuple()) + + xTransposeChkBox = xPasteSpecialDlg.getChild("transpose") + xTransposeChkBox.executeAction("CLICK", tuple()) + + xOkBtn = xPasteSpecialDlg.getChild("ok") + self.ui_test.close_dialog_through_button(xOkBtn) + + document = self.ui_test.get_component() + self.assertEqual(get_cell_by_position(document, 0, 2, 1).getString(), "abcd") + self.assertEqual(get_cell_by_position(document, 0, 2, 2).getValue(), 35) + self.assertEqual(get_cell_by_position(document, 0, 3, 1).getString(), "edfg") + self.assertEqual(get_cell_by_position(document, 0, 3, 2).getValue(), 5678) + + self.ui_test.close_doc() + # vim: set shiftwidth=4 softtabstop=4 expandtab: |