diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-29 11:44:54 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-29 15:10:03 +0200 |
commit | 5b8a13486d3809066e663549879c209992d5479d (patch) | |
tree | 8c2701d8827e24eb7f36eb707c20905c41653485 /sd | |
parent | d0172f785a5973dbe5ea585eabfa7a4671b38775 (diff) |
uitest: combine execute_dialog_through_command methods
Change-Id: Iaa03d37a9ac3862b8cb08a81e37a611632433880
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118077
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/uitest/impress_tests/autocorrectOptions.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/customSlideShow.py | 4 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/masterElements.py | 4 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/masterSlides.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/renameSlide.py | 6 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/slideShowSettings.py | 4 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf125449.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf134734.py | 6 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf137729.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf139511.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf141297.py | 6 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf91762.py | 2 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/textColumnsDialog.py | 4 |
13 files changed, 23 insertions, 23 deletions
diff --git a/sd/qa/uitest/impress_tests/autocorrectOptions.py b/sd/qa/uitest/impress_tests/autocorrectOptions.py index d4bc3c5392a9..a8135bca4831 100644 --- a/sd/qa/uitest/impress_tests/autocorrectOptions.py +++ b/sd/qa/uitest/impress_tests/autocorrectOptions.py @@ -20,7 +20,7 @@ class autocorrectOptions(UITestCase): self.ui_test.close_dialog_through_button(xCancelBtn) document = self.ui_test.get_component() - with self.ui_test.execute_dialog_through_command_guarded(".uno:AutoCorrectDlg", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", close_button="cancel") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "0") #tab replace origtext = xDialog.getChild("origtext") diff --git a/sd/qa/uitest/impress_tests/customSlideShow.py b/sd/qa/uitest/impress_tests/customSlideShow.py index 688fb01f5685..6af8ff60a20f 100644 --- a/sd/qa/uitest/impress_tests/customSlideShow.py +++ b/sd/qa/uitest/impress_tests/customSlideShow.py @@ -14,7 +14,7 @@ class customSlideShow(UITestCase): TemplateDialog = self.xUITest.getTopFocusWindow() cancel = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(cancel) - with self.ui_test.execute_dialog_through_command_guarded(".uno:CustomShowDialog") as CustomSlideShows: + with self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") as CustomSlideShows: new = CustomSlideShows.getChild("new") with self.ui_test.execute_blocking_action(new.executeAction, args=('CLICK', ())) as DefineCustomSlideShow: @@ -29,7 +29,7 @@ class customSlideShow(UITestCase): add.executeAction("CLICK",tuple()) #verify - with self.ui_test.execute_dialog_through_command_guarded(".uno:CustomShowDialog") as CustomSlideShows: + with self.ui_test.execute_dialog_through_command(".uno:CustomShowDialog") as CustomSlideShows: edit = CustomSlideShows.getChild("edit") customshowlist = CustomSlideShows.getChild("customshowlist") self.assertEqual(get_state_as_dict(customshowlist)["SelectionCount"], "1") diff --git a/sd/qa/uitest/impress_tests/masterElements.py b/sd/qa/uitest/impress_tests/masterElements.py index 6dedb805efa2..3ed174c47f20 100644 --- a/sd/qa/uitest/impress_tests/masterElements.py +++ b/sd/qa/uitest/impress_tests/masterElements.py @@ -20,7 +20,7 @@ class masterElements(UITestCase): self.ui_test.close_dialog_through_button(xCancelBtn) document = self.ui_test.get_component() - with self.ui_test.execute_dialog_through_command_guarded(".uno:MasterLayouts") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:MasterLayouts") as xDialog: xpagenumber = xDialog.getChild("pagenumber") xfooter = xDialog.getChild("footer") @@ -31,7 +31,7 @@ class masterElements(UITestCase): #verify - with self.ui_test.execute_dialog_through_command_guarded(".uno:MasterLayouts") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:MasterLayouts") as xDialog: xfooter = xDialog.getChild("footer") datetime = xDialog.getChild("datetime") xpagenumber = xDialog.getChild("pagenumber") diff --git a/sd/qa/uitest/impress_tests/masterSlides.py b/sd/qa/uitest/impress_tests/masterSlides.py index 3bea28a90b6e..da4e3e949f4b 100644 --- a/sd/qa/uitest/impress_tests/masterSlides.py +++ b/sd/qa/uitest/impress_tests/masterSlides.py @@ -31,7 +31,7 @@ class masterSlides(UITestCase): xCloseMasterButton = xImpress.getChild("closemasterslide") xCloseMasterButton.executeAction("CLICK", tuple()) - with self.ui_test.execute_dialog_through_command_guarded(".uno:PresentationLayout") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:PresentationLayout") as xDialog: xSelect = xDialog.getChild('select') xSelect.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RIGHT"})) diff --git a/sd/qa/uitest/impress_tests/renameSlide.py b/sd/qa/uitest/impress_tests/renameSlide.py index afb053e44a24..bd082aa91055 100644 --- a/sd/qa/uitest/impress_tests/renameSlide.py +++ b/sd/qa/uitest/impress_tests/renameSlide.py @@ -16,21 +16,21 @@ class renameSlide(UITestCase): xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - with self.ui_test.execute_dialog_through_command_guarded(".uno:RenamePage") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:RenamePage") as xDialog: name_entry = xDialog.getChild("name_entry") name_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"NewName"})) #verify - with self.ui_test.execute_dialog_through_command_guarded(".uno:RenamePage") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:RenamePage") as xDialog: name_entry = xDialog.getChild("name_entry") self.assertEqual(get_state_as_dict(name_entry)["Text"], "NewName") self.xUITest.executeCommand(".uno:InsertPage") - with self.ui_test.execute_dialog_through_command_guarded(".uno:RenamePage", close_button="cancel") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:RenamePage", close_button="cancel") as xDialog: xOKBtn = xDialog.getChild("ok") self.assertEqual("true", get_state_as_dict(xOKBtn)['Enabled']) diff --git a/sd/qa/uitest/impress_tests/slideShowSettings.py b/sd/qa/uitest/impress_tests/slideShowSettings.py index 8d064c895b6b..73f840beabbd 100644 --- a/sd/qa/uitest/impress_tests/slideShowSettings.py +++ b/sd/qa/uitest/impress_tests/slideShowSettings.py @@ -14,7 +14,7 @@ class slideShowSettings(UITestCase): cancel = TemplateDialog.getChild("close") self.ui_test.close_dialog_through_button(cancel) self.xUITest.executeCommand(".uno:InsertPage") - with self.ui_test.execute_dialog_through_command_guarded(".uno:PresentationDialog") as PresentationDialog: + with self.ui_test.execute_dialog_through_command(".uno:PresentationDialog") as PresentationDialog: xfrom = PresentationDialog.getChild("from") xfrom.executeAction("CLICK",tuple()) @@ -34,7 +34,7 @@ class slideShowSettings(UITestCase): changeslidesbyclick.executeAction("CLICK",tuple()) #verify - with self.ui_test.execute_dialog_through_command_guarded(".uno:PresentationDialog", close_button="cancel") as PresentationDialog: + with self.ui_test.execute_dialog_through_command(".uno:PresentationDialog", close_button="cancel") as PresentationDialog: xfrom = PresentationDialog.getChild("from") self.assertEqual(get_state_as_dict(xfrom)["Checked"], "true") from_cb = PresentationDialog.getChild("from_cb") diff --git a/sd/qa/uitest/impress_tests/tdf125449.py b/sd/qa/uitest/impress_tests/tdf125449.py index 206a9a88eae6..2ec26db5b907 100644 --- a/sd/qa/uitest/impress_tests/tdf125449.py +++ b/sd/qa/uitest/impress_tests/tdf125449.py @@ -18,7 +18,7 @@ class tdf125449(UITestCase): xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - with self.ui_test.execute_dialog_through_command_guarded(".uno:PageSetup") as xPageSetupDlg: + with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as xPageSetupDlg: tabcontrol = xPageSetupDlg.getChild("tabcontrol") select_pos(tabcontrol, "1") diff --git a/sd/qa/uitest/impress_tests/tdf134734.py b/sd/qa/uitest/impress_tests/tdf134734.py index b5db370c7f76..0fc0bf85fd7b 100644 --- a/sd/qa/uitest/impress_tests/tdf134734.py +++ b/sd/qa/uitest/impress_tests/tdf134734.py @@ -20,7 +20,7 @@ class TestClass(UITestCase): self.ui_test.close_dialog_through_button(close) # set margins and fill color - with self.ui_test.execute_dialog_through_command_guarded(".uno:PageSetup") as DrawPageDialog: + with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: xTabs = DrawPageDialog.getChild("tabcontrol") select_pos(xTabs, "0") checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize") @@ -56,7 +56,7 @@ class TestClass(UITestCase): document.MasterPages.getByIndex(0).BackgroundFullSize, False) # check it - with self.ui_test.execute_dialog_through_command_guarded(".uno:PageSetup") as DrawPageDialog: + with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: xTabs = DrawPageDialog.getChild("tabcontrol") select_pos(xTabs, "0") checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize") @@ -77,7 +77,7 @@ class TestClass(UITestCase): document.MasterPages.getByIndex(0).BackgroundFullSize, True) # uncheck it again - with self.ui_test.execute_dialog_through_command_guarded(".uno:PageSetup") as DrawPageDialog: + with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: xTabs = DrawPageDialog.getChild("tabcontrol") select_pos(xTabs, "0") checkBackgroundFullSize = DrawPageDialog.getChild("checkBackgroundFullSize") diff --git a/sd/qa/uitest/impress_tests/tdf137729.py b/sd/qa/uitest/impress_tests/tdf137729.py index 49b96d042f2e..3d08734eed5c 100644 --- a/sd/qa/uitest/impress_tests/tdf137729.py +++ b/sd/qa/uitest/impress_tests/tdf137729.py @@ -19,7 +19,7 @@ class tdf137729(UITestCase): xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - with self.ui_test.execute_dialog_through_command_guarded(".uno:PageSetup") as xPageSetupDlg: + with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as xPageSetupDlg: tabcontrol = xPageSetupDlg.getChild("tabcontrol") select_pos(tabcontrol, "1") diff --git a/sd/qa/uitest/impress_tests/tdf139511.py b/sd/qa/uitest/impress_tests/tdf139511.py index bc12360eed29..f02ba76b1c40 100644 --- a/sd/qa/uitest/impress_tests/tdf139511.py +++ b/sd/qa/uitest/impress_tests/tdf139511.py @@ -25,7 +25,7 @@ class tdf139511(UITestCase): self.assertEqual(8004, document.DrawPages[0].getByIndex(2).BoundRect.Height) self.assertEqual(14104, document.DrawPages[0].getByIndex(2).BoundRect.Width) - with self.ui_test.execute_dialog_through_command_guarded(".uno:TransformDialog") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:TransformDialog") as xDialog: xWidth = xDialog.getChild('MTR_FLD_WIDTH') diff --git a/sd/qa/uitest/impress_tests/tdf141297.py b/sd/qa/uitest/impress_tests/tdf141297.py index da15efda1dc9..dd452699364e 100644 --- a/sd/qa/uitest/impress_tests/tdf141297.py +++ b/sd/qa/uitest/impress_tests/tdf141297.py @@ -21,7 +21,7 @@ class tdf141297(UITestCase): xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - with self.ui_test.execute_dialog_through_command_guarded(".uno:InsertGraphic", close_button="open") as xOpenDialog: + with self.ui_test.execute_dialog_through_command(".uno:InsertGraphic", close_button="open") as xOpenDialog: xFileName = xOpenDialog.getChild("file_name") @@ -38,7 +38,7 @@ class tdf141297(UITestCase): xOK = xWarnDialog.getChild("ok") self.ui_test.close_dialog_through_button(xOK) - with self.ui_test.execute_dialog_through_command_guarded(".uno:ManageLinks", close_button="close") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:ManageLinks", close_button="close") as xDialog: sLinks = "TB_LINKS" @@ -61,7 +61,7 @@ class tdf141297(UITestCase): xFilePath = os.path.join(tempdir, "tdf141297-tmp.odp") # Save Copy as - with self.ui_test.execute_dialog_through_command_guarded(".uno:SaveAs", close_button="open") as xDialog: + 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"})) diff --git a/sd/qa/uitest/impress_tests/tdf91762.py b/sd/qa/uitest/impress_tests/tdf91762.py index 7f732c97f187..897af11908cc 100644 --- a/sd/qa/uitest/impress_tests/tdf91762.py +++ b/sd/qa/uitest/impress_tests/tdf91762.py @@ -18,7 +18,7 @@ class tdf91762(UITestCase): self.xUITest.executeCommand(".uno:AssignLayout?WhatLayout:long=1") - with self.ui_test.execute_dialog_through_command_guarded(".uno:InsertTable") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:InsertTable") as xDialog: self.assertEqual('5', get_state_as_dict(xDialog.getChild('columns'))['Text']) self.assertEqual('2', get_state_as_dict(xDialog.getChild('rows'))['Text']) diff --git a/sd/qa/uitest/impress_tests/textColumnsDialog.py b/sd/qa/uitest/impress_tests/textColumnsDialog.py index d2119dbb37ce..7a19f0258327 100644 --- a/sd/qa/uitest/impress_tests/textColumnsDialog.py +++ b/sd/qa/uitest/impress_tests/textColumnsDialog.py @@ -31,7 +31,7 @@ class textColumnsDialog(UITestCase): self.assertEqual("com.sun.star.drawing.SvxShapeCollection", document.CurrentSelection.getImplementationName()) # Test defaults and set some values - with self.ui_test.execute_dialog_through_command_guarded(".uno:TextAttributes") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "2") colNumber = xDialog.getChild('FLD_COL_NUMBER') @@ -42,7 +42,7 @@ class textColumnsDialog(UITestCase): colSpacing.executeAction("SET", mkPropertyValues({"TEXT": "1.5"})) # Test that settings persist - with self.ui_test.execute_dialog_through_command_guarded(".uno:TextAttributes") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:TextAttributes") as xDialog: xTabs = xDialog.getChild("tabcontrol") select_pos(xTabs, "2") colNumber = xDialog.getChild('FLD_COL_NUMBER') |