summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/table/splitTable.py
diff options
context:
space:
mode:
authorChenxiong Qi <qcxhome@gmail.com>2023-12-20 20:54:05 +0800
committerHossein <hossein@libreoffice.org>2024-01-23 14:00:46 +0100
commit74de0ebb810f3e13c45f01c63067cb8de794ce3c (patch)
treeb5f069ad74d12b5ce095b4ad9159861fd1445614 /sw/qa/uitest/table/splitTable.py
parent3a20c691ab1d6a16ad0fc144926b22c098552be4 (diff)
tdf#97361 Make unittests more pythonic: XIndexAccess
Change-Id: I05ef274dd0ad5dc35b5455cfc01feabc6c0820a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161276 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sw/qa/uitest/table/splitTable.py')
-rw-r--r--sw/qa/uitest/table/splitTable.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/uitest/table/splitTable.py b/sw/qa/uitest/table/splitTable.py
index 06af8ee6c89d..b5b3c8cf4bf0 100644
--- a/sw/qa/uitest/table/splitTable.py
+++ b/sw/qa/uitest/table/splitTable.py
@@ -22,13 +22,13 @@ class splitTable(UITestCase):
copyheading = xDialog.getChild("copyheading")
copyheading.executeAction("CLICK", tuple())
- self.assertEqual(writer_doc.TextTables.getCount(), 2)
+ self.assertEqual(len(writer_doc.TextTables), 2)
tables = writer_doc.getTextTables()
self.assertEqual(len(tables[0].getRows()), 2)
self.assertEqual(len(tables[1].getRows()), 5)
#undo -> verify 1 tables
self.xUITest.executeCommand(".uno:Undo")
- self.assertEqual(writer_doc.TextTables.getCount(), 1)
+ self.assertEqual(len(writer_doc.TextTables), 1)
#dialog Split table, check Custom heading, OK -> verify 2 tables, 1st has 2 rows, second has 4 rows
with self.ui_test.load_file(get_url_for_data_file("splitTable.odt")) as writer_doc:
@@ -39,13 +39,13 @@ class splitTable(UITestCase):
customheading = xDialog.getChild("customheading")
customheading.executeAction("CLICK", tuple())
- self.assertEqual(writer_doc.TextTables.getCount(), 2)
+ self.assertEqual(len(writer_doc.TextTables), 2)
tables = writer_doc.getTextTables()
self.assertEqual(len(tables[0].getRows()), 2)
self.assertEqual(len(tables[1].getRows()), 4)
#undo -> verify 1 tables
self.xUITest.executeCommand(".uno:Undo")
- self.assertEqual(writer_doc.TextTables.getCount(), 1)
+ self.assertEqual(len(writer_doc.TextTables), 1)
#dialog Split table, check No heading, OK -> verify 2 tables, 1st has 2 rows, second has 4 rows
with self.ui_test.load_file(get_url_for_data_file("splitTable.odt")) as writer_doc:
@@ -56,13 +56,13 @@ class splitTable(UITestCase):
noheading = xDialog.getChild("noheading")
noheading.executeAction("CLICK", tuple())
- self.assertEqual(writer_doc.TextTables.getCount(), 2)
+ self.assertEqual(len(writer_doc.TextTables), 2)
tables = writer_doc.getTextTables()
self.assertEqual(len(tables[0].getRows()), 2)
self.assertEqual(len(tables[1].getRows()), 4)
#undo -> verify 1 tables
self.xUITest.executeCommand(".uno:Undo")
- self.assertEqual(writer_doc.TextTables.getCount(), 1)
+ self.assertEqual(len(writer_doc.TextTables), 1)
def test_tdf115572_remember_split_table_option(self):
with self.ui_test.load_file(get_url_for_data_file("splitTable.odt")):