diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-15 11:33:10 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-01-15 10:52:56 +0100 |
commit | 6b973753d407d66dfa5fda86547246c486ab7087 (patch) | |
tree | 72534f1829bfd5f4d7b72de7ee0368dc44b785ff /sw | |
parent | be27b6f0bb73128ad4970fc5649c93d546822a84 (diff) |
tdf#146754: consider xyz:123 as host:port when parsing URLs smart
... rather than scheme: and path.
Change-Id: I9a48310b585b8fa3e31635f877a91f1560b065f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128457
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/writer_tests3/hyperlinkdialog.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py index c20a39b48f2a..c737f33ad1b8 100644 --- a/sw/qa/uitest/writer_tests3/hyperlinkdialog.py +++ b/sw/qa/uitest/writer_tests3/hyperlinkdialog.py @@ -72,6 +72,27 @@ class HyperlinkDialog(UITestCase): self.assertEqual(get_state_as_dict(xedit)["SelectedText"], "link") + def test_insert_hyperlink_without_scheme(self): + + with self.ui_test.create_doc_in_start_center("writer"): + xMainWindow = self.xUITest.getTopFocusWindow() + + with self.ui_test.execute_dialog_through_command(".uno:HyperlinkDialog") as xDialog: + + # insert link + xtab=xDialog.getChild("tabcontrol") + select_pos(xtab, "0") + + xtarget = xDialog.getChild("target") + xtarget.executeAction("TYPE", mkPropertyValues({"TEXT": "www.libreoffice.org:80"})) + + # Check that the link is added with http scheme + xMainWindow = self.xUITest.getTopFocusWindow() + xedit = xMainWindow.getChild("writer_edit") + xedit.executeAction("SELECT", mkPropertyValues({"START_POS": "0", "END_POS": "29"})) + self.assertEqual(get_state_as_dict(xedit)["SelectedText"], "http://www.libreoffice.org:80") + + def test_tdf141166(self): # Skip this test for --with-help=html and --with-help=online, as that would fail with a # DialogNotExecutedException("did not execute a dialog for a blocking action") thrown from |