summaryrefslogtreecommitdiff
path: root/sw/qa/uitest/navigator
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-12-16 21:30:19 -0900
committerJim Raykowski <raykowj@gmail.com>2021-12-21 06:35:56 +0100
commit64065ade86cac68b9d500f0495ffc5745a944819 (patch)
treea000c421c77ad1238dbfa596edadbbc10d46f07f /sw/qa/uitest/navigator
parentc8ac73daa670ab571c3d52541c67c28270ee6a08 (diff)
tdf#134960 List hyperlinks in order of apperance in the document
in Writer Navigator Hyperlinks content type member list Change-Id: I0473c767478b1125acbb7e1b4bda99ac22934884 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'sw/qa/uitest/navigator')
-rw-r--r--sw/qa/uitest/navigator/tdf134960.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/sw/qa/uitest/navigator/tdf134960.py b/sw/qa/uitest/navigator/tdf134960.py
new file mode 100644
index 000000000000..7d349fa03ed2
--- /dev/null
+++ b/sw/qa/uitest/navigator/tdf134960.py
@@ -0,0 +1,43 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+
+class tdf134960_hyperlinks(UITestCase):
+
+ def test_tdf134960_hyperlinks(self):
+
+ with self.ui_test.load_file(get_url_for_data_file("tdf134960.odt")) as writer_doc:
+
+ xMainWindow = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xMainWindow.getChild("writer_edit")
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+
+ xWriterEdit.executeAction("SIDEBAR", mkPropertyValues({"PANEL": "SwNavigatorPanel"}))
+
+ # wait until the navigator panel is available
+ xNavigatorPanel = self.ui_test.wait_until_child_is_available('NavigatorPanel')
+
+ xContentTree = xNavigatorPanel.getChild("contenttree")
+ xHyperlinks = xContentTree.getChild('7')
+ self.assertEqual('Hyperlinks', get_state_as_dict(xHyperlinks)['Text'])
+
+ xHyperlinks.executeAction("EXPAND", tuple())
+
+ expectedHyperlinksOrder = [1, 2, 8, 9, 7, 10, 11, 3, 12, 4, 5, 6]
+ for i in range(12):
+ self.assertEqual('Hyperlink ' + str(expectedHyperlinksOrder[i]), get_state_as_dict(xHyperlinks.getChild(str(i)))['Text'])
+
+ xHyperlinks.executeAction("COLLAPSE", tuple())
+
+ self.xUITest.executeCommand(".uno:Sidebar")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab: