summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-04-21 11:26:19 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-21 17:05:46 +0200
commit5fb6081475f315ac825f8519fb9c99d751cabd47 (patch)
tree6763a8e184cff9bba4e9673672b8ac19314100b3 /sc
parenta8216c210dbe83a7fe0c8b1a767c2ddf8b611e96 (diff)
uitest: just use .uno:CloseDoc and simplify code
Change-Id: Ic5fec6f1dd76aab6b11e822d127f0eb4c705ffae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114388 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/uitest/calc_tests8/tdf114710.py4
-rw-r--r--sc/qa/uitest/calc_tests8/tdf118308.py7
-rw-r--r--sc/qa/uitest/chart/copyPaste.py4
-rw-r--r--sc/qa/uitest/chart/tdf107097.py4
-rw-r--r--sc/qa/uitest/chart/tdf120348.py4
-rw-r--r--sc/qa/uitest/chart/tdf136011.py4
-rw-r--r--sc/qa/uitest/chart/tdf62057.py4
-rw-r--r--sc/qa/uitest/chart/tdf98690.py4
-rw-r--r--sc/qa/uitest/conditional_format/tdf117899.py4
9 files changed, 21 insertions, 18 deletions
diff --git a/sc/qa/uitest/calc_tests8/tdf114710.py b/sc/qa/uitest/calc_tests8/tdf114710.py
index ca82fa938ad1..94f3849f58ac 100644
--- a/sc/qa/uitest/calc_tests8/tdf114710.py
+++ b/sc/qa/uitest/calc_tests8/tdf114710.py
@@ -19,9 +19,9 @@ class tdf114710(UITestCase):
gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:O7"}))
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("writer")
+ self.ui_test.create_doc_in_start_center("writer")
self.xUITest.getTopFocusWindow()
diff --git a/sc/qa/uitest/calc_tests8/tdf118308.py b/sc/qa/uitest/calc_tests8/tdf118308.py
index 313a2dc35ec8..2c38cd11394d 100644
--- a/sc/qa/uitest/calc_tests8/tdf118308.py
+++ b/sc/qa/uitest/calc_tests8/tdf118308.py
@@ -22,9 +22,12 @@ class tdf118308(UITestCase):
gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.ui_test.execute_dialog_through_command(".uno:CloseDoc")
+ xDialog = self.xUITest.getTopFocusWindow()
+ xDiscardBtn = xDialog.getChild("discard")
+ self.ui_test.close_dialog_through_button(xDiscardBtn)
- calc_doc = self.ui_test.load_empty_file("calc")
+ calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/chart/copyPaste.py b/sc/qa/uitest/chart/copyPaste.py
index 9b4ba830cdf1..3d37595f2dda 100644
--- a/sc/qa/uitest/chart/copyPaste.py
+++ b/sc/qa/uitest/chart/copyPaste.py
@@ -33,9 +33,9 @@ class CopyPaste(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
document = self.ui_test.get_component()
# Rename the sheet to match the same name as the first document
diff --git a/sc/qa/uitest/chart/tdf107097.py b/sc/qa/uitest/chart/tdf107097.py
index bbf697c5cd88..50ecccaff309 100644
--- a/sc/qa/uitest/chart/tdf107097.py
+++ b/sc/qa/uitest/chart/tdf107097.py
@@ -31,9 +31,9 @@ class tdf107097(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
diff --git a/sc/qa/uitest/chart/tdf120348.py b/sc/qa/uitest/chart/tdf120348.py
index 5eb83a0f66d1..b8ccb6c9b2c0 100644
--- a/sc/qa/uitest/chart/tdf120348.py
+++ b/sc/qa/uitest/chart/tdf120348.py
@@ -30,9 +30,9 @@ class tdf120348(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
diff --git a/sc/qa/uitest/chart/tdf136011.py b/sc/qa/uitest/chart/tdf136011.py
index 5a8074f3975d..e4bcbd5f975e 100644
--- a/sc/qa/uitest/chart/tdf136011.py
+++ b/sc/qa/uitest/chart/tdf136011.py
@@ -36,9 +36,9 @@ class tdf136011(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
diff --git a/sc/qa/uitest/chart/tdf62057.py b/sc/qa/uitest/chart/tdf62057.py
index 93c5137dc16b..dc67dd8db5a5 100644
--- a/sc/qa/uitest/chart/tdf62057.py
+++ b/sc/qa/uitest/chart/tdf62057.py
@@ -33,9 +33,9 @@ class tdf62057(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
diff --git a/sc/qa/uitest/chart/tdf98690.py b/sc/qa/uitest/chart/tdf98690.py
index d70b66ee4214..4ea448c1d0d9 100644
--- a/sc/qa/uitest/chart/tdf98690.py
+++ b/sc/qa/uitest/chart/tdf98690.py
@@ -19,9 +19,9 @@ class tdf98690(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
- self.ui_test.load_empty_file("calc")
+ self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
document = self.ui_test.get_component()
diff --git a/sc/qa/uitest/conditional_format/tdf117899.py b/sc/qa/uitest/conditional_format/tdf117899.py
index 6b9b9abbd4e7..67146bcdf20a 100644
--- a/sc/qa/uitest/conditional_format/tdf117899.py
+++ b/sc/qa/uitest/conditional_format/tdf117899.py
@@ -37,12 +37,12 @@ class Tdf117899(UITestCase):
self.xUITest.executeCommand(".uno:Copy")
# Close the Calc document
- self.ui_test.close_doc()
+ self.xUITest.executeCommand(".uno:CloseDoc")
with TemporaryDirectory() as tempdir:
xFilePath = os.path.join(tempdir, "tdf117899-temp.ods")
- self.ui_test.load_empty_file("writer")
+ self.ui_test.create_doc_in_start_center("writer")
# Paste as an OLE spreadsheet
formatProperty = mkPropertyValues({"SelectedFormat": 85})