diff --git a/test/gui/shared/scripts/helpers/SpaceHelper.py b/test/gui/shared/scripts/helpers/SpaceHelper.py index a31aa6ccada..e8e56b1c1f2 100644 --- a/test/gui/shared/scripts/helpers/SpaceHelper.py +++ b/test/gui/shared/scripts/helpers/SpaceHelper.py @@ -1,6 +1,5 @@ import json from urllib import parse -from os import path from helpers.ConfigHelper import get_config from helpers.api.utils import url_join diff --git a/test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py b/test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py index 7b9498ae69e..14c2edb11a7 100644 --- a/test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py +++ b/test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py @@ -3,7 +3,6 @@ from os import path from helpers.SetupClientHelper import ( getCurrentUserSyncPath, - getTempResourcePath, setCurrentUserSyncPath, ) from helpers.ConfigHelper import get_config @@ -78,13 +77,12 @@ class SyncConnectionWizard: } @staticmethod - def setSyncPathInSyncConnectionWizardOc10(folderName=''): + def setSyncPathInSyncConnectionWizardOc10(sync_path=''): squish.waitForObject(SyncConnectionWizard.ADD_FOLDER_SYNC_CONNECTION_WIZARD) squish.waitForObject(SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER).setText("") - if folderName: - currentSyncPath = getTempResourcePath(folderName) - squish.type(SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER, currentSyncPath) - setCurrentUserSyncPath(currentSyncPath) + if sync_path: + squish.type(SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER, sync_path) + setCurrentUserSyncPath(sync_path) else: squish.type( SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER, @@ -93,11 +91,11 @@ def setSyncPathInSyncConnectionWizardOc10(folderName=''): SyncConnectionWizard.nextStep() @staticmethod - def setSyncPathInSyncConnectionWizard(folderName=''): + def setSyncPathInSyncConnectionWizard(sync_path=''): if get_config('ocis'): - SyncConnectionWizard.setSyncPathInSyncConnectionWizardOcis(folderName) + SyncConnectionWizard.setSyncPathInSyncConnectionWizardOcis(sync_path) else: - SyncConnectionWizard.setSyncPathInSyncConnectionWizardOc10(folderName) + SyncConnectionWizard.setSyncPathInSyncConnectionWizardOc10(sync_path) @staticmethod def nextStep(): @@ -230,15 +228,18 @@ def selectSpaceToSync(spaceName): ) @staticmethod - def setSyncPathInSyncConnectionWizardOcis(spaceName): - # override the default sync path + def setSyncPathInSyncConnectionWizardOcis(sync_path): + if not sync_path: + sync_path = path.join( + getCurrentUserSyncPath(), get_config("syncConnectionName") + ) squish.type( squish.waitForObject(SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER), "", ) squish.type( SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER, - path.join(getCurrentUserSyncPath(), spaceName), + sync_path, ) SyncConnectionWizard.nextStep() @@ -246,5 +247,7 @@ def setSyncPathInSyncConnectionWizardOcis(spaceName): def syncSpace(spaceName): SyncConnectionWizard.selectSpaceToSync(spaceName) SyncConnectionWizard.nextStep() - SyncConnectionWizard.setSyncPathInSyncConnectionWizard(spaceName) + SyncConnectionWizard.setSyncPathInSyncConnectionWizard( + path.join(getCurrentUserSyncPath(), spaceName) + ) SyncConnectionWizard.addSyncConnection() diff --git a/test/gui/shared/steps/file_context.py b/test/gui/shared/steps/file_context.py index 9205a3de153..e1632cdd06b 100644 --- a/test/gui/shared/steps/file_context.py +++ b/test/gui/shared/steps/file_context.py @@ -10,7 +10,7 @@ from helpers.SetupClientHelper import getResourcePath, getTempResourcePath from helpers.SyncHelper import waitForClientToBeReady -from helpers.ConfigHelper import get_config, isWindows +from helpers.ConfigHelper import get_config from helpers.FilesHelper import ( buildConflictedRegex, sanitizePath, diff --git a/test/gui/shared/steps/sync_context.py b/test/gui/shared/steps/sync_context.py index 5841287c718..b0674d32662 100644 --- a/test/gui/shared/steps/sync_context.py +++ b/test/gui/shared/steps/sync_context.py @@ -4,11 +4,12 @@ from pageObjects.Activity import Activity from pageObjects.Settings import Settings -from helpers.ConfigHelper import get_config, isWindows +from helpers.ConfigHelper import get_config, isWindows, set_config from helpers.SyncHelper import ( waitForFileOrFolderToSync, waitForFileOrFolderToHaveSyncError, ) +from helpers.SetupClientHelper import getTempResourcePath, setCurrentUserSyncPath @Given('the user has paused the file sync') @@ -144,6 +145,14 @@ def step(context): rowIndex += 1 +@When('the user selects "|any|" space in sync connection wizard') +def step(context, space_name): + if get_config("ocis"): + SyncConnectionWizard.selectSpaceToSync(space_name) + SyncConnectionWizard.nextStep() + set_config('syncConnectionName', space_name) + + @When('the user sets the sync path in sync connection wizard') def step(context): SyncConnectionWizard.setSyncPathInSyncConnectionWizard() @@ -153,12 +162,19 @@ def step(context): 'the user sets the temp folder "|any|" as local sync path in sync connection wizard' ) def step(context, folderName): - SyncConnectionWizard.setSyncPathInSyncConnectionWizard(folderName) + sync_path = getTempResourcePath(folderName) + SyncConnectionWizard.setSyncPathInSyncConnectionWizard(sync_path) + if get_config("ocis"): + # empty connection name when using temporary locations + set_config('syncConnectionName', '') + setCurrentUserSyncPath(sync_path) @When('the user selects "|any|" as a remote destination folder') def step(context, folderName): - SyncConnectionWizard.selectRemoteDestinationFolder(folderName) + # There's no remote destination section with oCIS server + if not get_config("ocis"): + SyncConnectionWizard.selectRemoteDestinationFolder(folderName) @When('the user syncs the "|any|" space') diff --git a/test/gui/tst_sharing/test.feature b/test/gui/tst_sharing/test.feature index 442f1586e68..98d456dad84 100644 --- a/test/gui/tst_sharing/test.feature +++ b/test/gui/tst_sharing/test.feature @@ -325,7 +325,7 @@ Feature: Sharing And as "Alice" folder "PARENT" should not exist in the server And as "Alice" file "lorem.txt" should not exist in the server - @issue-9439 @issue-11102 @skip + @issue-9439 @issue-11102 Scenario: sharee deletes a file and folder shared by sharer Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile.txt" in the server And user "Alice" has created folder "Folder" in the server @@ -341,7 +341,7 @@ Feature: Sharing And as "Alice" file "textfile.txt" on the server should exist And as "Alice" folder "Folder" on the server should exist - @issue-11102 @skip + @issue-11102 Scenario: sharee tries to delete shared file and folder without permissions Given user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile.txt" in the server And user "Alice" has created folder "Folder" in the server diff --git a/test/gui/tst_syncing/test.feature b/test/gui/tst_syncing/test.feature index ef8c66a724f..c78848301ec 100644 --- a/test/gui/tst_syncing/test.feature +++ b/test/gui/tst_syncing/test.feature @@ -54,7 +54,7 @@ Feature: Syncing files client content """ - @skipOnOCIS + Scenario: Sync all is selected by default Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has created folder "large-folder" in the server @@ -66,6 +66,7 @@ Feature: Syncing files | user | Alice | | password | 1234 | When the user selects manual sync folder option in advanced section + And the user selects "Personal" space in sync connection wizard And the user sets the sync path in sync connection wizard And the user selects "ownCloud" as a remote destination folder And the user disables VFS support for Windows @@ -78,7 +79,7 @@ Feature: Syncing files But the folder "simple-folder" should not exist on the file system And the folder "large-folder" should not exist on the file system - @skipOnOCIS + Scenario: Sync only one folder from the server Given user "Alice" has created folder "simple-folder" in the server And user "Alice" has created folder "large-folder" in the server @@ -88,6 +89,7 @@ Feature: Syncing files | user | Alice | | password | 1234 | When the user selects manual sync folder option in advanced section + And the user selects "Personal" space in sync connection wizard And the user sets the sync path in sync connection wizard And the user selects "ownCloud" as a remote destination folder And the user disables VFS support for Windows @@ -111,7 +113,7 @@ Feature: Syncing files Then as "Alice" folder "simple-folder" should not exist in the server - @issue-9733 @skipOnOCIS + @issue-9733 Scenario: sort folders list by name and size Given user "Alice" has created folder "123Folder" in the server And user "Alice" has uploaded file on the server with content "small" to "123Folder/lorem.txt" @@ -124,6 +126,7 @@ Feature: Syncing files | user | Alice | | password | 1234 | When the user selects manual sync folder option in advanced section + And the user selects "Personal" space in sync connection wizard And the user sets the sync path in sync connection wizard And the user selects "ownCloud" as a remote destination folder And the user disables VFS support for Windows @@ -358,8 +361,8 @@ Feature: Syncing files | filename | | thisIsAVeryLongFileNameToCheckThatItWorks-thisIsAVeryLongFileNameToCheckThatItWorks-thisIsAVeryLongFileNameToCheckThatItWorks-thisIsAVeryLongFileNameToCheckThatItWorks-thisIsAVeryLongFileNameToCheckThatItWorks-thisIs.txt | - @skipOnOCIS @issue-11104 @skip - Scenario Outline: File with long name (233 characters) is blacklisted + @skipOnOCIS @issue-11104 + Scenario Outline: File with long name (233 characters) is blacklisted (oC10) Given user "Alice" has set up a client with default settings When user "Alice" creates a file "" with the following content inside the sync folder """ @@ -435,7 +438,6 @@ Feature: Syncing files And as "Alice" the file "file2.txt" should have the content "Test file2" in the server - @skipOnOCIS Scenario: sync remote folder to a local sync folder having special characters Given user "Alice" has created folder "~`!@#$^&()-_=+{[}];',)" in the server And user "Alice" has created folder "simple-folder" in the server @@ -450,6 +452,7 @@ Feature: Syncing files | user | Alice | | password | 1234 | When the user selects manual sync folder option in advanced section + And the user selects "Personal" space in sync connection wizard And the user sets the temp folder "~`!@#$^&()-_=+{[}];',)PRN%" as local sync path in sync connection wizard And the user selects "ownCloud" as a remote destination folder And the user disables VFS support for Windows