sc/qa/uitest/calc_tests7/save_readonly_with_password.py |    6 +++---
 sc/qa/uitest/calc_tests8/tdf147086.py                   |    3 ++-
 sc/qa/uitest/calc_tests9/tdf115933.py                   |    3 ++-
 sc/qa/uitest/calc_tests9/tdf118938.py                   |    3 ++-
 sc/qa/uitest/calc_tests9/tdf144996.py                   |    6 +++---
 5 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit 8e3f6b9fd6915a20c8c9f5195e5ac5a7e085920a
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Mon Sep 18 17:05:56 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Fri Oct 6 17:37:18 2023 +0200

    uitest: add "Silent" property parameter
    
    add option to not popup the read-only dialog when
    load and excel file.
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I5e0ac06e3e872f156f6150f4b8bead61e7986c25
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157036
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157641
    Tested-by: Jenkins

diff --git a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py 
b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
index 311293815398..c7d2f829e32c 100644
--- a/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
+++ b/sc/qa/uitest/calc_tests7/save_readonly_with_password.py
@@ -8,6 +8,7 @@
 #
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
 from org.libreoffice.unotest import systemPathToFileUrl
 from uitest.uihelper.common import select_by_text
 from tempfile import TemporaryDirectory
@@ -46,8 +47,7 @@ class save_readonly_with_password(UITestCase):
                         with self.ui_test.execute_dialog_through_action(xOk, 
"CLICK", close_button="save"):
                             pass
 
-            with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
-
+            with self.ui_test.load_file(systemPathToFileUrl(xFilePath), 
[PropertyValue(Name="Silent", Value=True)]) as document:
                 self.assertTrue(document.isReadonly())
 
                 with 
self.ui_test.execute_dialog_through_command(".uno:EditDoc") as xDialog:
@@ -80,7 +80,7 @@ class save_readonly_with_password(UITestCase):
                         xConfirmPassword = 
xPasswordDialog.getChild("confirmropassEntry")
                         xConfirmPassword.executeAction("TYPE", 
mkPropertyValues({"TEXT": "password"}))
 
-            with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+            with self.ui_test.load_file(systemPathToFileUrl(xFilePath), 
[PropertyValue(Name="Silent", Value=True)]) as document:
 
                 self.assertTrue(document.isReadonly())
 
diff --git a/sc/qa/uitest/calc_tests8/tdf147086.py 
b/sc/qa/uitest/calc_tests8/tdf147086.py
index 906f79075b59..1be3d6adb276 100755
--- a/sc/qa/uitest/calc_tests8/tdf147086.py
+++ b/sc/qa/uitest/calc_tests8/tdf147086.py
@@ -8,6 +8,7 @@
 #
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
 from org.libreoffice.unotest import systemPathToFileUrl
 from uitest.uihelper.common import select_by_text
 from tempfile import TemporaryDirectory
@@ -44,7 +45,7 @@ class tdf147086(UITestCase):
                         with self.ui_test.execute_dialog_through_action(xOk, 
"CLICK", close_button="save"):
                             pass
 
-            with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
document:
+            with self.ui_test.load_file(systemPathToFileUrl(xFilePath), 
[PropertyValue(Name="Silent", Value=True)]) as document:
 
                 self.assertTrue(document.isReadonly())
 
diff --git a/sc/qa/uitest/calc_tests9/tdf115933.py 
b/sc/qa/uitest/calc_tests9/tdf115933.py
index 0fe7fec06758..128b80652e47 100644
--- a/sc/qa/uitest/calc_tests9/tdf115933.py
+++ b/sc/qa/uitest/calc_tests9/tdf115933.py
@@ -8,6 +8,7 @@
 #
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_url_for_data_file
+from com.sun.star.beans import PropertyValue
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 #Bug 115933 - XLSX <fileSharing> password protected with algorithmName, 
hashValue, saltValue and spinCount
@@ -15,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 class tdf115933(UITestCase):
 
     def test_tdf115933(self):
-        with self.ui_test.load_file(get_url_for_data_file("tdf115933.xlsx")):
+        with self.ui_test.load_file(get_url_for_data_file("tdf115933.xlsx"), 
[PropertyValue(Name="Silent", Value=True)]):
             #The document was created in Excel.
             calcDoc = self.xUITest.getTopFocusWindow()
             gridwin = calcDoc.getChild("grid_window")
diff --git a/sc/qa/uitest/calc_tests9/tdf118938.py 
b/sc/qa/uitest/calc_tests9/tdf118938.py
index eede90451e67..33f8cde75d82 100644
--- a/sc/qa/uitest/calc_tests9/tdf118938.py
+++ b/sc/qa/uitest/calc_tests9/tdf118938.py
@@ -9,6 +9,7 @@
 from uitest.framework import UITestCase
 from uitest.uihelper.common import get_url_for_data_file
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from com.sun.star.beans import PropertyValue
 
 #Bug 118938 - FILESAVE to Microsoft Excel 2007-2013 XML (.xlsx) files as 
read-only
 #             with additional password protection for editing not working 
(Calc)
@@ -16,7 +17,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
 class tdf118938(UITestCase):
 
     def test_tdf118938(self):
-        with self.ui_test.load_file(get_url_for_data_file("tdf118938.xlsx")):
+        with self.ui_test.load_file(get_url_for_data_file("tdf118938.xlsx"), 
[PropertyValue(Name="Silent", Value=True)]):
             #The document was created in Calc after this fix.
             document = self.ui_test.get_component()
 
diff --git a/sc/qa/uitest/calc_tests9/tdf144996.py 
b/sc/qa/uitest/calc_tests9/tdf144996.py
index eabd61ddb117..fcfb366feb8a 100644
--- a/sc/qa/uitest/calc_tests9/tdf144996.py
+++ b/sc/qa/uitest/calc_tests9/tdf144996.py
@@ -10,7 +10,7 @@ from uitest.framework import UITestCase
 from uitest.uihelper.common import get_url_for_data_file
 
 from libreoffice.uno.propertyvalue import mkPropertyValues
-
+from com.sun.star.beans import PropertyValue
 
 class tdf144996(UITestCase):
 
@@ -20,7 +20,7 @@ class tdf144996(UITestCase):
         # so using save doesn't affect the original file
         xFilePath = get_url_for_data_file("tdf144996.xlsx")
 
-        with self.ui_test.load_file(xFilePath) as document:
+        with self.ui_test.load_file(xFilePath, [PropertyValue(Name="Silent", 
Value=True)]) as document:
 
             self.assertTrue(document.isReadonly())
 
@@ -34,7 +34,7 @@ class tdf144996(UITestCase):
                 # Confirm file format popup
                 pass
 
-        with self.ui_test.load_file(xFilePath) as document:
+        with self.ui_test.load_file(xFilePath, [PropertyValue(Name="Silent", 
Value=True)]) as document:
 
             self.assertTrue(document.isReadonly())
 

Reply via email to