[Libreoffice-commits] core.git: sc/qa
Serge Krot (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 5 01:28:46 UTC 2020
sc/qa/uitest/calc_tests/formatCells.py | 53 +++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
New commits:
commit 268a79985c773be7bd843a240eb7226c6f51d3aa
Author: Serge Krot <Serge.Krot at cib.de>
AuthorDate: Wed Nov 4 17:38:44 2020 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Nov 5 02:28:06 2020 +0100
tdf#137790 calc: set minimal line width: unit test
Change-Id: Idac7c23e55b3c4ee94790458fca5e7a7a5522098
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105301
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sc/qa/uitest/calc_tests/formatCells.py b/sc/qa/uitest/calc_tests/formatCells.py
index 7508a47aaf4a..3bb78348fac2 100644
--- a/sc/qa/uitest/calc_tests/formatCells.py
+++ b/sc/qa/uitest/calc_tests/formatCells.py
@@ -294,6 +294,59 @@ class formatCell(UITestCase):
self.ui_test.close_doc()
+ def test_minimal_border_width(self):
+ #borderpage.ui, tdf#137790
+ calc_doc = self.ui_test.create_doc_in_start_center("calc")
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = xCalcDoc.getChild("grid_window")
+ document = self.ui_test.get_component()
+
+ #set points pt measurement
+ change_measurement_unit(self, "Point")
+
+ #select cell A1
+ gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+ #format - cell
+ self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xTabs = xDialog.getChild("tabcontrol")
+ select_pos(xTabs, "5") #tab Borders
+
+ linewidthmf = xDialog.getChild("linewidthmf")
+ xLineSet = xDialog.getChild('lineset')
+
+ # check line-width for default solid line
+ self.assertEqual('0', get_state_as_dict(xLineSet)['SelectedItemPos'])
+ widthVal = get_state_as_dict(linewidthmf)["Text"]
+ self.assertEqual(widthVal, '0.75 pt')
+
+ # set line style to "double" (minimal width is taken)
+ xLineSet.executeAction("CHOOSE", mkPropertyValues({"POS": '16'}))
+ widthVal = get_state_as_dict(linewidthmf)["Text"]
+ self.assertEqual(widthVal, '1.10 pt')
+
+ # set line style to "solid"
+ xLineSet.executeAction("CHOOSE", mkPropertyValues({"POS": "1"}))
+ widthVal = get_state_as_dict(linewidthmf)["Text"]
+ self.assertEqual(widthVal, '0.75 pt')
+
+ # make custom line width
+ linewidthmf.executeAction("UP", tuple())
+ linewidthmf.executeAction("UP", tuple())
+ linewidthmf.executeAction("UP", tuple())
+ widthVal = get_state_as_dict(linewidthmf)["Text"]
+ self.assertEqual(widthVal, '1.50 pt')
+
+ # set line style to "double" (minimal width is not taken)
+ xLineSet.executeAction("CHOOSE", mkPropertyValues({"POS": "8"}))
+ widthVal = get_state_as_dict(linewidthmf)["Text"]
+ self.assertEqual(widthVal, '1.50 pt')
+
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ self.ui_test.close_doc()
+
def test_format_cell_borders_tab(self):
#borderpage.ui
calc_doc = self.ui_test.create_doc_in_start_center("calc")
More information about the Libreoffice-commits
mailing list