summaryrefslogtreecommitdiff
path: root/sc/qa/uitest/calc_tests8
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/qa/uitest/calc_tests8
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/qa/uitest/calc_tests8')
-rw-r--r--sc/qa/uitest/calc_tests8/tdf114710.py4
-rw-r--r--sc/qa/uitest/calc_tests8/tdf118308.py7
2 files changed, 7 insertions, 4 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")