Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui-tests][full-ci] unskip GUI tests #11562

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion test/gui/shared/scripts/helpers/SpaceHelper.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
29 changes: 16 additions & 13 deletions test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from os import path
from helpers.SetupClientHelper import (
getCurrentUserSyncPath,
getTempResourcePath,
setCurrentUserSyncPath,
)
from helpers.ConfigHelper import get_config
Expand Down Expand Up @@ -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,
Expand All @@ -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():
Expand Down Expand Up @@ -230,21 +228,26 @@ 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),
"<Ctrl+A>",
)
squish.type(
SyncConnectionWizard.CHOOSE_LOCAL_SYNC_FOLDER,
path.join(getCurrentUserSyncPath(), spaceName),
sync_path,
)
SyncConnectionWizard.nextStep()

@staticmethod
def syncSpace(spaceName):
SyncConnectionWizard.selectSpaceToSync(spaceName)
SyncConnectionWizard.nextStep()
SyncConnectionWizard.setSyncPathInSyncConnectionWizard(spaceName)
SyncConnectionWizard.setSyncPathInSyncConnectionWizard(
path.join(getCurrentUserSyncPath(), spaceName)
)
SyncConnectionWizard.addSyncConnection()
2 changes: 1 addition & 1 deletion test/gui/shared/steps/file_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
22 changes: 19 additions & 3 deletions test/gui/shared/steps/sync_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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()
Expand All @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions test/gui/tst_sharing/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 9 additions & 6 deletions test/gui/tst_syncing/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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 "<filename>" with the following content inside the sync folder
"""
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading