summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-06-24 01:53:06 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-06-24 02:40:43 +0200
commit9a89eea4c3c58d2efce8afe709c0317869839ff9 (patch)
treef235036802674593f9cf6253f2f6363664494233 /svx
parent6805efdecb240fad8c82a5c1756a2a0e92f12b7d (diff)
Revert "uitest: guard create_doc_in_start_center"
This reverts commit 374baf308979306aa35575118c40ccd7caae1e29. Many uitests are failing randomly in jenkins for no apparent reason Change-Id: I5960330fab4967518bfeea32b3b8c5f8bfbea57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117752 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/uitest/table/tablecontroller.py110
1 files changed, 56 insertions, 54 deletions
diff --git a/svx/qa/uitest/table/tablecontroller.py b/svx/qa/uitest/table/tablecontroller.py
index 3cd502f41ae7..607df44a3a4f 100644
--- a/svx/qa/uitest/table/tablecontroller.py
+++ b/svx/qa/uitest/table/tablecontroller.py
@@ -14,68 +14,70 @@ class SvxTableControllerTest(UITestCase):
def testOnFormatTable(self):
# Create an Impress document with a single table in it.
- with self.ui_test.create_doc_in_start_center("impress"):
- template = self.xUITest.getTopFocusWindow()
- self.ui_test.close_dialog_through_button(template.getChild("close"))
- self.xUITest.executeCommand(".uno:SelectAll")
- self.xUITest.executeCommand(".uno:Delete")
- self.xUITest.executeCommand(".uno:InsertTable?Columns:short=2&Rows:short=2")
+ self.ui_test.create_doc_in_start_center("impress")
+ template = self.xUITest.getTopFocusWindow()
+ self.ui_test.close_dialog_through_button(template.getChild("close"))
+ self.xUITest.executeCommand(".uno:SelectAll")
+ self.xUITest.executeCommand(".uno:Delete")
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=2&Rows:short=2")
- # Enable shadow.
- self.ui_test.execute_dialog_through_command(".uno:TableDialog")
- tableDialog = self.xUITest.getTopFocusWindow()
- tabs = tableDialog.getChild("tabcontrol")
- # Select "shadow".
- select_pos(tabs, "4")
- shadowCheckbox = tableDialog.getChild("TSB_SHOW_SHADOW")
- shadowCheckbox.executeAction("CLICK", tuple())
- self.ui_test.close_dialog_through_button(tableDialog.getChild("ok"))
+ # Enable shadow.
+ self.ui_test.execute_dialog_through_command(".uno:TableDialog")
+ tableDialog = self.xUITest.getTopFocusWindow()
+ tabs = tableDialog.getChild("tabcontrol")
+ # Select "shadow".
+ select_pos(tabs, "4")
+ shadowCheckbox = tableDialog.getChild("TSB_SHOW_SHADOW")
+ shadowCheckbox.executeAction("CLICK", tuple())
+ self.ui_test.close_dialog_through_button(tableDialog.getChild("ok"))
- # Check if the shadow was enabled.
- component = self.ui_test.get_component()
- drawPage = component.getDrawPages().getByIndex(0)
- shape = drawPage.getByIndex(0)
- # Without the accompanying fix in place, this test would have failed with:
- # AssertionError: False != True
- # i.e. the table still had no shadow.
- self.assertEqual(shape.Shadow, True)
+ # Check if the shadow was enabled.
+ component = self.ui_test.get_component()
+ drawPage = component.getDrawPages().getByIndex(0)
+ shape = drawPage.getByIndex(0)
+ # Without the accompanying fix in place, this test would have failed with:
+ # AssertionError: False != True
+ # i.e. the table still had no shadow.
+ self.assertEqual(shape.Shadow, True)
- # Close the document.
+ # Close the document.
+ self.ui_test.close_doc()
def testUndoCrash(self):
# Given an Impress document with a single table in it:
- with self.ui_test.create_doc_in_start_center("impress"):
- template = self.xUITest.getTopFocusWindow()
- self.ui_test.close_dialog_through_button(template.getChild("close"))
- self.xUITest.executeCommand(".uno:SelectAll")
- self.xUITest.executeCommand(".uno:Delete")
- self.xUITest.executeCommand(".uno:InsertTable?Columns:short=3&Rows:short=3")
- self.xUITest.executeCommand(".uno:SelectAll")
+ self.ui_test.create_doc_in_start_center("impress")
+ template = self.xUITest.getTopFocusWindow()
+ self.ui_test.close_dialog_through_button(template.getChild("close"))
+ self.xUITest.executeCommand(".uno:SelectAll")
+ self.xUITest.executeCommand(".uno:Delete")
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=3&Rows:short=3")
+ self.xUITest.executeCommand(".uno:SelectAll")
- # When enabling shadow on the shape while text edit is active:
- doc = self.xUITest.getTopFocusWindow()
- impress = doc.getChild("impress_win")
- impress.executeAction("TYPE", mkPropertyValues({"TEXT": "A1"}))
- for i in range(6):
- impress.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+TAB"}))
- impress.executeAction("TYPE", mkPropertyValues({"TEXT": "A3"}))
- self.xUITest.executeCommand(".uno:SelectAll")
- self.ui_test.execute_dialog_through_command(".uno:TableDialog")
- tableDialog = self.xUITest.getTopFocusWindow()
- tabs = tableDialog.getChild("tabcontrol")
- # Select "shadow".
- select_pos(tabs, "4")
- shadowCheckbox = tableDialog.getChild("TSB_SHOW_SHADOW")
- shadowCheckbox.executeAction("CLICK", tuple())
- self.ui_test.close_dialog_through_button(tableDialog.getChild("ok"))
+ # When enabling shadow on the shape while text edit is active:
+ doc = self.xUITest.getTopFocusWindow()
+ impress = doc.getChild("impress_win")
+ impress.executeAction("TYPE", mkPropertyValues({"TEXT": "A1"}))
+ for i in range(6):
+ impress.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+TAB"}))
+ impress.executeAction("TYPE", mkPropertyValues({"TEXT": "A3"}))
+ self.xUITest.executeCommand(".uno:SelectAll")
+ self.ui_test.execute_dialog_through_command(".uno:TableDialog")
+ tableDialog = self.xUITest.getTopFocusWindow()
+ tabs = tableDialog.getChild("tabcontrol")
+ # Select "shadow".
+ select_pos(tabs, "4")
+ shadowCheckbox = tableDialog.getChild("TSB_SHOW_SHADOW")
+ shadowCheckbox.executeAction("CLICK", tuple())
+ self.ui_test.close_dialog_through_button(tableDialog.getChild("ok"))
- # Then make sure we don't crash:
- # Without the accompanying fix in place, this test would have failed crashed due to a
- # use-after-free: text edit ended but an undo action of the text edit remained on the undo
- # stack.
- for i in range(2):
- self.xUITest.executeCommand(".uno:Undo")
+ # Then make sure we don't crash:
+ # Without the accompanying fix in place, this test would have failed crashed due to a
+ # use-after-free: text edit ended but an undo action of the text edit remained on the undo
+ # stack.
+ for i in range(2):
+ self.xUITest.executeCommand(".uno:Undo")
- # Close the document.
+ # Close the document.
+ self.ui_test.close_doc()
# vim: set shiftwidth=4 softtabstop=4 expandtab: