diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-28 14:23:31 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-28 20:48:35 +0100 |
commit | e16daa6079f703c87e19904e7bb85e5fd9beac7c (patch) | |
tree | bc77af229da7658148aeb831d5921fb0b23589f7 /sc/qa/uitest/chart2 | |
parent | 730e7a9194a58613a47867839cef0870d52d8d6d (diff) |
tdf#107097: move UItest to CppUniTest
Change-Id: I81834b8316b19baad55122cc06a481d55fb6244a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143401
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/chart2')
-rw-r--r-- | sc/qa/uitest/chart2/tdf107097.py | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/sc/qa/uitest/chart2/tdf107097.py b/sc/qa/uitest/chart2/tdf107097.py deleted file mode 100644 index 53ba438ecea5..000000000000 --- a/sc/qa/uitest/chart2/tdf107097.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- -# -# This file is part of the LibreOffice project. -# -# 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.calc.document import get_cell_by_position -from libreoffice.uno.propertyvalue import mkPropertyValues -from uitest.uihelper.common import get_url_for_data_file - -# Test pivot chart is pasted correctly to a new document - -class tdf107097(UITestCase): - - def test_tdf107097(self): - with self.ui_test.load_file(get_url_for_data_file("tdf107097.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - - - xFirstMatrix = [] - for row in range(6, 18): - xRow = [] - for column in range(3, 7): - xRow.append(get_cell_by_position(calc_doc, 1, column, row).getValue()) - xFirstMatrix.append(xRow) - - gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 1"})) - - self.xUITest.executeCommand(".uno:Copy") - - with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") - - self.xUITest.executeCommand(".uno:Paste") - - xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data - - xSecondMatrix = [] - for row in xData.Data: - xRow = [] - for value in row: - xRow.append(value) - xSecondMatrix.append(xRow) - - self.assertEqual(xFirstMatrix, xSecondMatrix) - - aExpectedColumnDescriptions = ('Sum - Sales T1', 'Sum - Sales T2', - 'Sum - Sales T3', 'Sum - Sales T4') - aExpectedRowDescriptions = ('DE Berlin A', 'DE Berlin B', 'DE Munich A', - 'DE Munich B', 'EN Glasgow A', 'EN Liverpool B', 'EN London A', - 'EN London B', 'FR Nantes A', 'FR Nantes B', 'FR Paris A', 'FR Paris B') - - self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions) - self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions) - -# vim: set shiftwidth=4 softtabstop=4 expandtab: |