From a8d3b8985a79c216c3c132fb2e6bb0f85a27831a Mon Sep 17 00:00:00 2001 From: Andreas Heinisch Date: Thu, 5 Jan 2023 08:21:35 +0100 Subject: tdf#56973 - Copy/paste (single) sheet is checked but not enabled Enable the "copy" radio button in the move/copy sheet dialog, if there is just a single sheet in a spreadsheet document. Otherwise, users get the impression that a single sheet cannot be copied because the "copy" radio button is selected but not enabled, i.e., greyed out. Change-Id: Icf98973585491b0c8c9a74aad3900f6cc2895d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145064 Tested-by: Jenkins Reviewed-by: Andreas Heinisch --- sc/qa/uitest/calc_tests6/moveCopySheet.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'sc/qa/uitest/calc_tests6') diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py b/sc/qa/uitest/calc_tests6/moveCopySheet.py index a80b7c329173..80bd9f830a27 100644 --- a/sc/qa/uitest/calc_tests6/moveCopySheet.py +++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py @@ -63,6 +63,19 @@ class moveCopySheet(UITestCase): self.assertEqual(document.Sheets[1].Name, "Sheet1") self.assertEqual(document.Sheets[2].Name, "moveName") + # tdf#56973 - copy/paste (single) sheet is checked but not enabled + def test_tdf56973_copy_paste_inactive(self): + with self.ui_test.create_doc_in_start_center("calc"): + with self.ui_test.execute_dialog_through_command(".uno:Move") as xDialog: + # A single sheet can only be copied + xCopyButton = xDialog.getChild("copy") + self.assertEqual(get_state_as_dict(xCopyButton)["Checked"], "true") + self.assertEqual(get_state_as_dict(xCopyButton)["Enabled"], "true") + # A single sheet can not be moved + xMoveButton = xDialog.getChild("move") + self.assertEqual(get_state_as_dict(xMoveButton)["Checked"], "false") + self.assertEqual(get_state_as_dict(xMoveButton)["Enabled"], "false") + #tdf#139464 Set OK button label to selected action: Move or Copy def test_tdf139464_move_sheet(self): with self.ui_test.create_doc_in_start_center("calc"): -- cgit v1.2.3