[Libreoffice-commits] core.git: sc/qa uitest/calc_tests
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 24 12:30:54 UTC 2020
sc/qa/uitest/autofilter/autofilter.py | 7 +++----
sc/qa/uitest/autofilter/tdf117276.py | 8 +++-----
sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py | 6 +++---
sc/qa/uitest/autofilter/tdf122260.py | 6 +++---
sc/qa/uitest/autofilter/tdf130070.py | 8 +++-----
sc/qa/uitest/calc_tests/CalcPasteOnly.py | 4 ----
sc/qa/uitest/calc_tests/tdf133855.py | 5 +++--
sc/qa/uitest/calc_tests2/tdf37623.py | 3 +--
sc/qa/uitest/calc_tests3/tdf68290.py | 7 ++++---
sc/qa/uitest/calc_tests4/tdf131170.py | 5 +++--
sc/qa/uitest/calc_tests4/tdf85403.py | 4 ++--
sc/qa/uitest/calc_tests4/trackedChanges.py | 7 +++----
sc/qa/uitest/calc_tests6/tdf121263.py | 3 ---
sc/qa/uitest/calc_tests8/navigator.py | 5 +++--
sc/qa/uitest/calc_tests8/tdf119343.py | 3 +--
sc/qa/uitest/chart/tdf129587.py | 5 +++--
sc/qa/uitest/conditional_format/tdf96453.py | 9 +++------
sc/qa/uitest/search_replace/replace.py | 9 +++------
sc/qa/uitest/search_replace/tdf132783.py | 5 +++--
19 files changed, 47 insertions(+), 62 deletions(-)
New commits:
commit c7caec046f8bfff8c46fc930738f29631cf16df9
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Fri Oct 23 14:59:03 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sat Oct 24 14:30:09 2020 +0200
uitest: sc: get_url_for_data_file -> pathlib.Path
Change-Id: Iea16b30e74a5bbc5fe155f1265d5c05bf104995c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104729
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/autofilter/autofilter.py b/sc/qa/uitest/autofilter/autofilter.py
index abb776ea8b99..a97a9fe1f3db 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -7,14 +7,13 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
-
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
-
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
def is_row_hidden(doc, index):
row = get_row(doc, index)
diff --git a/sc/qa/uitest/autofilter/tdf117276.py b/sc/qa/uitest/autofilter/tdf117276.py
index fabfa1d9a7b2..6ea392fc787b 100644
--- a/sc/qa/uitest/autofilter/tdf117276.py
+++ b/sc/qa/uitest/autofilter/tdf117276.py
@@ -7,13 +7,11 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
-# import org.libreoffice.unotest
-# import pathlib
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
-# return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
def is_row_hidden(doc, index):
row = get_row(doc, index)
diff --git a/sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py b/sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py
index da681fb0fd18..f065e6455ebf 100644
--- a/sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py
+++ b/sc/qa/uitest/autofilter/tdf117276_autofilter_reset.py
@@ -8,11 +8,11 @@ from uitest.framework import UITestCase
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
-from uitest.path import get_srcdir_url
-
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
def is_row_hidden(doc, index):
row = get_row(doc, index)
diff --git a/sc/qa/uitest/autofilter/tdf122260.py b/sc/qa/uitest/autofilter/tdf122260.py
index a1e09f25ab7f..5d9977b7f731 100644
--- a/sc/qa/uitest/autofilter/tdf122260.py
+++ b/sc/qa/uitest/autofilter/tdf122260.py
@@ -7,11 +7,11 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
+import org.libreoffice.unotest
+import pathlib
-
-from uitest.path import get_srcdir_url
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
def is_row_hidden(doc, index):
row = get_row(doc, index)
diff --git a/sc/qa/uitest/autofilter/tdf130070.py b/sc/qa/uitest/autofilter/tdf130070.py
index ad6b8051d524..4afea4dc821d 100644
--- a/sc/qa/uitest/autofilter/tdf130070.py
+++ b/sc/qa/uitest/autofilter/tdf130070.py
@@ -7,13 +7,11 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
-# import org.libreoffice.unotest
-# import pathlib
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
-# return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
def is_row_hidden(doc, index):
row = get_row(doc, index)
diff --git a/sc/qa/uitest/calc_tests/CalcPasteOnly.py b/sc/qa/uitest/calc_tests/CalcPasteOnly.py
index 7253043a7070..9cc05a0a84eb 100644
--- a/sc/qa/uitest/calc_tests/CalcPasteOnly.py
+++ b/sc/qa/uitest/calc_tests/CalcPasteOnly.py
@@ -6,14 +6,10 @@
#
from libreoffice.uno.propertyvalue import mkPropertyValues
-
from uitest.framework import UITestCase
from libreoffice.calc.document import get_column
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_cell_by_position
from uitest.uihelper.calc import enter_text_to_cell
-import time
-from uitest.debug import sleep
class CalcPasteOnly(UITestCase):
diff --git a/uitest/calc_tests/data/tdf96453.ods b/sc/qa/uitest/calc_tests/data/tdf96453.ods
similarity index 100%
rename from uitest/calc_tests/data/tdf96453.ods
rename to sc/qa/uitest/calc_tests/data/tdf96453.ods
diff --git a/sc/qa/uitest/calc_tests/tdf133855.py b/sc/qa/uitest/calc_tests/tdf133855.py
index 6b5d38e6a7c4..a48701d26e4c 100644
--- a/sc/qa/uitest/calc_tests/tdf133855.py
+++ b/sc/qa/uitest/calc_tests/tdf133855.py
@@ -7,10 +7,11 @@
from uitest.framework import UITestCase
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf133855(UITestCase):
diff --git a/sc/qa/uitest/calc_tests2/tdf37623.py b/sc/qa/uitest/calc_tests2/tdf37623.py
index cd976269cf30..d129cc3d0f1d 100644
--- a/sc/qa/uitest/calc_tests2/tdf37623.py
+++ b/sc/qa/uitest/calc_tests2/tdf37623.py
@@ -7,7 +7,6 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
from libreoffice.calc.document import get_cell_by_position
-from uitest.path import get_srcdir_url
from libreoffice.uno.propertyvalue import mkPropertyValues
import org.libreoffice.unotest
import pathlib
@@ -37,4 +36,4 @@ class tdf37623(UITestCase):
self.assertEqual(get_cell_by_position(document, 0, 0, 5).getValue(), 3)
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/calc_tests3/tdf68290.py b/sc/qa/uitest/calc_tests3/tdf68290.py
index b186efa8897b..6edb2c480720 100644
--- a/sc/qa/uitest/calc_tests3/tdf68290.py
+++ b/sc/qa/uitest/calc_tests3/tdf68290.py
@@ -6,15 +6,16 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
-from uitest.debug import sleep
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
+import org.libreoffice.unotest
+import pathlib
+
#Enhancement: EDITING: cursor moves with Enter key
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf68290(UITestCase):
diff --git a/sc/qa/uitest/calc_tests4/tdf131170.py b/sc/qa/uitest/calc_tests4/tdf131170.py
index 726796936270..e05a7052a902 100644
--- a/sc/qa/uitest/calc_tests4/tdf131170.py
+++ b/sc/qa/uitest/calc_tests4/tdf131170.py
@@ -6,10 +6,11 @@
#
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf131170(UITestCase):
def test_DefineLabelRange(self):
diff --git a/sc/qa/uitest/calc_tests4/tdf85403.py b/sc/qa/uitest/calc_tests4/tdf85403.py
index e82835fc375c..c2093a320f87 100644
--- a/sc/qa/uitest/calc_tests4/tdf85403.py
+++ b/sc/qa/uitest/calc_tests4/tdf85403.py
@@ -12,7 +12,7 @@ from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
import org.libreoffice.unotest
import pathlib
-from uitest.path import get_srcdir_url
+
#Bug 85403 - no broadcast after text to columns to convert text to numbers
def get_url_for_data_file(file_name):
return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
@@ -40,4 +40,4 @@ class tdf85403(UITestCase):
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py
index 9ff7c385ab63..1aef34d7e327 100644
--- a/sc/qa/uitest/calc_tests4/trackedChanges.py
+++ b/sc/qa/uitest/calc_tests4/trackedChanges.py
@@ -6,17 +6,16 @@
# tests for tracked changes ; tdf912270
from uitest.framework import UITestCase
-from uitest.debug import sleep
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.calc import enter_text_to_cell
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
import datetime
-
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class CalcTrackedChanges(UITestCase):
diff --git a/sc/qa/uitest/calc_tests6/tdf121263.py b/sc/qa/uitest/calc_tests6/tdf121263.py
index cb66c5772a81..70466bbf81ab 100644
--- a/sc/qa/uitest/calc_tests6/tdf121263.py
+++ b/sc/qa/uitest/calc_tests6/tdf121263.py
@@ -9,11 +9,8 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
from libreoffice.calc.document import get_column
-from uitest.path import get_srcdir_url
from uitest.uihelper.common import get_state_as_dict
from libreoffice.calc.document import get_cell_by_position
-import time
-from uitest.debug import sleep
class tdf121263(UITestCase):
diff --git a/sc/qa/uitest/calc_tests8/navigator.py b/sc/qa/uitest/calc_tests8/navigator.py
index 56bb2b789744..360a2c47e058 100644
--- a/sc/qa/uitest/calc_tests8/navigator.py
+++ b/sc/qa/uitest/calc_tests8/navigator.py
@@ -6,10 +6,11 @@
from uitest.framework import UITestCase
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class navigator(UITestCase):
diff --git a/sc/qa/uitest/calc_tests8/tdf119343.py b/sc/qa/uitest/calc_tests8/tdf119343.py
index 82c0e11b4d39..693b2b1b9520 100644
--- a/sc/qa/uitest/calc_tests8/tdf119343.py
+++ b/sc/qa/uitest/calc_tests8/tdf119343.py
@@ -10,12 +10,11 @@ from uitest.uihelper.common import select_pos
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
-from uitest.debug import sleep
from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
import org.libreoffice.unotest
import pathlib
-from uitest.path import get_srcdir_url
+
def get_url_for_data_file(file_name):
return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
diff --git a/sc/qa/uitest/chart/tdf129587.py b/sc/qa/uitest/chart/tdf129587.py
index c4fdf5889bc4..b7db4ef89a29 100644
--- a/sc/qa/uitest/chart/tdf129587.py
+++ b/sc/qa/uitest/chart/tdf129587.py
@@ -8,10 +8,11 @@ from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
from uitest.uihelper.common import select_pos
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf129587(UITestCase):
def test_tdf129587(self):
diff --git a/sc/qa/uitest/conditional_format/tdf96453.py b/sc/qa/uitest/conditional_format/tdf96453.py
index 696fff87da3f..783a9b660206 100644
--- a/sc/qa/uitest/conditional_format/tdf96453.py
+++ b/sc/qa/uitest/conditional_format/tdf96453.py
@@ -6,17 +6,14 @@
#
from uitest.framework import UITestCase
-
-import os
-
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
-
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class ConditionalFormatDlgTest(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/data/tdf132783.ods b/sc/qa/uitest/search_replace/data/tdf132783.ods
similarity index 100%
rename from sc/qa/uitest/calc_tests/data/tdf132783.ods
rename to sc/qa/uitest/search_replace/data/tdf132783.ods
diff --git a/sc/qa/uitest/search_replace/replace.py b/sc/qa/uitest/search_replace/replace.py
index ae28348be22f..29f00e81204e 100644
--- a/sc/qa/uitest/search_replace/replace.py
+++ b/sc/qa/uitest/search_replace/replace.py
@@ -6,17 +6,14 @@
#
from uitest.framework import UITestCase
-from uitest.path import get_srcdir_url
-
from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_row
-
from uitest.uihelper.common import get_state_as_dict
-
-import time
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/search_replace/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class ReplaceTest(UITestCase):
diff --git a/sc/qa/uitest/search_replace/tdf132783.py b/sc/qa/uitest/search_replace/tdf132783.py
index 097eaa8c2f9d..588aafbb12de 100644
--- a/sc/qa/uitest/search_replace/tdf132783.py
+++ b/sc/qa/uitest/search_replace/tdf132783.py
@@ -7,10 +7,11 @@
from uitest.framework import UITestCase
from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.path import get_srcdir_url
+import org.libreoffice.unotest
+import pathlib
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf132783(UITestCase):
More information about the Libreoffice-commits
mailing list