Skip to content

Commit

Permalink
move properties related methods into own context
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Jan 11, 2019
1 parent f70bea4 commit 49a8363
Show file tree
Hide file tree
Showing 4 changed files with 485 additions and 316 deletions.
37 changes: 37 additions & 0 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,61 @@ default:
- ChecksumContext:
- FilesVersionsContext:
- TransferOwnershipContext:
- WebDavPropertiesContext:

apiCapabilities:
paths:
- '%paths.base%/../features/apiCapabilities'
contexts:
- FeatureContext: *common_feature_context_params
- CapabilitiesContext:
- WebDavPropertiesContext:

apiComments:
paths:
- '%paths.base%/../features/apiComments'
contexts:
- FeatureContext: *common_feature_context_params
- CommentsContext:
- WebDavPropertiesContext:

apiFederation:
paths:
- '%paths.base%/../features/apiFederation'
contexts:
- FeatureContext: *common_feature_context_params
- FederationContext:
- WebDavPropertiesContext:

apiFavorites:
paths:
- '%paths.base%/../features/apiFavorites'
contexts:
- FeatureContext: *common_feature_context_params
- FavoritesContext:
- WebDavPropertiesContext:

apiProvisioning-v1:
paths:
- '%paths.base%/../features/apiProvisioning-v1'
contexts:
- FeatureContext: *common_feature_context_params
- WebDavPropertiesContext:

apiProvisioning-v2:
paths:
- '%paths.base%/../features/apiProvisioning-v2'
contexts:
- FeatureContext: *common_feature_context_params
- WebDavPropertiesContext:

apiSharees:
paths:
- '%paths.base%/../features/apiSharees'
contexts:
- FeatureContext: *common_feature_context_params
- ShareesContext:
- WebDavPropertiesContext:

apiShareManagement:
paths:
Expand All @@ -73,6 +81,7 @@ default:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:

apiShareOperations:
paths:
Expand All @@ -81,27 +90,31 @@ default:
- FeatureContext: *common_feature_context_params
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:

apiSharingNotifications:
paths:
- '%paths.base%/../features/apiSharingNotifications'
contexts:
- FeatureContext: *common_feature_context_params
- NotificationsCoreContext:
- WebDavPropertiesContext:

apiTags:
paths:
- '%paths.base%/../features/apiTags'
contexts:
- FeatureContext: *common_feature_context_params
- TagsContext:
- WebDavPropertiesContext:

apiTrashbin:
paths:
- '%paths.base%/../features/apiTrashbin'
contexts:
- FeatureContext: *common_feature_context_params
- TrashbinContext:
- WebDavPropertiesContext:

apiWebdavOperations:
paths:
Expand All @@ -111,13 +124,15 @@ default:
- LoggingContext:
- SearchContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

apiWebdavProperties:
paths:
- '%paths.base%/../features/apiWebdavProperties'
contexts:
- FeatureContext: *common_feature_context_params
- LoggingContext:
- WebDavPropertiesContext:

cliProvisioning:
paths:
Expand All @@ -126,20 +141,23 @@ default:
- FeatureContext: *common_feature_context_params
- EmailContext:
- OccContext:
- WebDavPropertiesContext:

cliMain:
paths:
- '%paths.base%/../features/cliMain'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- WebDavPropertiesContext:

cliBackground:
paths:
- '%paths.base%/../features/cliBackground'
contexts:
- FeatureContext: *common_feature_context_params
- OccContext:
- WebDavPropertiesContext:

cliTrashbin:
paths:
Expand All @@ -148,6 +166,7 @@ default:
- FeatureContext: *common_feature_context_params
- OccContext:
- TrashbinContext:
- WebDavPropertiesContext:

webUIAdminSettings:
paths:
Expand All @@ -165,6 +184,7 @@ default:
- WebUIGeneralContext:
- WebUILoginContext:
- OccContext:
- WebDavPropertiesContext:

webUIComments:
paths:
Expand All @@ -175,6 +195,7 @@ default:
- WebUILoginContext:
- WebUIFilesContext:
- WebUISharingContext:
- WebDavPropertiesContext:

webUIFavorites:
paths:
Expand All @@ -184,6 +205,7 @@ default:
- WebUIFilesContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebDavPropertiesContext:

webUIFiles:
paths:
Expand All @@ -198,6 +220,7 @@ default:
- WebUISharingContext:
- OccContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

webUILogin:
paths:
Expand All @@ -209,6 +232,7 @@ default:
- WebUIGeneralContext:
- WebUILoginContext:
- WebUIPersonalGeneralSettingsContext:
- WebDavPropertiesContext:

webUIMoveFilesFolders:
paths:
Expand All @@ -220,6 +244,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

webUIPersonalSettings:
paths:
Expand All @@ -234,6 +259,7 @@ default:
- WebUIPersonalSecuritySettingsContext:
- WebUIUserContext:
- OccContext:
- WebDavPropertiesContext:

webUIRenameFiles:
paths:
Expand All @@ -245,6 +271,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

webUIRenameFolders:
paths:
Expand All @@ -254,6 +281,7 @@ default:
- WebUIFilesContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebDavPropertiesContext:

webUIRestrictSharing:
paths:
Expand All @@ -264,6 +292,7 @@ default:
- WebUIGeneralContext:
- WebUILoginContext:
- WebUISharingContext:
- WebDavPropertiesContext:

webUISharingExternal:
paths:
Expand All @@ -277,6 +306,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

webUISharingInternalGroups:
paths:
Expand All @@ -288,6 +318,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- WebUIAdminSharingSettingsContext:
- WebDavPropertiesContext:

webUISharingInternalUsers:
paths:
Expand All @@ -299,6 +330,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- WebUIAdminSharingSettingsContext:
- WebDavPropertiesContext:

webUISharingNotifications:
paths:
Expand All @@ -311,6 +343,7 @@ default:
- WebUILoginContext:
- WebUINotificationsContext:
- WebUISharingContext:
- WebDavPropertiesContext:

webUITags:
paths:
Expand All @@ -323,6 +356,7 @@ default:
- WebUIFilesContext:
- WebUISharingContext:
- WebUITagsContext:
- WebDavPropertiesContext:

webUITrashbin:
paths:
Expand All @@ -333,6 +367,7 @@ default:
- WebUIFilesContext:
- WebUIGeneralContext:
- WebUILoginContext:
- WebDavPropertiesContext:

webUIUpload:
paths:
Expand All @@ -344,6 +379,7 @@ default:
- WebUILoginContext:
- WebUISharingContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

webUIWebdavLocks:
paths:
Expand All @@ -357,6 +393,7 @@ default:
- WebUIWebDavLockingContext:
- WebUISharingContext:
- PublicWebDavContext:
- WebDavPropertiesContext:

extensions:
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
Expand Down
11 changes: 10 additions & 1 deletion tests/acceptance/features/bootstrap/FavoritesContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class FavoritesContext implements Context {
*/
private $featureContext;

/**
*
* @var WebDavPropertiesContext
*/
private $webDavPropertiesContext;

/**
* @When user :user favorites element :path using the WebDAV API
* @Given user :user has favorited element :path
Expand Down Expand Up @@ -193,7 +199,7 @@ public function theUserUnfavoritesElement($path) {
*/
public function asUserTheFileOrFolderShouldBeFavorited($user, $path, $expectedValue = 1) {
$property = "oc:favorite";
$this->featureContext->asUserFolderShouldContainAPropertyWithValue(
$this->webDavPropertiesContext->asUserFolderShouldContainAPropertyWithValue(
$user, $path, $property, $expectedValue
);
}
Expand Down Expand Up @@ -272,5 +278,8 @@ public function before(BeforeScenarioScope $scope) {
$environment = $scope->getEnvironment();
// Get all the contexts you need in this context
$this->featureContext = $environment->getContext('FeatureContext');
$this->webDavPropertiesContext = $environment->getContext(
'WebDavPropertiesContext'
);
}
}
Loading

0 comments on commit 49a8363

Please sign in to comment.