diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-04-28 11:01:34 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-05-05 15:35:22 +0200 |
commit | a86cbb0da80e0e05c041a8ddbd8e16df47638c73 (patch) | |
tree | 64b6857b97981c30b5694a4d0e8bf7a8a2040452 /sw/qa/uitest | |
parent | 2361718a34ee4ef47901846cb35eea4552bca46b (diff) |
tdf#131759 - Remember last used option in split table dialog
Change-Id: Id7aaa300babff988f0244d822860d455d57c86c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151160
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'sw/qa/uitest')
-rw-r--r-- | sw/qa/uitest/table/splitTable.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sw/qa/uitest/table/splitTable.py b/sw/qa/uitest/table/splitTable.py index 2bfc4ca476ed..0292c452b187 100644 --- a/sw/qa/uitest/table/splitTable.py +++ b/sw/qa/uitest/table/splitTable.py @@ -7,7 +7,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from uitest.framework import UITestCase -from uitest.uihelper.common import get_url_for_data_file +from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file #Writer Split Table @@ -64,4 +64,24 @@ class splitTable(UITestCase): self.xUITest.executeCommand(".uno:Undo") self.assertEqual(writer_doc.TextTables.getCount(), 1) + def test_tdf115572_remember_split_table_option(self): + with self.ui_test.load_file(get_url_for_data_file("splitTable.odt")) as writer_doc: + # Go to second row + self.xUITest.executeCommand(".uno:GoDown") + self.xUITest.executeCommand(".uno:GoDown") + + # Split table using a non default option + with self.ui_test.execute_dialog_through_command(".uno:SplitTable") as xDialog: + xRadioNoHeading = xDialog.getChild("noheading") + xRadioNoHeading.executeAction("CLICK", tuple()) + + # Reopen split table dialog and check preselection + self.xUITest.executeCommand(".uno:GoDown") + with self.ui_test.execute_dialog_through_command(".uno:SplitTable") as xDialog: + xRadioNoHeading = xDialog.getChild("noheading") + # Without the fix in place, this test would have failed with + # AssertionError: 'true' != 'false' + # i.e. the last used option in the split table dialog was not remembered + self.assertEqual("true", get_state_as_dict(xRadioNoHeading)["Checked"]) + # vim: set shiftwidth=4 softtabstop=4 expandtab: |