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

[tests-only] [full-ci] File operations on virtual file #11466

Merged
merged 1 commit into from
Jan 31, 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
10 changes: 9 additions & 1 deletion test/gui/shared/steps/file_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from pageObjects.AccountSetting import AccountSetting

from helpers.SetupClientHelper import getResourcePath
from helpers.SetupClientHelper import getResourcePath, getTempResourcePath
from helpers.SyncHelper import waitForClientToBeReady
from helpers.ConfigHelper import get_config, isWindows
from helpers.FilesHelper import (
Expand Down Expand Up @@ -347,3 +347,11 @@ def step(context, username, zip_file_name):
destination_dir = getResourcePath('/', username)
zip_file_path = join(destination_dir, zip_file_name)
extractZip(zip_file_path, destination_dir)


@When('user "|any|" copies file "|any|" to temp folder')
def step(context, username, source):
waitForClientToBeReady()
source_dir = getResourcePath(source, username)
destination_dir = getTempResourcePath(source)
shutil.copy2(source_dir, destination_dir)
15 changes: 15 additions & 0 deletions test/gui/tst_vfs/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,18 @@ Feature: Enable/disable virtual file support
And the placeholder of file "folder1/lorem.txt" should exist on the file system
And the file "testFile.txt" should be downloaded
And the file "folder2/lorem.txt" should be downloaded


Scenario: Copy and paste virtual file
Given user "Alice" has been created on the server with default attributes and without skeleton files
And user "Alice" has uploaded file with content "test file" to "textfile.txt" in the server
And user "Alice" has set up a client with default settings
When user "Alice" creates a file "localFile.txt" with the following content inside the sync folder
"""
test content
"""
And the user waits for the files to sync
Then the file "localFile.txt" should be downloaded
And as "Alice" file "localFile.txt" should exist in the server
When user "Alice" copies file "textfile.txt" to temp folder
Then the file "textfile.txt" should be downloaded
Loading