diff options
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/uitest/findReplace/findReplace.py | 32 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/exportToPDF.py | 8 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/insertSlide.py | 12 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf134734.py | 54 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf137729.py | 10 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests/tdf155863.py | 4 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf125449.py | 18 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf127900.py | 8 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf133713.py | 4 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf139511.py | 8 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf146019.py | 3 | ||||
-rw-r--r-- | sd/qa/uitest/impress_tests2/tdf91762.py | 12 |
12 files changed, 77 insertions, 96 deletions
diff --git a/sd/qa/uitest/findReplace/findReplace.py b/sd/qa/uitest/findReplace/findReplace.py index 130765a865bb..055a59f0d61f 100644 --- a/sd/qa/uitest/findReplace/findReplace.py +++ b/sd/qa/uitest/findReplace/findReplace.py @@ -17,10 +17,10 @@ class findReplace(UITestCase): # check current slide is 1 self.assertEqual(impress_doc.CurrentController.getCurrentPage().Number, 1) - self.assertEqual("First first first", impress_doc.DrawPages[0].getByIndex(1).String) - self.assertEqual("second", impress_doc.DrawPages[1].getByIndex(1).String) - self.assertEqual("Third", impress_doc.DrawPages[2].getByIndex(1).String) - self.assertEqual("Text size 16", impress_doc.DrawPages[3].getByIndex(1).String) + self.assertEqual("First first first", impress_doc.DrawPages[0][1].String) + self.assertEqual("second", impress_doc.DrawPages[1][1].String) + self.assertEqual("Third", impress_doc.DrawPages[2][1].String) + self.assertEqual("Text size 16", impress_doc.DrawPages[3][1].String) # search for string "second" with self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", close_button="close") as xDialog: @@ -41,10 +41,10 @@ class findReplace(UITestCase): #verify we moved to slide 3 self.assertEqual(impress_doc.CurrentController.getCurrentPage().Number, 3) #3rd slide - self.assertEqual("First first first", impress_doc.DrawPages[0].getByIndex(1).String) - self.assertEqual("second", impress_doc.DrawPages[1].getByIndex(1).String) - self.assertEqual("Third", impress_doc.DrawPages[2].getByIndex(1).String) - self.assertEqual("Text size 16", impress_doc.DrawPages[3].getByIndex(1).String) + self.assertEqual("First first first", impress_doc.DrawPages[0][1].String) + self.assertEqual("second", impress_doc.DrawPages[1][1].String) + self.assertEqual("Third", impress_doc.DrawPages[2][1].String) + self.assertEqual("Text size 16", impress_doc.DrawPages[3][1].String) # now open dialog and verify find="third" (remember last value); # replace value with "First" (click match case) with word "Replace" @@ -80,11 +80,11 @@ class findReplace(UITestCase): matchcase = xDialog.getChild("matchcase") matchcase.executeAction("CLICK", tuple()) # uncheck match case - self.assertEqual("Replace first first", impress_doc.DrawPages[0].getByIndex(1).String) - self.assertEqual("second", impress_doc.DrawPages[1].getByIndex(1).String) + self.assertEqual("Replace first first", impress_doc.DrawPages[0][1].String) + self.assertEqual("second", impress_doc.DrawPages[1][1].String) # tdf#145868 - Third was search for earlier, but never should have been replaced - self.assertEqual("Third", impress_doc.DrawPages[2].getByIndex(1).String) - self.assertEqual("Text size 16", impress_doc.DrawPages[3].getByIndex(1).String) + self.assertEqual("Third", impress_doc.DrawPages[2][1].String) + self.assertEqual("Text size 16", impress_doc.DrawPages[3][1].String) replaceterm = xDialog.getChild("replaceterm") replaceterm.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) @@ -97,9 +97,9 @@ class findReplace(UITestCase): # tdf#122788: Without the fix in place, this test would have failed with # AssertionError: 'Replace aaa aaa' != 'Replace first first' - self.assertEqual("Replace aaa aaa", impress_doc.DrawPages[0].getByIndex(1).String) - self.assertEqual("second", impress_doc.DrawPages[1].getByIndex(1).String) - self.assertEqual("Third", impress_doc.DrawPages[2].getByIndex(1).String) - self.assertEqual("Text size 16", impress_doc.DrawPages[3].getByIndex(1).String) + self.assertEqual("Replace aaa aaa", impress_doc.DrawPages[0][1].String) + self.assertEqual("second", impress_doc.DrawPages[1][1].String) + self.assertEqual("Third", impress_doc.DrawPages[2][1].String) + self.assertEqual("Text size 16", impress_doc.DrawPages[3][1].String) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py b/sd/qa/uitest/impress_tests/exportToPDF.py index e654f608947b..8e7466823b8e 100644 --- a/sd/qa/uitest/impress_tests/exportToPDF.py +++ b/sd/qa/uitest/impress_tests/exportToPDF.py @@ -74,9 +74,9 @@ class exportToPDF(UITestCase): with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as document: - self.assertEqual("", document.DrawPages[0].getByIndex(0).String) - self.assertEqual(" ", document.DrawPages[0].getByIndex(1).String) - self.assertEqual(" ", document.DrawPages[0].getByIndex(2).String) - self.assertEqual("Hello World", document.DrawPages[0].getByIndex(3).String) + self.assertEqual("", document.DrawPages[0][0].String) + self.assertEqual(" ", document.DrawPages[0][1].String) + self.assertEqual(" ", document.DrawPages[0][2].String) + self.assertEqual("Hello World", document.DrawPages[0][3].String) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests/insertSlide.py b/sd/qa/uitest/impress_tests/insertSlide.py index 83f33c59782c..b1c6139a645d 100644 --- a/sd/qa/uitest/impress_tests/insertSlide.py +++ b/sd/qa/uitest/impress_tests/insertSlide.py @@ -18,33 +18,33 @@ class insertSlide(UITestCase): xTemplateDlg = self.xUITest.getTopFocusWindow() xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - self.assertEqual(document.DrawPages.getCount(), 1) #nr. of pages + self.assertEqual(len(document.DrawPages), 1) #nr. of pages self.xUITest.executeCommand(".uno:InsertPage") #verify - self.assertEqual(document.DrawPages.getCount(), 2) #nr. of pages + self.assertEqual(len(document.DrawPages), 2) #nr. of pages #undo self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(document.DrawPages.getCount(), 1) #nr. of pages + self.assertEqual(len(document.DrawPages), 1) #nr. of pages def test_tdf85360_insert_4th_slide(self): with self.ui_test.create_doc_in_start_center("impress") as document: xTemplateDlg = self.xUITest.getTopFocusWindow() xCancelBtn = xTemplateDlg.getChild("close") self.ui_test.close_dialog_through_button(xCancelBtn) - self.assertEqual(document.DrawPages.getCount(), 1) #nr. of pages + self.assertEqual(len(document.DrawPages), 1) #nr. of pages self.xUITest.executeCommand(".uno:InsertPage") self.xUITest.executeCommand(".uno:InsertPage") self.xUITest.executeCommand(".uno:InsertPage") self.xUITest.executeCommand(".uno:InsertPage") #verify - self.assertEqual(document.DrawPages.getCount(), 5) #nr. of pages + self.assertEqual(len(document.DrawPages), 5) #nr. of pages #undo self.xUITest.executeCommand(".uno:Undo") self.xUITest.executeCommand(".uno:Undo") self.xUITest.executeCommand(".uno:Undo") self.xUITest.executeCommand(".uno:Undo") - self.assertEqual(document.DrawPages.getCount(), 1) #nr. of pages + self.assertEqual(len(document.DrawPages), 1) #nr. of pages # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests/tdf134734.py b/sd/qa/uitest/impress_tests/tdf134734.py index 07985e8f6b43..cd8f9c8d5dd6 100644 --- a/sd/qa/uitest/impress_tests/tdf134734.py +++ b/sd/qa/uitest/impress_tests/tdf134734.py @@ -42,18 +42,12 @@ class TestClass(UITestCase): btncolor = DrawPageDialog.getChild("btncolor") btncolor.executeAction("CLICK",tuple()) - self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillStyle, SOLID) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderLeft, 1016) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderRight, 762) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderTop, 508) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderBottom, 254) - self.assertEqual( - document.MasterPages.getByIndex(0).BackgroundFullSize, False) + self.assertEqual(document.DrawPages[0].Background.FillStyle, SOLID) + self.assertEqual(document.DrawPages[0].BorderLeft, 1016) + self.assertEqual(document.DrawPages[0].BorderRight, 762) + self.assertEqual(document.DrawPages[0].BorderTop, 508) + self.assertEqual(document.DrawPages[0].BorderBottom, 254) + self.assertEqual(document.MasterPages[0].BackgroundFullSize, False) # check it with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: @@ -63,18 +57,12 @@ class TestClass(UITestCase): self.assertEqual(get_state_as_dict(checkBackgroundFullSize)["Selected"], "false") checkBackgroundFullSize.executeAction("CLICK",tuple()) - self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillStyle, SOLID) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderLeft, 1016) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderRight, 762) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderTop, 508) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderBottom, 254) - self.assertEqual( - document.MasterPages.getByIndex(0).BackgroundFullSize, True) + self.assertEqual(document.DrawPages[0].Background.FillStyle, SOLID) + self.assertEqual(document.DrawPages[0].BorderLeft, 1016) + self.assertEqual(document.DrawPages[0].BorderRight, 762) + self.assertEqual(document.DrawPages[0].BorderTop, 508) + self.assertEqual(document.DrawPages[0].BorderBottom, 254) + self.assertEqual(document.MasterPages[0].BackgroundFullSize, True) # uncheck it again with self.ui_test.execute_dialog_through_command(".uno:PageSetup") as DrawPageDialog: @@ -84,18 +72,12 @@ class TestClass(UITestCase): self.assertEqual(get_state_as_dict(checkBackgroundFullSize)["Selected"], "true") checkBackgroundFullSize.executeAction("CLICK",tuple()) - self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillStyle, SOLID) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderLeft, 1016) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderRight, 762) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderTop, 508) - self.assertEqual( - document.DrawPages.getByIndex(0).BorderBottom, 254) - self.assertEqual( - document.MasterPages.getByIndex(0).BackgroundFullSize, False) + self.assertEqual(document.DrawPages[0].Background.FillStyle, SOLID) + self.assertEqual(document.DrawPages[0].BorderLeft, 1016) + self.assertEqual(document.DrawPages[0].BorderRight, 762) + self.assertEqual(document.DrawPages[0].BorderTop, 508) + self.assertEqual(document.DrawPages[0].BorderBottom, 254) + self.assertEqual(document.MasterPages[0].BackgroundFullSize, False) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests/tdf137729.py b/sd/qa/uitest/impress_tests/tdf137729.py index 4362b056e156..1769b0510452 100644 --- a/sd/qa/uitest/impress_tests/tdf137729.py +++ b/sd/qa/uitest/impress_tests/tdf137729.py @@ -34,18 +34,18 @@ class tdf137729(UITestCase): self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillHatch.Style, SINGLE ) + document.DrawPages[0].Background.FillHatch.Style, SINGLE ) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillHatch.Color, 0) + document.DrawPages[0].Background.FillHatch.Color, 0) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillHatch.Distance, 152) + document.DrawPages[0].Background.FillHatch.Distance, 152) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillHatch.Angle, 0) + document.DrawPages[0].Background.FillHatch.Angle, 0) # Without the patch in place, this test would have failed with # AssertionError: '' != 'hatch' self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillHatchName, 'hatch') + document.DrawPages[0].Background.FillHatchName, 'hatch') # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests/tdf155863.py b/sd/qa/uitest/impress_tests/tdf155863.py index bce8936a3d40..79fd3be9750e 100644 --- a/sd/qa/uitest/impress_tests/tdf155863.py +++ b/sd/qa/uitest/impress_tests/tdf155863.py @@ -28,7 +28,7 @@ class tdf155863(UITestCase): self.xUITest.executeCommand(".uno:OriginalSize") # tdf#155863: Without the fix in place, the image will be distorted due to the wrong size. - self.assertEqual(3597, document.DrawPages[0].getByIndex(0).Size.Width) - self.assertEqual(3998, document.DrawPages[0].getByIndex(0).Size.Height) + self.assertEqual(3597, document.DrawPages[0][0].Size.Width) + self.assertEqual(3998, document.DrawPages[0][0].Size.Height) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests2/tdf125449.py b/sd/qa/uitest/impress_tests2/tdf125449.py index 242a79e65787..65e245b7a8dc 100644 --- a/sd/qa/uitest/impress_tests2/tdf125449.py +++ b/sd/qa/uitest/impress_tests2/tdf125449.py @@ -34,26 +34,26 @@ class tdf125449(UITestCase): self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.Style, LINEAR) + document.DrawPages[0].Background.FillGradient.Style, LINEAR) self.assertEqual( - hex(document.DrawPages.getByIndex(0).Background.FillGradient.StartColor), '0xdde8cb') + hex(document.DrawPages[0].Background.FillGradient.StartColor), '0xdde8cb') self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.Angle, 450) + document.DrawPages[0].Background.FillGradient.Angle, 450) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.Border, 0) + document.DrawPages[0].Background.FillGradient.Border, 0) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.XOffset, 0) + document.DrawPages[0].Background.FillGradient.XOffset, 0) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.YOffset, 0) + document.DrawPages[0].Background.FillGradient.YOffset, 0) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.StartIntensity, 100) + document.DrawPages[0].Background.FillGradient.StartIntensity, 100) self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradient.EndIntensity, 100) + document.DrawPages[0].Background.FillGradient.EndIntensity, 100) # Without the patch in place, this test would have failed with # AssertionError: '' != 'gradient' self.assertEqual( - document.DrawPages.getByIndex(0).Background.FillGradientName, 'gradient') + document.DrawPages[0].Background.FillGradientName, 'gradient') # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests2/tdf127900.py b/sd/qa/uitest/impress_tests2/tdf127900.py index e32b76591aad..cb4149c10c9f 100644 --- a/sd/qa/uitest/impress_tests2/tdf127900.py +++ b/sd/qa/uitest/impress_tests2/tdf127900.py @@ -19,8 +19,8 @@ class tdf127900(UITestCase): with self.ui_test.load_file(get_url_for_data_file("tdf127900.fodp")) as doc: - xMasterLang = doc.MasterPages.getByIndex(0).getByIndex(1).CharLocale.Language - xSlideLang = doc.DrawPages.getByIndex(1).getByIndex(1).CharLocale.Language + xMasterLang = doc.MasterPages[0][1].CharLocale.Language + xSlideLang = doc.DrawPages[1][1].CharLocale.Language self.assertEqual(xMasterLang, xSlideLang) @@ -35,8 +35,8 @@ class tdf127900(UITestCase): select_pos(xDlg.getChild("cbWestLanguage"), "10") - xMasterLang = doc.MasterPages.getByIndex(0).getByIndex(1).CharLocale.Language - xSlideLang = doc.DrawPages.getByIndex(1).getByIndex(1).CharLocale.Language + xMasterLang = doc.MasterPages[0][1].CharLocale.Language + xSlideLang = doc.DrawPages[1][1].CharLocale.Language self.assertEqual(xMasterLang, xSlideLang) diff --git a/sd/qa/uitest/impress_tests2/tdf133713.py b/sd/qa/uitest/impress_tests2/tdf133713.py index a4195fd2b268..da84ae94fbeb 100644 --- a/sd/qa/uitest/impress_tests2/tdf133713.py +++ b/sd/qa/uitest/impress_tests2/tdf133713.py @@ -46,8 +46,8 @@ class Tdf133713(UITestCase): self.assertEqual("0", get_state_as_dict(xIndent)["Value"]) self.assertEqual("45%", get_state_as_dict(xRelSize)["Text"]) - drawPage = document.getDrawPages().getByIndex(0) - shape = drawPage.getByIndex(1) + drawPage = document.getDrawPages()[0] + shape = drawPage[1] xEnumeration = shape.Text.createEnumeration() # Without the fix in place, this test would have failed with diff --git a/sd/qa/uitest/impress_tests2/tdf139511.py b/sd/qa/uitest/impress_tests2/tdf139511.py index 52e54d291516..1b5febe80df9 100644 --- a/sd/qa/uitest/impress_tests2/tdf139511.py +++ b/sd/qa/uitest/impress_tests2/tdf139511.py @@ -23,8 +23,8 @@ class tdf139511(UITestCase): self.xUITest.executeCommand(".uno:InsertTable?Columns:short=4&Rows:short=4") - self.assertEqual(3885, document.DrawPages[0].getByIndex(2).BoundRect.Height) - self.assertEqual(14136, document.DrawPages[0].getByIndex(2).BoundRect.Width) + self.assertEqual(3885, document.DrawPages[0][2].BoundRect.Height) + self.assertEqual(14136, document.DrawPages[0][2].BoundRect.Width) with self.ui_test.execute_dialog_through_command(".uno:TransformDialog") as xDialog: @@ -44,8 +44,8 @@ class tdf139511(UITestCase): # Without the fix in place, this test would have failed with # AssertionError: 5037 != 8036 - self.assertEqual(5037, document.DrawPages[0].getByIndex(2).BoundRect.Height) - self.assertEqual(10037, document.DrawPages[0].getByIndex(2).BoundRect.Width) + self.assertEqual(5037, document.DrawPages[0][2].BoundRect.Height) + self.assertEqual(10037, document.DrawPages[0][2].BoundRect.Width) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sd/qa/uitest/impress_tests2/tdf146019.py b/sd/qa/uitest/impress_tests2/tdf146019.py index 16e0290ab1bf..86b8ed48180f 100644 --- a/sd/qa/uitest/impress_tests2/tdf146019.py +++ b/sd/qa/uitest/impress_tests2/tdf146019.py @@ -28,8 +28,7 @@ class tdf146019(UITestCase): # Before the fix, a dialog was displayed at this point # Check the shape is rotated, height > width - drawPage = document.getDrawPages().getByIndex(0) - shape = drawPage.getByIndex(2) + shape = document.getDrawPages()[0][2] self.assertEqual(8996, shape.getSize().Width) self.assertEqual(11745, shape.getSize().Height) diff --git a/sd/qa/uitest/impress_tests2/tdf91762.py b/sd/qa/uitest/impress_tests2/tdf91762.py index e36baec62094..441971601c4c 100644 --- a/sd/qa/uitest/impress_tests2/tdf91762.py +++ b/sd/qa/uitest/impress_tests2/tdf91762.py @@ -25,12 +25,12 @@ class tdf91762(UITestCase): self.assertEqual('5', get_state_as_dict(xDialog.getChild('columns'))['Text']) self.assertEqual('2', get_state_as_dict(xDialog.getChild('rows'))['Text']) - self.assertEqual(1961, document.DrawPages[0].getByIndex(1).BoundRect.Height) - self.assertEqual(25198, document.DrawPages[0].getByIndex(1).Size.Width) - self.assertEqual(1923, document.DrawPages[0].getByIndex(1).Size.Height) + self.assertEqual(1961, document.DrawPages[0][1].BoundRect.Height) + self.assertEqual(25198, document.DrawPages[0][1].Size.Width) + self.assertEqual(1923, document.DrawPages[0][1].Size.Height) - self.assertEqual(1400, document.DrawPages[0].getByIndex(1).Position.X) - self.assertEqual(3685, document.DrawPages[0].getByIndex(1).Position.Y) + self.assertEqual(1400, document.DrawPages[0][1].Position.X) + self.assertEqual(3685, document.DrawPages[0][1].Position.Y) xDoc = self.xUITest.getTopFocusWindow() xEdit = xDoc.getChild("impress_win") @@ -39,7 +39,7 @@ class tdf91762(UITestCase): xEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"})) # tdf#138011: Without the fix in place, it will be much lower - self.assertEqual(5466, document.DrawPages[0].getByIndex(1).BoundRect.Height) + self.assertEqual(5466, document.DrawPages[0][1].BoundRect.Height) # vim: set shiftwidth=4 softtabstop=4 expandtab: |