diff --git a/test/gui/shared/steps/file_context.py b/test/gui/shared/steps/file_context.py index 0c41dc93d8c..e8c1aabb35b 100644 --- a/test/gui/shared/steps/file_context.py +++ b/test/gui/shared/steps/file_context.py @@ -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 ( @@ -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) diff --git a/test/gui/tst_vfs/test.feature b/test/gui/tst_vfs/test.feature index 0ccdab4c75f..34d93cab427 100644 --- a/test/gui/tst_vfs/test.feature +++ b/test/gui/tst_vfs/test.feature @@ -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