diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-02-14 12:25:47 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-02-15 08:56:42 +0100 |
commit | fc1e5bf5c1c75acd6bb8f62b9363aa1a30b9acd6 (patch) | |
tree | da35b3afdc90d1bfb3971d62e140cd0876dc6921 /sc/qa/uitest/calc_tests9 | |
parent | 9e40fc8c9458b937200ea56c96b89113c74b67f5 (diff) |
tdf#159707: sc: Add UItest
I tried to create this test as a Cppunittest but it fails with
Run: 1 Failure total: 2 Failures: 1 Errors: 1
warn:vcl:428912:428912:vcl/source/app/svmain.cxx:494: DeInitVCL: some top Windows are still alive
text = "" type = "14FloatingWindow", ptr = 0x5608715e49e0
text = "tdf159707.xls (read-only) — LibreOfficeDev Calc" type = "10WorkWindow", ptr = 0x5608709ab420
Change-Id: I1b9e16d57050fe07f74c632d441e3a06f49e9438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163363
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/uitest/calc_tests9')
-rw-r--r-- | sc/qa/uitest/calc_tests9/tdf159707.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sc/qa/uitest/calc_tests9/tdf159707.py b/sc/qa/uitest/calc_tests9/tdf159707.py new file mode 100644 index 000000000000..1e7b240f4b56 --- /dev/null +++ b/sc/qa/uitest/calc_tests9/tdf159707.py @@ -0,0 +1,33 @@ +# -*- 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_url_for_data_file + +from libreoffice.uno.propertyvalue import mkPropertyValues +from com.sun.star.beans import PropertyValue + +class tdf159707(UITestCase): + + def test_tdf159707(self): + + with self.ui_test.load_file(get_url_for_data_file("tdf159707.xls")) as document: + + self.assertFalse(document.isReadonly()) + + # Without the fix in place, this test would have crashed here + self.xUITest.executeCommand(".uno:EditDoc") + + document = self.ui_test.get_component() + self.assertTrue(document.isReadonly()) + + self.xUITest.executeCommand(".uno:EditDoc") + + self.assertFalse(document.isReadonly()) + +# vim: set shiftwidth=4 softtabstop=4 expandtab: |