Skip to content

Commit

Permalink
review address
Browse files Browse the repository at this point in the history
Signed-off-by: nabim777 <[email protected]>
  • Loading branch information
nabim777 committed Dec 13, 2024
1 parent 40228e9 commit 0d84e32
Show file tree
Hide file tree
Showing 4 changed files with 342 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/acceptance/bootstrap/SpacesTUSContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function userUploadsAFileViaTusInsideOfTheSpaceUsingTheWebdavApi(
}

/**
* @When the public uploads a file from :source to :destination via TUS inside last link shared folder with password :password using the WebDAV API
* @When the public uploads file :source to :destination via TUS inside last link shared folder with password :password using the WebDAV API
*
* @param string $source
* @param string $destination
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/bootstrap/TUSContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ public function uploadFileUsingTus(
* @return void
*/
public function publicUploadFileUsingTus(
string $source,
string $destination,
string $source,
string $destination,
string $password,
):void {
): void {
$password = $this->featureContext->getActualPassword($password);
if ($this->featureContext->isUsingSharingNG()) {
$token = $this->featureContext->shareNgGetLastCreatedLinkShareToken();
Expand Down
335 changes: 335 additions & 0 deletions tests/acceptance/config/behat-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
default:
autoload:
"": "%paths.base%/../features/bootstrap"
suites:
coreApiMain:
paths:
- "%paths.base%/../features/coreApiMain"
context: &common_ldap_suite_context
parameters:
ldapAdminPassword: admin
ldapUsersOU: TestUsers
ldapGroupsOU: TestGroups
ldapInitialUserFilePath: /../../config/ldap-users.ldif
contexts:
- FeatureContext: &common_feature_context_params
baseUrl: http://localhost:8080
adminUsername: admin
adminPassword: admin
regularUserPassword: 123456
ocPath: apps/testing/api/v1/occ
- ChecksumContext:
- FilesVersionsContext:
- TrashbinContext:
- CapabilitiesContext:
- SharingNgContext:

coreApiAuth:
paths:
- "%paths.base%/../features/coreApiAuth"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SearchContext:
- PublicWebDavContext:
- WebDavPropertiesContext:
- AuthContext:

coreApiCapabilities:
paths:
- "%paths.base%/../features/coreApiCapabilities"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- CapabilitiesContext:

coreApiFavorites:
paths:
- "%paths.base%/../features/coreApiFavorites"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SpacesContext:
- FavoritesContext:
- WebDavPropertiesContext:
- SharingNgContext:

coreApiShareCreateSpecialToShares1:
paths:
- "%paths.base%/../features/coreApiShareCreateSpecialToShares1"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:

coreApiShareCreateSpecialToShares2:
paths:
- "%paths.base%/../features/coreApiShareCreateSpecialToShares2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:
- SharingNgContext:

coreApiSharees:
paths:
- "%paths.base%/../features/coreApiSharees"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- ShareesContext:
- OcisConfigContext:

coreApiShareManagementToShares:
paths:
- "%paths.base%/../features/coreApiShareManagementToShares"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SpacesContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- FilesVersionsContext:
- SettingsContext:
- SharingNgContext:

coreApiShareManagementBasicToShares:
paths:
- "%paths.base%/../features/coreApiShareManagementBasicToShares"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- AuthContext:
- SharingNgContext:
- TUSContext:

coreApiShareOperationsToShares1:
paths:
- "%paths.base%/../features/coreApiShareOperationsToShares1"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- SettingsContext:
- SharingNgContext:

coreApiShareOperationsToShares2:
paths:
- "%paths.base%/../features/coreApiShareOperationsToShares2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- SharingNgContext:

coreApiSharePublicLink1:
paths:
- "%paths.base%/../features/coreApiSharePublicLink1"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- SharingNgContext:
- WebDavPropertiesContext:
- OcisConfigContext:

coreApiSharePublicLink2:
paths:
- "%paths.base%/../features/coreApiSharePublicLink2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- OcisConfigContext:
- SharingNgContext:

coreApiShareUpdateToShares:
paths:
- "%paths.base%/../features/coreApiShareUpdateToShares"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
- SharingNgContext:

coreApiTrashbin:
paths:
- "%paths.base%/../features/coreApiTrashbin"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:
- SharingNgContext:

coreApiTrashbinRestore:
paths:
- "%paths.base%/../features/coreApiTrashbinRestore"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:

coreApiVersions:
paths:
- "%paths.base%/../features/coreApiVersions"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- ChecksumContext:
- FilesVersionsContext:
- WebDavPropertiesContext:
- TrashbinContext:
- SharingNgContext:

coreApiWebdavDelete:
paths:
- "%paths.base%/../features/coreApiWebdavDelete"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SearchContext:
- PublicWebDavContext:
- WebDavPropertiesContext:
- TrashbinContext:

coreApiWebdavLocks:
paths:
- "%paths.base%/../features/coreApiWebdavLocks"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- WebDavLockingContext:
- WebDavPropertiesContext:

coreApiWebdavLocks2:
paths:
- "%paths.base%/../features/coreApiWebdavLocks2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- WebDavLockingContext:
- WebDavPropertiesContext:

coreApiWebdavMove1:
paths:
- "%paths.base%/../features/coreApiWebdavMove1"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- WebDavPropertiesContext:
- TrashbinContext:

coreApiWebdavMove2:
paths:
- "%paths.base%/../features/coreApiWebdavMove2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SharingNgContext:
- WebDavPropertiesContext:
- FilesVersionsContext:
- TrashbinContext:

coreApiWebdavOperations:
paths:
- "%paths.base%/../features/coreApiWebdavOperations"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SearchContext:
- PublicWebDavContext:
- SharingNgContext:
- WebDavPropertiesContext:
- TrashbinContext:
- OcisConfigContext:

coreApiWebdavPreviews:
paths:
- "%paths.base%/../features/coreApiWebdavPreviews"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SharingNgContext:
- WebDavPropertiesContext:

coreApiWebdavProperties:
paths:
- "%paths.base%/../features/coreApiWebdavProperties"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SharingNgContext:
- WebDavPropertiesContext:

coreApiWebdavUpload:
paths:
- "%paths.base%/../features/coreApiWebdavUpload"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- WebDavPropertiesContext:
- SharingNgContext:

coreApiWebdavUploadTUS:
paths:
- "%paths.base%/../features/coreApiWebdavUploadTUS"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TUSContext:
- FilesVersionsContext:
- ChecksumContext:
- SharingNgContext:

coreApiWebdavEtagPropagation1:
paths:
- "%paths.base%/../features/coreApiWebdavEtagPropagation1"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- PublicWebDavContext:
- FilesVersionsContext:
- SharingNgContext:
- WebDavPropertiesContext:

coreApiWebdavEtagPropagation2:
paths:
- "%paths.base%/../features/coreApiWebdavEtagPropagation2"
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- PublicWebDavContext:
- FilesVersionsContext:
- SharingNgContext:
- WebDavPropertiesContext:
- OcisConfigContext:

extensions:
rdx\behatvars\BehatVariablesExtension: ~

Cjm\Behat\StepThroughExtension: ~
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ Feature: upload resources on share using TUS protocol
| space | Personal |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
And for user "Alice" folder "uploadFolder" of the space "Personal" should contain these files:
| textfile.txt |
And for user "Alice" folder "uploadFolder" of the space "Personal" should not contain these files:
Expand All @@ -429,7 +429,7 @@ Feature: upload resources on share using TUS protocol
| space | Project |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
And for user "Alice" folder "uploadFolder" of the space "Project" should contain these files:
| textfile.txt |
And for user "Alice" folder "uploadFolder" of the space "Project" should not contain these files:
Expand All @@ -444,7 +444,7 @@ Feature: upload resources on share using TUS protocol
| space | Project |
| permissionsRole | createOnly |
| password | %public% |
When the public uploads a file from "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
When the public uploads file "filesForUpload/zerobyte.txt" to "textfile.txt" via TUS inside last link shared folder with password "%public%" using the WebDAV API
Then for user "Alice" the space "Project" should contain these files:
| textfile.txt |
And for user "Alice" the space "Project" should not contain these files:
Expand Down

0 comments on commit 0d84e32

Please sign in to comment.