sc/qa/uitest/inputLine/tdf67346.py      |   50 -----------
 sw/qa/uitest/writer_tests7/tdf150443.py |   46 ----------
 sw/qa/uitest/writer_tests7/tdf90401.py  |  139 --------------------------------
 3 files changed, 235 deletions(-)

New commits:
commit 3c2c10f085eef193d9a5417576d61bb76cea0585
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Tue Mar 12 15:14:52 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sat Mar 30 00:38:32 2024 +0100

    Remove known-problematic tests
    
    For unclear reasons:
    
    1  UITest_writer_tests7 kept hanging with python.bin at
    
    > Traceback (most recent call first):
    >   <built-in method sleep of module object at remote 0x7fdddbf1e9a0>
    >   File "/home/libo/src/core/uitest/uitest/test.py", line 144, in 
execute_dialog_through_command
    >     time.sleep(DEFAULT_SLEEP)
    >   <built-in method next of module object at remote 0x7fdddbfaa310>
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/contextlib.py", line 113, 
in __enter__
    >     return next(self.gen)
    >   File "/home/libo/src/core/uitest/uitest/test.py", line 148, in 
execute_modeless_dialog_through_command
    >     with self.execute_dialog_through_command(command, printNames, 
close_button, "ModelessDialogVisible") as xDialog:
    >   <built-in method next of module object at remote 0x7fdddbfaa310>
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/contextlib.py", line 113, 
in __enter__
    >     return next(self.gen)
    >   File "/home/libo/src/core/sw/qa/uitest/writer_tests7/tdf90401.py", line 
131, in test_tdf142902_remove_personal_info_in_DOCX
    >     with 
self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges',
 close_button="close") as xTrackDlg:
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
633, in _callTestMethod
    >     method()
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
1700, in run
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/case.py", line 
736, in __call__
    >     return self.run(*args, **kwds)
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/suite.py", line 
378, in run
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/suite.py", line 
84, in __call__
    >     return self.run(*args, **kwds)
    >   File 
"/mnt/builddir/instdir/program/python-core-3.8.18/lib/unittest/runner.py", line 
432, in run
    >   File "/home/libo/src/core/uitest/test_main.py", line 138, in <module>
    >     result = unittest.TextTestRunner(stream=sys.stdout, 
verbosity=2).run(test_suite)
    
    and soffice.bin idling in the main thread.
    
    2  With (1) out of the way, UITest_writer_tests7 kept failing with
    
    > ======================================================================
    > ERROR: test_tdf150443 (tdf150443.tdf150443)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File "/home/libo/src/core/uitest/uitest/test.py", line 134, in 
execute_dialog_through_command
    >     yield xDialog
    >   File "/home/libo/src/core/uitest/uitest/test.py", line 149, in 
execute_modeless_dialog_through_command
    >     yield xDialog
    >   File "/home/libo/src/core/sw/qa/uitest/writer_tests7/tdf150443.py", 
line 33, in test_tdf150443
    >     changesList = xTrackDlg.getChild("writerchanges")
    > uno.com.sun.star.uno.RuntimeException: Could not find child with id: 
writerchanges children were                   writer_edit PageBreak PageBreak   
 ScrollBars vertical horizontal   ScrollBars vertical horizontal      TabBar  
TabBar TabBarContents  menubutton measure button button button button button 
button button button   FixedImageControl image   Deck titlebar grip addonimage 
label toolbar scrolledwindow     contents Panel titlebar addonimage expander   
toolbar contents SidebarStylesPanel grid1 fontstyletoolbox  applystyle     
style Panel titlebar addonimage expander   toolbar contents SidebarTextPanel 
grid1 font  fontnamecombobox     fontheight  fontsizecombobox     fonteffects 
ToolbarPopover container box3 defaultattr resetattr fontadjust box1 
colorbar_writer ToolbarPopover container colorbar_others ToolbarPopover 
container colorbar_background ToolbarPopover container spacingbar 
ToolbarPopover container box2 position Panel titlebar addonimage expander   
toolbar contents P
 araPropertyPanel grid1 box1 horizontalalignment writedirection 
verticalalignment numberbullet ToolbarPopover container ToolbarPopover 
container ToolbarPopover container backgroundcolor ToolbarPopover container 
separator1 box3 spacinglabel paraspacing aboveparaspacingbox 
aboveparaspacingimg  aboveparaspacing  belowparaspacingbox belowparaspacingimg  
belowparaspacing  linespacing ToolbarPopover container indentfieldbox 
indentlabel indent beforetextindentbox beforetextindentimg  beforetextindent  
aftertextindentbox aftertextindentimg  aftertextindent  firstlineindentbox 
firstlineindentimg  firstlineindent  Panel titlebar addonimage expander   
toolbar contents TableEditPanel grid1 insert_label delete_label insert delete 
select_label split_merge_label select split_merge  row_height_label 
column_width_label  rowheight   columnwidth  rowsizing columnsizing align_label 
 alignmentLB   leftspace_label rightspace_label  leftspace   rightspace   
misc_label misc ToolbarPopover container ToolbarP
 opover container          applystyle  ApplyStyleBox  applystyle     
fontnamecombobox  FontNameBox  fontnamecombobox       FontSizeBox  
fontsizecombobox           EditControl  entry       at 
/home/libo/src/core/vcl/source/uitest/uiobject.cxx:470
    
    3  UITest_inputLine often failed with
    
    > ======================================================================
    > ERROR: test_tdf67346_undo_paste_text_input_line (tdf67346.tdf67346)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File "/home/libo/src/core/uitest/uitest/test.py", line 202, in 
create_doc_in_start_center
    >     yield component
    >   File "/home/libo/src/core/sc/qa/uitest/inputLine/tdf67346.py", line 42, 
in test_tdf67346_undo_paste_text_input_line
    >     self.assertEqual(get_state_as_dict(xInputWin)["Text"], "Apple")
    >   File "/home/libo/src/core/uitest/uitest/uihelper/common.py", line 14, 
in get_state_as_dict
    >     return convert_property_values_to_dict(ui_object.getState())
    > uitest.uihelper.common.com.sun.star.lang.DisposedException: Binary URP 
bridge disposed during call at 
/home/libo/src/core/binaryurp/source/bridge.cxx:615
    
    Change-Id: Iec8afd0ce5d2903ffdab1f07c0c88cd4d9650a80
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164714
    Tested-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/sc/qa/uitest/inputLine/tdf67346.py 
b/sc/qa/uitest/inputLine/tdf67346.py
deleted file mode 100644
index cc9dc14d628c..000000000000
--- a/sc/qa/uitest/inputLine/tdf67346.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- 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
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#Bug 67346 - EDITING: Undo broken when pasting text that has been copied from 
the input line
-
-class tdf67346(UITestCase):
-
-    def test_tdf67346_undo_paste_text_input_line(self):
-        with self.ui_test.create_doc_in_start_center("calc") as document:
-            xCalcDoc = self.xUITest.getTopFocusWindow()
-            gridwin = xCalcDoc.getChild("grid_window")
-
-            enter_text_to_cell(gridwin, "A1", "Apple")
-
-            # Move focus to input window and copy the text from there
-            gridwin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+SHIFT+F2"}))
-
-            xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
-            xToolkit.processEventsToIdle()
-            xInputWin = xCalcDoc.getChild("sc_input_window")
-            self.assertEqual('true', get_state_as_dict(xInputWin)["HasFocus"])
-
-            self.xUITest.executeCommand(".uno:SelectAll")
-            self.xUITest.executeCommand(".uno:Copy")
-
-            gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A2"}))
-
-            self.xUITest.executeCommand(".uno:Paste")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
0).getString(), "Apple")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
1).getString(), "Apple")
-            self.assertEqual(get_state_as_dict(xInputWin)["Text"], "Apple")
-
-            self.xUITest.executeCommand(".uno:Undo")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
0).getString(), "Apple")
-            self.assertEqual(get_cell_by_position(document, 0, 0, 
1).getString(), "")
-            self.assertEqual(get_state_as_dict(xInputWin)["Text"], "")
-
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf150443.py 
b/sw/qa/uitest/writer_tests7/tdf150443.py
deleted file mode 100644
index fb39bd8a0375..000000000000
--- a/sw/qa/uitest/writer_tests7/tdf150443.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- 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, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf150443(UITestCase):
-
-    def test_tdf150443(self):
-        with self.ui_test.load_file(get_url_for_data_file("tdf150443.docx")):
-            xWriterDoc = self.xUITest.getTopFocusWindow()
-            xWriterEdit = xWriterDoc.getChild("writer_edit")
-            xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
-
-            # search term "Jump here!"
-            with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", 
close_button="close") as xDialog:
-                searchterm = xDialog.getChild("searchterm")
-                searchterm.executeAction("TYPE", 
mkPropertyValues({"TEXT":"Jump here!"}))
-                xsearch = xDialog.getChild("search")
-                xsearch.executeAction("CLICK", tuple())  #first search
-                xToolkit.processEventsToIdle()
-                
self.assertEqual(get_state_as_dict(xWriterEdit)["CurrentPage"], "4")
-
-            # reject the tracked table row in Manage Changes dialog window
-            with 
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges",
 close_button="close") as xTrackDlg:
-                changesList = xTrackDlg.getChild("writerchanges")
-
-                items = len(changesList.getChildren())
-
-                # select tree parent of the actual tracked row deletion in 
tree list
-                changesList.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"LEFT"}))
-                xToolkit.processEventsToIdle()
-
-                # Without the fix in place, it would have crashed here
-                xAccBtn = xTrackDlg.getChild("reject")
-                xAccBtn.executeAction("CLICK", tuple())
-                self.assertEqual(items - 1, len(changesList.getChildren()))
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py 
b/sw/qa/uitest/writer_tests7/tdf90401.py
deleted file mode 100644
index 95cc966e1dc7..000000000000
--- a/sw/qa/uitest/writer_tests7/tdf90401.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- 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 type_text
-from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from org.libreoffice.unotest import systemPathToFileUrl
-from tempfile import TemporaryDirectory
-import os.path
-#Bug 90401 - remove personal info on redlines and annotations
-
-class tdf90401(UITestCase):
-
-    def change_security_option(self, enabled):
-        with 
self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog') as 
xDialog:
-            xPages = xDialog.getChild('pages')
-            xGenEntry = xPages.getChild('0')
-            xSecurityPage = xGenEntry.getChild('6')
-            xSecurityPage.executeAction('SELECT', tuple())
-            # Click Button Options...
-            xOptions = xDialog.getChild('options')
-
-            with self.ui_test.execute_blocking_action(xOptions.executeAction, 
args=('CLICK', ()), close_button="") as dialog:
-                xRemovePersonal = dialog.getChild('removepersonal')
-                if get_state_as_dict(xRemovePersonal)['Selected'] != enabled:
-                    xRemovePersonal.executeAction('CLICK', tuple())
-                self.ui_test.wait_until_property_is_updated(xRemovePersonal, 
"Selected", enabled)
-                
self.assertEqual(get_state_as_dict(xRemovePersonal)["Selected"], enabled)
-
-                xOkBtn = dialog.getChild('ok')
-                # FIXME: we can't use close_dialog_through_button here, the 
dialog doesn't emit the
-                # event DialogClosed after closing
-                xOkBtn.executeAction('CLICK', tuple())
-
-    def test_tdf90401_remove_personal_info(self):
-        # load a test document with a tracked change, and add a comment
-
-        with TemporaryDirectory() as tempdir:
-            try:
-                self.change_security_option("true")
-
-                xFilePath = os.path.join(tempdir, 'tdf90401-tmp.fodt')
-
-                with 
self.ui_test.load_file(get_url_for_data_file('redline-autocorrect.fodt')):
-                    self.xUITest.executeCommand('.uno:SelectAll')
-                    self.xUITest.executeCommand('.uno:InsertAnnotation')
-
-                    # Save Copy as
-                    with 
self.ui_test.execute_dialog_through_command('.uno:SaveAs', close_button="open") 
as xDialog:
-                        xFileName = xDialog.getChild('file_name')
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'CTRL+A'}))
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'BACKSPACE'}))
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'TEXT': xFilePath}))
-
-                with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
writer_doc2:
-
-                    # check removed personal info on comments
-
-                    textfields = writer_doc2.getTextFields()
-                    author = ""
-                    year = -1
-                    for textfield in textfields:
-                        if 
textfield.supportsService("com.sun.star.text.TextField.Annotation"):
-                            author = textfield.Author
-                            year = textfield.Date.Year
-                    # This was 'Unknown Author'
-                    self.assertEqual(author, 'Author2')
-                    # This was 2021
-                    self.assertEqual(year, 0)
-
-                    # check removed personal info on tracked changes
-                    with 
self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges',
 close_button="close") as xTrackDlg:
-                        xTreeList = xTrackDlg.getChild('writerchanges')
-                        state = get_state_as_dict(xTreeList)
-                        # This was 'NL 11/03/2020 19:19:05     ', containing 
personal info
-                        self.assertEqual(state['SelectEntryText'], 'Author1    
01/01/1970 00:00:00     ')
-            finally:
-                self.change_security_option("false")
-
-    def test_tdf142902_remove_personal_info_in_DOCX(self):
-        # load a test document with a tracked change, and add a comment
-        with TemporaryDirectory() as tempdir:
-            try:
-                self.change_security_option("true")
-
-                xFilePath = os.path.join(tempdir, 'redline-para-join-tmp.docx')
-
-                with 
self.ui_test.load_file(get_url_for_data_file('redline-para-join.docx')):
-
-                    self.xUITest.executeCommand('.uno:SelectAll')
-                    self.xUITest.executeCommand('.uno:InsertAnnotation')
-
-                    # Save Copy as
-                    with 
self.ui_test.execute_dialog_through_command('.uno:SaveAs', close_button="") as 
xDialog:
-                        xFileName = xDialog.getChild('file_name')
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'CTRL+A'}))
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'BACKSPACE'}))
-                        xFileName.executeAction('TYPE', 
mkPropertyValues({'TEXT': xFilePath}))
-
-                        xOpen = xDialog.getChild("open")
-                        # DOCX confirmation dialog is displayed
-                        with self.ui_test.execute_dialog_through_action(xOpen, 
"CLICK", close_button="save"):
-                            pass
-
-                with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
writer_doc2:
-
-                    # check removed personal info on comments
-
-                    textfields = writer_doc2.getTextFields()
-                    author = ""
-                    year = -1
-                    for textfield in textfields:
-                        if 
textfield.supportsService("com.sun.star.text.TextField.Annotation"):
-                            author = textfield.Author
-                            year = textfield.Date.Year
-                    # This was 'Unknown Author'
-                    self.assertEqual(author, 'Author2')
-                    # This was 2021
-                    self.assertEqual(year, 0)
-
-                    # check removed personal info on tracked changes
-
-                    with 
self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges',
 close_button="close") as xTrackDlg:
-                        xTreeList = xTrackDlg.getChild('writerchanges')
-                        state = get_state_as_dict(xTreeList)
-                        # This was 'NL 11/03/2020 19:19:05     ', containing 
personal info
-                        self.assertEqual(state['SelectEntryText'], 'Author1    
01/01/1970 00:00:00     ')
-            finally:
-                self.change_security_option("false")
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:

Reply via email to