sw/qa/uitest/writer_tests3/hyperlinkdialog.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit e366ad0afd295b8e46d4b2b947a1dfe6278a7a34 Author: siddhisalunkhe1998 <[email protected]> AuthorDate: Mon Feb 16 04:32:30 2026 +0000 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Feb 19 21:08:35 2026 +0100 tdf#118042 Add UITest for target box in hyperlink dialog Add a test case to verify that the target window do not crash This tests the fix from https://gerrit.libreoffice.org/c/core/+/55440 Change-Id: Ibee39b19cc93cac3753a424858810c81053e2f8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199439 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py index 979ab1455c24..a443c1e2480c 100644 --- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py +++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py @@ -218,4 +218,19 @@ class HyperlinkDialog(UITestCase): xVerticalRadio.executeAction("CLICK", tuple()) self.assertEqual(get_state_as_dict(xVerticalRadio)["Checked"], "true") + def test_tdf118042_target_in_document_button(self): + # Test clicking "Target in Document" button crash + with self.ui_test.create_doc_in_start_center("writer"): + + with self.ui_test.execute_dialog_through_command(".uno:HyperlinkDialog", close_button="cancel") as xDialog: + xTab = xDialog.getChild("tabcontrol") + select_pos(xTab, "2") + self.assertEqual(get_state_as_dict(xTab)["CurrPageTitle"], "~Document") + + # Without the fix this would crash here. + xBrowseBtn = xDialog.getChild("browse") + xBrowseBtn.executeAction("CLICK", tuple()) + + self.assertEqual(get_state_as_dict(xTab)["CurrPageTitle"], "~Document") + # vim: set shiftwidth=4 softtabstop=4 expandtab:
