Skip to content

Commit

Permalink
Merge pull request #35536 from HariBhandari07/stable10-skeleton-webui…
Browse files Browse the repository at this point in the history
…-upload

[stable10] file upload in webui without skeleton
  • Loading branch information
phil-davis authored Jun 15, 2019
2 parents 27d2970 + b0c4690 commit 19342ee
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 14 deletions.
41 changes: 33 additions & 8 deletions tests/acceptance/features/webUIUpload/upload.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Feature: File Upload
So that I can store files in ownCloud

Background:
Given user "user1" has been created with default attributes and skeleton files
And user "user1" has logged in using the webUI
Given user "user1" has been created with default attributes and without skeleton files

@smokeTest
Scenario: simple upload of a file that does not exist before
Given user "user1" has logged in using the webUI
When the user uploads file "new-lorem.txt" using the webUI
Then no notification should be displayed on the webUI
And file "new-lorem.txt" should be listed on the webUI
Expand All @@ -19,6 +19,7 @@ Feature: File Upload
@smokeTest
Scenario: chunking upload
Given a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally
And user "user1" has logged in using the webUI
When the user uploads file "big-video.mp4" using the webUI
Then no notification should be displayed on the webUI
And file "big-video.mp4" should be listed on the webUI
Expand All @@ -27,12 +28,16 @@ Feature: File Upload
@skipOnFIREFOX
Scenario: conflict with a chunked file
Given a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally
And user "user1" has uploaded file "filesForUpload/lorem.txt" to "/lorem.txt"
And user "user1" has logged in using the webUI
When the user renames file "lorem.txt" to "big-video.mp4" using the webUI
And the user uploads overwriting file "big-video.mp4" using the webUI and retries if the file is locked
Then file "big-video.mp4" should be listed on the webUI
And the content of "big-video.mp4" should be the same as the local "big-video.mp4"

Scenario: upload a new file into a sub folder
Given user "user1" has created folder "/simple-folder"
And user "user1" has logged in using the webUI
When the user opens folder "simple-folder" using the webUI
And the user uploads file "new-lorem.txt" using the webUI
Then no notification should be displayed on the webUI
Expand All @@ -41,6 +46,8 @@ Feature: File Upload

@smokeTest
Scenario: overwrite an existing file
Given user "user1" has uploaded file "filesForUpload/lorem.txt" to "/lorem.txt"
And user "user1" has logged in using the webUI
When the user uploads overwriting file "lorem.txt" using the webUI and retries if the file is locked
Then no dialog should be displayed on the webUI
And file "lorem.txt" should be listed on the webUI
Expand All @@ -49,33 +56,44 @@ Feature: File Upload

@smokeTest
Scenario: keep new and existing file
Given user "user1" has uploaded file with content "original content" to "/lorem.txt"
And user "user1" has logged in using the webUI
When the user uploads file "lorem.txt" using the webUI
And the user chooses to keep the new files in the upload dialog
And the user chooses to keep the existing files in the upload dialog
And the user chooses "Continue" in the upload dialog
Then no dialog should be displayed on the webUI
And no notification should be displayed on the webUI
And file "lorem.txt" should be listed on the webUI
And the content of "lorem.txt" should not have changed
And the content of file "lorem.txt" for user "user1" should be "original content"
And file "lorem (2).txt" should be listed on the webUI
And the content of "lorem (2).txt" should be the same as the local "lorem.txt"

Scenario: cancel conflict dialog
Given user "user1" has uploaded file with content "original content" to "/lorem.txt"
And user "user1" has logged in using the webUI
When the user uploads file "lorem.txt" using the webUI
And the user chooses "Cancel" in the upload dialog
Then no dialog should be displayed on the webUI
And no notification should be displayed on the webUI
And file "lorem.txt" should be listed on the webUI
And the content of "lorem.txt" should not have changed
And the content of file "lorem.txt" for user "user1" should be "original content"
And file "lorem (2).txt" should not be listed on the webUI

Scenario: overwrite an existing file in a sub-folder
Given user "user1" has created folder "/simple-folder"
And user "user1" has uploaded file with content "original content" to "/simple-folder/lorem.txt"
And user "user1" has logged in using the webUI
When the user opens folder "simple-folder" using the webUI
And the user uploads overwriting file "lorem.txt" using the webUI and retries if the file is locked
Then file "lorem.txt" should be listed on the webUI
And the content of "lorem.txt" should be the same as the local "lorem.txt"

Scenario: keep new and existing file in a sub-folder
Given user "user1" has created folder "/simple-folder"
And user "user1" has uploaded file with content "original content" to "/simple-folder/lorem.txt"
And user "user1" has uploaded file with content "original content" to "/lorem.txt"
And user "user1" has logged in using the webUI
When the user opens folder "simple-folder" using the webUI
And the user uploads file "lorem.txt" using the webUI
And the user chooses to keep the new files in the upload dialog
Expand All @@ -84,28 +102,35 @@ Feature: File Upload
Then no dialog should be displayed on the webUI
And no notification should be displayed on the webUI
And file "lorem.txt" should be listed on the webUI
And the content of "lorem.txt" should not have changed
And the content of file "lorem.txt" for user "user1" should be "original content"
And file "lorem (2).txt" should be listed on the webUI
And the content of "lorem (2).txt" should be the same as the local "lorem.txt"

Scenario: upload a file into a public share
Given the user has created a new public link for folder "simple-folder" using the webUI with
Given user "user1" has created folder "/simple-folder"
And user "user1" has logged in using the webUI
And the user has created a new public link for folder "simple-folder" using the webUI with
| permission | read-write |
And the public accesses the last created public link using the webUI
And the user uploads file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should be listed on the webUI
And the content of "simple-folder/new-lorem.txt" should be the same as the local "new-lorem.txt"

Scenario: upload overwriting a file into a public share
Given the user has created a new public link for folder "simple-folder" using the webUI with
Given user "user1" has created folder "/simple-folder"
And user "user1" has uploaded file "filesForUpload/lorem.txt" to "/simple-folder/lorem.txt"
And user "user1" has logged in using the webUI
And the user has created a new public link for folder "simple-folder" using the webUI with
| permission | read-write |
And the public accesses the last created public link using the webUI
And the user uploads overwriting file "lorem.txt" using the webUI and retries if the file is locked
Then file "lorem.txt" should be listed on the webUI
And the content of "simple-folder/lorem.txt" should be the same as the local "lorem.txt"

Scenario: upload a file into files_drop share
Given the user has created a new public link for folder "simple-folder" using the webUI with
Given user "user1" has created folder "/simple-folder"
And user "user1" has logged in using the webUI
And the user has created a new public link for folder "simple-folder" using the webUI with
| permission | upload |
And the public accesses the last created public link using the webUI
Then the user uploads file "lorem.txt" using the webUI
23 changes: 18 additions & 5 deletions tests/acceptance/features/webUIUpload/uploadEdgecases.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Feature: File Upload
that is not academically correct but saves a lot of time

Background:
Given user "user1" has been created with default attributes and skeleton files
And user "user1" has logged in using the webUI
Given user "user1" has been created with default attributes and without skeleton files

Scenario: simple upload of a file that does not exist before
Given user "user1" has logged in using the webUI
When the user uploads file "new-'single'quotes.txt" using the webUI
Then file "new-'single'quotes.txt" should be listed on the webUI
And the content of "new-'single'quotes.txt" should be the same as the local "new-'single'quotes.txt"
Expand All @@ -27,6 +27,8 @@ Feature: File Upload
@smokeTest
Scenario Outline: upload a new file into a sub folder
Given a file with the size of "3000" bytes and the name "0" has been created locally
And user "user1" has created folder <folder-to-upload-to>
And user "user1" has logged in using the webUI
When the user opens folder <folder-to-upload-to> using the webUI
And the user uploads file "0" using the webUI
Then file "0" should be listed on the webUI
Expand All @@ -50,6 +52,10 @@ Feature: File Upload
| "strängé नेपाली folder" |

Scenario: overwrite an existing file
Given user "user1" has uploaded file "filesForUpload/'single'quotes.txt" to "/'single'quotes.txt"
And user "user1" has uploaded file "filesForUpload/strängé filename (duplicate #2 &).txt" to "/strängé filename (duplicate #2 &).txt"
And user "user1" has uploaded file "filesForUpload/zzzz-must-be-last-file-in-folder.txt" to "/zzzz-must-be-last-file-in-folder.txt"
And user "user1" has logged in using the webUI
When the user uploads overwriting file "'single'quotes.txt" using the webUI and retries if the file is locked
Then file "'single'quotes.txt" should be listed on the webUI
And the content of "'single'quotes.txt" should be the same as the local "'single'quotes.txt"
Expand All @@ -63,26 +69,31 @@ Feature: File Upload
And the content of "zzzz-must-be-last-file-in-folder.txt" should be the same as the local "zzzz-must-be-last-file-in-folder.txt"

Scenario: keep new and existing file
Given user "user1" has uploaded file with content "single quote content" to "/'single'quotes.txt"
And user "user1" has uploaded file with content "strange content" to "/strängé filename (duplicate #2 &).txt"
And user "user1" has uploaded file with content "zzz content" to "/zzzz-must-be-last-file-in-folder.txt"
And user "user1" has logged in using the webUI
When the user uploads file "'single'quotes.txt" keeping both new and existing files using the webUI
Then file "'single'quotes.txt" should be listed on the webUI
And the content of "'single'quotes.txt" should not have changed
And the content of file "'single'quotes.txt" for user "user1" should be "single quote content"
And file "'single'quotes (2).txt" should be listed on the webUI
And the content of "'single'quotes (2).txt" should be the same as the local "'single'quotes.txt"

When the user uploads file "strängé filename (duplicate #2 &).txt" keeping both new and existing files using the webUI
Then file "strängé filename (duplicate #2 &).txt" should be listed on the webUI
And the content of "strängé filename (duplicate #2 &).txt" should not have changed
And the content of file "strängé filename (duplicate #2 &).txt" for user "user1" should be "strange content"
And file "strängé filename (duplicate #2 &) (2).txt" should be listed on the webUI
And the content of "strängé filename (duplicate #2 &) (2).txt" should be the same as the local "strängé filename (duplicate #2 &).txt"

When the user uploads file "zzzz-must-be-last-file-in-folder.txt" keeping both new and existing files using the webUI
Then file "zzzz-must-be-last-file-in-folder.txt" should be listed on the webUI
And the content of "zzzz-must-be-last-file-in-folder.txt" should not have changed
And the content of file "zzzz-must-be-last-file-in-folder.txt" for user "user1" should be "zzz content"
And file "zzzz-must-be-last-file-in-folder (2).txt" should be listed on the webUI
And the content of "zzzz-must-be-last-file-in-folder (2).txt" should be the same as the local "zzzz-must-be-last-file-in-folder.txt"

Scenario Outline: chunking upload using difficult names
Given a file with the size of "30000000" bytes and the name <file-name> has been created locally
And user "user1" has logged in using the webUI
When the user uploads file <file-name> using the webUI
Then file <file-name> should be listed on the webUI
And the content of <file-name> should be the same as the local <file-name>
Expand All @@ -94,6 +105,8 @@ Feature: File Upload
# upload into "simple-folder" because there is already a folder called "0" in the root
Scenario: Upload a file called "0" using chunking
Given a file with the size of "30000000" bytes and the name "0" has been created locally
And user "user1" has created folder "simple-folder"
And user "user1" has logged in using the webUI
When the user opens folder "simple-folder" using the webUI
And the user uploads file "0" using the webUI
Then file "0" should be listed on the webUI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Feature: Upload a file
So that I can store it in owncloud

Background:
Given user "user1" has been created with default attributes and skeleton files
Given user "user1" has been created with default attributes and without skeleton files

@smokeTest
Scenario: simple upload of a file with the size greater than the size of quota
Expand Down

0 comments on commit 19342ee

Please sign in to comment.