diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-10-26 16:00:20 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-10-26 22:31:07 +0200 |
commit | a1c693d23f53f035771de54fb139772be91e9bfb (patch) | |
tree | a80026f831e270e46223e74917d57dd58ffd2be6 | |
parent | eb664612aba4d7d8d5cf8d5a448f12be55da59ba (diff) |
uitest: when possible, close the document before opening a new one
Change-Id: Ice8ec4868baab5182957ce335e2bc2cb93822af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124228
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sc/qa/uitest/calc_tests9/tdf113571.py | 16 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests9/tdf125440.py | 22 | ||||
-rw-r--r-- | sc/qa/uitest/calc_tests9/tdf95554.py | 14 | ||||
-rw-r--r-- | sc/qa/uitest/chart/copyPaste.py | 44 | ||||
-rw-r--r-- | sc/qa/uitest/chart/tdf107097.py | 38 | ||||
-rw-r--r-- | sc/qa/uitest/chart/tdf120348.py | 24 | ||||
-rw-r--r-- | sc/qa/uitest/chart/tdf136011.py | 30 | ||||
-rw-r--r-- | sc/qa/uitest/chart/tdf62057.py | 24 | ||||
-rw-r--r-- | sc/qa/uitest/chart/tdf98690.py | 26 | ||||
-rw-r--r-- | sc/qa/uitest/pasteSpecial/tdf114710.py | 26 | ||||
-rw-r--r-- | sc/qa/uitest/pasteSpecial/tdf118308.py | 34 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests5/tdf138531.py | 1 | ||||
-rw-r--r-- | sw/qa/uitest/writer_tests6/tdf118883.py | 10 |
13 files changed, 155 insertions, 154 deletions
diff --git a/sc/qa/uitest/calc_tests9/tdf113571.py b/sc/qa/uitest/calc_tests9/tdf113571.py index 4122a46c0a87..9c18a04bad20 100644 --- a/sc/qa/uitest/calc_tests9/tdf113571.py +++ b/sc/qa/uitest/calc_tests9/tdf113571.py @@ -20,15 +20,15 @@ class Tdf113571(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("writer") as writer_document: + with self.ui_test.load_empty_file("writer") as writer_document: - self.xUITest.getTopFocusWindow() + self.xUITest.getTopFocusWindow() - self.xUITest.executeCommand(".uno:PasteUnformatted") + self.xUITest.executeCommand(".uno:PasteUnformatted") - # Without the fix in place, this test would have failed with - # AssertionError: '<?xml version="1.0" encoding="UTF-8"?>\n<[34 chars]est>' != - # '"<?xml version=""1.0"" encoding=""UTF-8""[40 chars]st>"' - self.assertEqual('<?xml version="1.0" encoding="UTF-8"?>\n<test>\n <hello>world</hello>\n</test>', - writer_document.Text.String) + # Without the fix in place, this test would have failed with + # AssertionError: '<?xml version="1.0" encoding="UTF-8"?>\n<[34 chars]est>' != + # '"<?xml version=""1.0"" encoding=""UTF-8""[40 chars]st>"' + self.assertEqual('<?xml version="1.0" encoding="UTF-8"?>\n<test>\n <hello>world</hello>\n</test>', + writer_document.Text.String) diff --git a/sc/qa/uitest/calc_tests9/tdf125440.py b/sc/qa/uitest/calc_tests9/tdf125440.py index 9a16f069c968..22a3c876d6ef 100644 --- a/sc/qa/uitest/calc_tests9/tdf125440.py +++ b/sc/qa/uitest/calc_tests9/tdf125440.py @@ -19,19 +19,19 @@ class Tdf1254400(UITestCase): self.xUITest.executeCommand(".uno:SelectAll") self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: + with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - self.xUITest.executeCommand(".uno:PasteUnformatted") + self.xUITest.executeCommand(".uno:PasteUnformatted") - # Without the fix in place, this test would have failed with - # AssertionError: 'Row' != '"Row"' - self.assertEqual("Row", get_cell_by_position(calc_document, 0, 0, 0).getString()) - self.assertEqual("", get_cell_by_position(calc_document, 0, 1, 0).getString()) - self.assertEqual("", get_cell_by_position(calc_document, 0, 2, 0).getString()) - self.assertEqual("50", get_cell_by_position(calc_document, 0, 3, 0).getString()) + # Without the fix in place, this test would have failed with + # AssertionError: 'Row' != '"Row"' + self.assertEqual("Row", get_cell_by_position(calc_document, 0, 0, 0).getString()) + self.assertEqual("", get_cell_by_position(calc_document, 0, 1, 0).getString()) + self.assertEqual("", get_cell_by_position(calc_document, 0, 2, 0).getString()) + self.assertEqual("50", get_cell_by_position(calc_document, 0, 3, 0).getString()) diff --git a/sc/qa/uitest/calc_tests9/tdf95554.py b/sc/qa/uitest/calc_tests9/tdf95554.py index 67c55e9435f4..9b45212bab31 100644 --- a/sc/qa/uitest/calc_tests9/tdf95554.py +++ b/sc/qa/uitest/calc_tests9/tdf95554.py @@ -28,13 +28,13 @@ class Tdf95554(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A6:A6", "EXTEND":"1"})) self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("writer") as writer_document: + with self.ui_test.load_empty_file("writer") as writer_document: - self.xUITest.getTopFocusWindow() - self.xUITest.executeCommand(".uno:PasteUnformatted") + self.xUITest.getTopFocusWindow() + self.xUITest.executeCommand(".uno:PasteUnformatted") - # Without the fix, the test breaks here with: - #AssertionError: 'A\n\nC\n\nE\nF' != 'A' + # Without the fix, the test breaks here with: + #AssertionError: 'A\n\nC\n\nE\nF' != 'A' - self.assertEqual('A\n\nC\n\nE\nF', - writer_document.Text.String) + self.assertEqual('A\n\nC\n\nE\nF', + writer_document.Text.String) diff --git a/sc/qa/uitest/chart/copyPaste.py b/sc/qa/uitest/chart/copyPaste.py index e2d8fe0349e2..12cf5d27e459 100644 --- a/sc/qa/uitest/chart/copyPaste.py +++ b/sc/qa/uitest/chart/copyPaste.py @@ -36,35 +36,35 @@ class CopyPaste(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: + with self.ui_test.load_empty_file("calc") as calc_document: - # Rename the sheet to match the same name as the first document - with self.ui_test.execute_dialog_through_command(".uno:RenameTable") as xDialog: - xname_entry = xDialog.getChild("name_entry") + # Rename the sheet to match the same name as the first document + with self.ui_test.execute_dialog_through_command(".uno:RenameTable") as xDialog: + xname_entry = xDialog.getChild("name_entry") - xname_entry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) - xname_entry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) - xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"Sheet.1"})) + xname_entry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"})) + xname_entry.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"})) + xname_entry.executeAction("TYPE", mkPropertyValues({"TEXT":"Sheet.1"})) - self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:Paste") - xChart = calc_document.Sheets[0].Charts[0] - xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries + xChart = calc_document.Sheets[0].Charts[0] + xDataSeries = xChart.getEmbeddedObject().getFirstDiagram().CoordinateSystems[0].ChartTypes[0].DataSeries - self.assertEqual(4, len(xDataSeries)) + self.assertEqual(4, len(xDataSeries)) - xNewSheetRanges = [] - for i in range(4): - xRow = [] - xDS = xDataSeries[i].DataSequences + xNewSheetRanges = [] + for i in range(4): + xRow = [] + xDS = xDataSeries[i].DataSequences - self.assertEqual(1, len(xDS)) - xRow.append(xDS[0].Values.SourceRangeRepresentation) - xNewSheetRanges.append(xRow) + self.assertEqual(1, len(xDS)) + xRow.append(xDS[0].Values.SourceRangeRepresentation) + xNewSheetRanges.append(xRow) - # Without the fix in place, this test would have failed with - # ["$'Sheet.1'.$B$12:$B$18"] - # ["'file:///home/<user>/Documents/Sheet.1'#$Sheet1.$B$12:$B$18"] - self.assertEqual(xOldSheetRanges, xNewSheetRanges) + # Without the fix in place, this test would have failed with + # ["$'Sheet.1'.$B$12:$B$18"] + # ["'file:///home/<user>/Documents/Sheet.1'#$Sheet1.$B$12:$B$18"] + self.assertEqual(xOldSheetRanges, xNewSheetRanges) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf107097.py b/sc/qa/uitest/chart/tdf107097.py index 28f545e623ae..9226b5bf1184 100644 --- a/sc/qa/uitest/chart/tdf107097.py +++ b/sc/qa/uitest/chart/tdf107097.py @@ -30,30 +30,30 @@ class tdf107097(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_empty_file("calc") as calc_document: + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:Paste") - xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data + xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data - xSecondMatrix = [] - for row in xData.Data: - xRow = [] - for value in row: - xRow.append(value) - xSecondMatrix.append(xRow) + xSecondMatrix = [] + for row in xData.Data: + xRow = [] + for value in row: + xRow.append(value) + xSecondMatrix.append(xRow) - self.assertEqual(xFirstMatrix, xSecondMatrix) + self.assertEqual(xFirstMatrix, xSecondMatrix) - aExpectedColumnDescriptions = ('Sum - Sales T1', 'Sum - Sales T2', - 'Sum - Sales T3', 'Sum - Sales T4') - aExpectedRowDescriptions = ('DE Berlin A', 'DE Berlin B', 'DE Munich A', - 'DE Munich B', 'EN Glasgow A', 'EN Liverpool B', 'EN London A', - 'EN London B', 'FR Nantes A', 'FR Nantes B', 'FR Paris A', 'FR Paris B') + aExpectedColumnDescriptions = ('Sum - Sales T1', 'Sum - Sales T2', + 'Sum - Sales T3', 'Sum - Sales T4') + aExpectedRowDescriptions = ('DE Berlin A', 'DE Berlin B', 'DE Munich A', + 'DE Munich B', 'EN Glasgow A', 'EN Liverpool B', 'EN London A', + 'EN London B', 'FR Nantes A', 'FR Nantes B', 'FR Paris A', 'FR Paris B') - self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions) - self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions) + self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions) + self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf120348.py b/sc/qa/uitest/chart/tdf120348.py index 15b86d2c7fb9..5497baec7a2f 100644 --- a/sc/qa/uitest/chart/tdf120348.py +++ b/sc/qa/uitest/chart/tdf120348.py @@ -12,22 +12,22 @@ from uitest.uihelper.common import get_url_for_data_file class tdf120348(UITestCase): - def test_tdf120348(self): + def test_tdf120348(self): - with self.ui_test.load_file(get_url_for_data_file("tdf120348.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_file(get_url_for_data_file("tdf120348.ods")) as calc_doc: + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - xFirstMatrix = [] - for row in range(1, 159): - xRow = [] - for column in range(5, 9): - xRow.append(round(get_cell_by_position(calc_doc, 0, column, row).getValue(), 5)) - xFirstMatrix.append(xRow) + xFirstMatrix = [] + for row in range(1, 159): + xRow = [] + for column in range(5, 9): + xRow.append(round(get_cell_by_position(calc_doc, 0, column, row).getValue(), 5)) + xFirstMatrix.append(xRow) - gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 2"})) + gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": "Object 2"})) - self.xUITest.executeCommand(".uno:Copy") + self.xUITest.executeCommand(".uno:Copy") with self.ui_test.load_empty_file("calc") as calc_document: diff --git a/sc/qa/uitest/chart/tdf136011.py b/sc/qa/uitest/chart/tdf136011.py index f0df5ca47841..d04046f1e2da 100644 --- a/sc/qa/uitest/chart/tdf136011.py +++ b/sc/qa/uitest/chart/tdf136011.py @@ -14,26 +14,26 @@ class tdf136011(UITestCase): def test_tdf136011(self): - xObjectNames = ['Object 1', 'Object 2'] - xCategories = ['Test 1', 'Test 2', 'Test 3'] - xSubCategories = [['A', 'B', 'C'], ['1', '2', '3']] - xColumnNames = ['A', 'B', 'C'] + xObjectNames = ['Object 1', 'Object 2'] + xCategories = ['Test 1', 'Test 2', 'Test 3'] + xSubCategories = [['A', 'B', 'C'], ['1', '2', '3']] + xColumnNames = ['A', 'B', 'C'] - # Test both charts - for i, name in enumerate(xObjectNames): + # Test both charts + for i, name in enumerate(xObjectNames): - with self.ui_test.load_file(get_url_for_data_file("tdf136011.ods")) as calc_doc: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_file(get_url_for_data_file("tdf136011.ods")) as calc_doc: + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - xExpectedResults = [] - for category in xCategories: - for subCategory in xSubCategories[i]: - xExpectedResults.append(category + ' ' + subCategory) + xExpectedResults = [] + for category in xCategories: + for subCategory in xSubCategories[i]: + xExpectedResults.append(category + ' ' + subCategory) - gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": name})) + gridwin.executeAction("SELECT", mkPropertyValues({"OBJECT": name})) - self.xUITest.executeCommand(".uno:Copy") + self.xUITest.executeCommand(".uno:Copy") with self.ui_test.load_empty_file("calc") as calc_document: xCalcDoc = self.xUITest.getTopFocusWindow() diff --git a/sc/qa/uitest/chart/tdf62057.py b/sc/qa/uitest/chart/tdf62057.py index fcdaebb03d56..10e56189dedf 100644 --- a/sc/qa/uitest/chart/tdf62057.py +++ b/sc/qa/uitest/chart/tdf62057.py @@ -32,23 +32,23 @@ class tdf62057(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: + with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:Paste") - xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data + xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data - xNewDataMatrix = [] - xNewDataMatrix.append([round(item[0], 5) for item in xData.Data]) - xNewDataMatrix.append([round(item[1], 5) for item in xData.Data]) + xNewDataMatrix = [] + xNewDataMatrix.append([round(item[0], 5) for item in xData.Data]) + xNewDataMatrix.append([round(item[1], 5) for item in xData.Data]) - # Without the fix in place, this test would have failed with - # AssertionError: Lists differ: ['10m', '11v', '12m', '13m', '14m', '15v'] != ['55.3796', '35.0989'] - self.assertEqual(xRowDescriptions, list(xData.RowDescriptions)) + # Without the fix in place, this test would have failed with + # AssertionError: Lists differ: ['10m', '11v', '12m', '13m', '14m', '15v'] != ['55.3796', '35.0989'] + self.assertEqual(xRowDescriptions, list(xData.RowDescriptions)) - self.assertEqual(xDataMatrix, xNewDataMatrix) + self.assertEqual(xDataMatrix, xNewDataMatrix) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/chart/tdf98690.py b/sc/qa/uitest/chart/tdf98690.py index 4afcd033883e..20ab9049b73c 100644 --- a/sc/qa/uitest/chart/tdf98690.py +++ b/sc/qa/uitest/chart/tdf98690.py @@ -19,22 +19,22 @@ class tdf98690(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + with self.ui_test.load_empty_file("calc") as calc_document: + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:Paste") - xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data + xData = calc_document.Sheets[0].Charts[0].getEmbeddedObject().Data - aExpectedRowDescriptions = tuple(str(i) for i in range(1, 14)) - aExpectedColumnDescriptions = ('Column D Column D', 'cc_girder2', 'Column S Column S', - 'Column S Column S', 'Column D Column D', 'clexrfdon', 'Column S Column S', - 'Column S Column S', 'Column D', 'clexrfdoff', 'Column S Column S', 'Column S Column S') + aExpectedRowDescriptions = tuple(str(i) for i in range(1, 14)) + aExpectedColumnDescriptions = ('Column D Column D', 'cc_girder2', 'Column S Column S', + 'Column S Column S', 'Column D Column D', 'clexrfdon', 'Column S Column S', + 'Column S Column S', 'Column D', 'clexrfdoff', 'Column S Column S', 'Column S Column S') - # Without the fix in place, this test would have failed here, - # since the pasted chart wouldn't have had any data - self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions) - self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions) + # Without the fix in place, this test would have failed here, + # since the pasted chart wouldn't have had any data + self.assertEqual(aExpectedRowDescriptions, xData.RowDescriptions) + self.assertEqual(aExpectedColumnDescriptions, xData.ColumnDescriptions) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/pasteSpecial/tdf114710.py b/sc/qa/uitest/pasteSpecial/tdf114710.py index e3d772bc8c8d..d35770a46d34 100644 --- a/sc/qa/uitest/pasteSpecial/tdf114710.py +++ b/sc/qa/uitest/pasteSpecial/tdf114710.py @@ -18,26 +18,26 @@ class tdf114710(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:O7"})) self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("writer") as writer_document: + with self.ui_test.load_empty_file("writer") as writer_document: - self.xUITest.getTopFocusWindow() + self.xUITest.getTopFocusWindow() - with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog: - xList = xDialog.getChild('list') + xList = xDialog.getChild('list') - for childName in xList.getChildren(): - xChild = xList.getChild(childName) - if get_state_as_dict(xChild)['Text'] == "Graphics Device Interface metafile (GDI)": - break + for childName in xList.getChildren(): + xChild = xList.getChild(childName) + if get_state_as_dict(xChild)['Text'] == "Graphics Device Interface metafile (GDI)": + break - xChild.executeAction("SELECT", tuple()) - self.assertEqual( - get_state_as_dict(xList)['SelectEntryText'], "Graphics Device Interface metafile (GDI)") + xChild.executeAction("SELECT", tuple()) + self.assertEqual( + get_state_as_dict(xList)['SelectEntryText'], "Graphics Device Interface metafile (GDI)") - # Without the fix in place, this test would have crashed here - self.assertEqual(1, writer_document.GraphicObjects.getCount()) + # Without the fix in place, this test would have crashed here + self.assertEqual(1, writer_document.GraphicObjects.getCount()) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sc/qa/uitest/pasteSpecial/tdf118308.py b/sc/qa/uitest/pasteSpecial/tdf118308.py index 8ae0f2d6f5d0..9d7d65236aac 100644 --- a/sc/qa/uitest/pasteSpecial/tdf118308.py +++ b/sc/qa/uitest/pasteSpecial/tdf118308.py @@ -21,30 +21,30 @@ class tdf118308(UITestCase): gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: + with self.ui_test.load_empty_file("calc") as calc_document: - xCalcDoc = self.xUITest.getTopFocusWindow() - gridwin = xCalcDoc.getChild("grid_window") + xCalcDoc = self.xUITest.getTopFocusWindow() + gridwin = xCalcDoc.getChild("grid_window") - gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) + gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"})) - with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog: + with self.ui_test.execute_dialog_through_command(".uno:PasteSpecial") as xDialog: - # Without the fix in place, this test would have failed here - # since a different dialog would have been opened and the children - # wouldn't have been found - xText = xDialog.getChild("text") - xNumbers = xDialog.getChild("numbers") - xDatetime = xDialog.getChild("datetime") - xFormats = xDialog.getChild("formats") + # Without the fix in place, this test would have failed here + # since a different dialog would have been opened and the children + # wouldn't have been found + xText = xDialog.getChild("text") + xNumbers = xDialog.getChild("numbers") + xDatetime = xDialog.getChild("datetime") + xFormats = xDialog.getChild("formats") - self.assertEqual("true", get_state_as_dict(xText)["Selected"]) - self.assertEqual("true", get_state_as_dict(xNumbers)["Selected"]) - self.assertEqual("true", get_state_as_dict(xDatetime)["Selected"]) - self.assertEqual("false", get_state_as_dict(xFormats)["Selected"]) + self.assertEqual("true", get_state_as_dict(xText)["Selected"]) + self.assertEqual("true", get_state_as_dict(xNumbers)["Selected"]) + self.assertEqual("true", get_state_as_dict(xDatetime)["Selected"]) + self.assertEqual("false", get_state_as_dict(xFormats)["Selected"]) - self.assertEqual("A", get_cell_by_position(calc_document, 0, 0, 0).getString()) + self.assertEqual("A", get_cell_by_position(calc_document, 0, 0, 0).getString()) # vim: set shiftwidth=4 softtabstop=4 expandtab: diff --git a/sw/qa/uitest/writer_tests5/tdf138531.py b/sw/qa/uitest/writer_tests5/tdf138531.py index 94d3a15e0e7d..77142b287df3 100644 --- a/sw/qa/uitest/writer_tests5/tdf138531.py +++ b/sw/qa/uitest/writer_tests5/tdf138531.py @@ -26,6 +26,7 @@ class Tdf138531(UITestCase): self.xUITest.executeCommand(".uno:Copy") + # Work with both documents at the same time with self.ui_test.load_empty_file("writer") as writer_doc: # Paste as DDE diff --git a/sw/qa/uitest/writer_tests6/tdf118883.py b/sw/qa/uitest/writer_tests6/tdf118883.py index 5395559220be..5f225f860120 100644 --- a/sw/qa/uitest/writer_tests6/tdf118883.py +++ b/sw/qa/uitest/writer_tests6/tdf118883.py @@ -20,12 +20,12 @@ class Tdf118883(UITestCase): self.xUITest.executeCommand(".uno:Copy") - with self.ui_test.load_empty_file("calc") as calc_document: + with self.ui_test.load_empty_file("calc") as calc_document: - self.xUITest.executeCommand(".uno:Paste") + self.xUITest.executeCommand(".uno:Paste") - # Without the fix in place, this test would have failed with - # AssertionError: 1 != 0 - self.assertEqual(1, calc_document.DrawPages[0].getCount()) + # Without the fix in place, this test would have failed with + # AssertionError: 1 != 0 + self.assertEqual(1, calc_document.DrawPages[0].getCount()) # vim: set shiftwidth=4 softtabstop=4 expandtab: |