summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/textToColumns
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-11-17 13:14:35 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-17 17:44:39 +0100
commitde4c17e7a7af37196dd36bb62967b557f9aa84f7 (patch)
treec68233b5c9ef41f679c8b7fd914ec79cc235735d /sc/qa/uitest/textToColumns
parent041379f6420f6d67bfd2bb952968e8c183f13a9d (diff)
uitest: sc: use existing tests to test SetOptimalColumnWidth...
... and SetOptimalRowHeight dialogs Change-Id: Ibdee348d84a8b96d8f698e7fc6db89eb24422f5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125392 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/textToColumns')
-rw-r--r--sc/qa/uitest/textToColumns/tdf89907.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/qa/uitest/textToColumns/tdf89907.py b/sc/qa/uitest/textToColumns/tdf89907.py
index b046b758a9d8..1270db408bb2 100644
--- a/sc/qa/uitest/textToColumns/tdf89907.py
+++ b/sc/qa/uitest/textToColumns/tdf89907.py
@@ -9,6 +9,7 @@ from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import change_measurement_unit
#Bug 89907 - Text to columns only affects first line when width is auto set
class tdf89907(UITestCase):
@@ -17,6 +18,8 @@ class tdf89907(UITestCase):
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
+ change_measurement_unit(self, "Centimeter")
+
#Add data
enter_text_to_cell(gridwin, "A1", "afasdfs.fdfasd.fsadf.fasd")
enter_text_to_cell(gridwin, "A2", "3242.43242.3242.2342")
@@ -26,7 +29,10 @@ class tdf89907(UITestCase):
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:SelectColumn")
#Optimal Width
- self.xUITest.executeCommand(".uno:SetOptimalColumnWidthDirect")
+ with self.ui_test.execute_dialog_through_command(".uno:SetOptimalColumnWidth") as xDialog:
+ xvalue = xDialog.getChild("value")
+ self.assertEqual("0.20 cm", get_state_as_dict(xvalue)["Text"])
+
# Data - Text to Columns
with self.ui_test.execute_dialog_through_command(".uno:TextToColumns") as xDialog:
xother = xDialog.getChild("other")