sw/qa/uitest/writer_tests3/tdf165815.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
New commits: commit d57c777801c25ea55150329c59910d92a39148c5 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue Mar 25 14:58:08 2025 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Mar 25 16:54:28 2025 +0100 tdf#165815: sw: Add UItest Change-Id: I6c3f2ac7b7ca6c96e2ecf83ff90a4461ea7f20e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183303 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sw/qa/uitest/writer_tests3/tdf165815.py b/sw/qa/uitest/writer_tests3/tdf165815.py new file mode 100644 index 000000000000..7228301af2f6 --- /dev/null +++ b/sw/qa/uitest/writer_tests3/tdf165815.py @@ -0,0 +1,27 @@ +# -*- 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 uitest.uihelper.common import get_state_as_dict + +class tdf165815(UITestCase): + + def test_tdf165815(self): + with self.ui_test.create_doc_in_start_center("writer"): + self.xUITest.executeCommand(".uno:ViewDataSourceBrowser") + + xWriterDoc = self.xUITest.getTopFocusWindow() + xTree = xWriterDoc.getChild("treeview") + self.assertEqual("Bibliography", get_state_as_dict(xTree.getChild(0))['Text']) + + # Without the fix in place, this test would have crashed here + self.xUITest.executeCommand(".uno:ViewDataSourceBrowser") + + self.assertTrue("treeview" not in xWriterDoc.getChildren()) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: