Skip to content

Commit b769434

Browse files
committed
add steps to copy and paste virtual files
1 parent 2bf927b commit b769434

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

test/gui/shared/steps/file_context.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from pageObjects.AccountSetting import AccountSetting
1010

11-
from helpers.SetupClientHelper import getResourcePath
11+
from helpers.SetupClientHelper import getResourcePath, getTempResourcePath
1212
from helpers.SyncHelper import waitForClientToBeReady
1313
from helpers.ConfigHelper import get_config, isWindows
1414
from helpers.FilesHelper import (
@@ -347,3 +347,11 @@ def step(context, username, zip_file_name):
347347
destination_dir = getResourcePath('/', username)
348348
zip_file_path = join(destination_dir, zip_file_name)
349349
extractZip(zip_file_path, destination_dir)
350+
351+
352+
@When('user "|any|" copies file "|any|" to temp folder')
353+
def step(context, username, source):
354+
waitForClientToBeReady()
355+
source_dir = getResourcePath(source, username)
356+
destination_dir = getTempResourcePath(source)
357+
shutil.copy2(source_dir, destination_dir)

test/gui/tst_vfs/test.feature

+15
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,18 @@ Feature: Enable/disable virtual file support
3232
And the placeholder of file "folder1/lorem.txt" should exist on the file system
3333
And the file "testFile.txt" should be downloaded
3434
And the file "folder2/lorem.txt" should be downloaded
35+
36+
37+
Scenario: Copy and paste virtual file
38+
Given user "Alice" has been created on the server with default attributes and without skeleton files
39+
And user "Alice" has uploaded file with content "test file" to "textfile.txt" in the server
40+
And user "Alice" has set up a client with default settings
41+
When user "Alice" creates a file "localFile.txt" with the following content inside the sync folder
42+
"""
43+
test content
44+
"""
45+
And the user waits for the files to sync
46+
Then the file "localFile.txt" should be downloaded
47+
And as "Alice" file "localFile.txt" should exist in the server
48+
When user "Alice" copies file "textfile.txt" to temp folder
49+
Then the file "textfile.txt" should be downloaded

0 commit comments

Comments
 (0)