Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-12-11 15:39:04 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-11 18:20:04 +0300
commit17fcd84ee383d0450976fe63226139abb841f2fd (patch)
tree3c1fa2676f7a8849f9657750e6f7b1a1772239af /build
parent5b895335df94475d74ef53be5909388ce92f3f0c (diff)
Prepare logic to handle nested elements and add pending test cases
Diffstat (limited to 'build')
-rw-r--r--build/integration/capabilities_features/capabilities.feature249
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php33
2 files changed, 183 insertions, 99 deletions
diff --git a/build/integration/capabilities_features/capabilities.feature b/build/integration/capabilities_features/capabilities.feature
index e4c53269caa..f219ece56cf 100644
--- a/build/integration/capabilities_features/capabilities.feature
+++ b/build/integration/capabilities_features/capabilities.feature
@@ -7,18 +7,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | 1 |
- | files_sharing | public | upload | 1 |
- | files_sharing | resharing | 1 | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Changing public upload
Given As an "admin"
@@ -26,18 +26,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | 1 |
- | files_sharing | public | upload | EMPTY |
- | files_sharing | resharing | 1 | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | EMPTY |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Disabling share api
Given As an "admin"
@@ -45,18 +45,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | EMPTY | |
- | files_sharing | public | enabled | EMPTY |
- | files_sharing | public | upload | EMPTY |
- | files_sharing | resharing | EMPTY | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | EMPTY |
+ | files_sharing | public@@@enabled | EMPTY |
+ | files_sharing | public@@@upload | EMPTY |
+ | files_sharing | resharing | EMPTY |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Disabling public links
Given As an "admin"
@@ -64,18 +64,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | EMPTY |
- | files_sharing | public | upload | EMPTY |
- | files_sharing | resharing | 1 | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | EMPTY |
+ | files_sharing | public@@@upload | EMPTY |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Changing resharing
Given As an "admin"
@@ -83,18 +83,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | 1 |
- | files_sharing | public | upload | 1 |
- | files_sharing | resharing | EMPTY | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | resharing | EMPTY |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Changing federation outgoing
Given As an "admin"
@@ -102,18 +102,18 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | 1 |
- | files_sharing | public | upload | 1 |
- | files_sharing | resharing | 1 | |
- | files_sharing | federation | outgoing | EMPTY |
- | files_sharing | federation | incoming | 1 |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | EMPTY |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
Scenario: Changing federation incoming
Given As an "admin"
@@ -121,23 +121,102 @@ Feature: capabilities
When sending "GET" to "/cloud/capabilities"
Then the HTTP status code should be "200"
And fields of capabilities match with
- | capability | feature | value_or_subfeature | value |
- | core | pollinterval | 60 | |
- | core | webdav-root | remote.php/webdav | |
- | files_sharing | api_enabled | 1 | |
- | files_sharing | public | enabled | 1 |
- | files_sharing | public | upload | 1 |
- | files_sharing | resharing | 1 | |
- | files_sharing | federation | outgoing | 1 |
- | files_sharing | federation | incoming | EMPTY |
- | files | bigfilechunking | 1 | |
- | files | undelete | 1 | |
- | files | versioning | 1 | |
-
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | EMPTY |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
+ Scenario: Changing password enforce
+ Given As an "admin"
+ And parameter "shareapi_enforce_links_password" of app "core" is set to "yes"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | public@@@password@@@enforced | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
+ Scenario: Changing public notifications
+ Given As an "admin"
+ And parameter "shareapi_allow_public_notification" of app "core" is set to "yes"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | public@@@send_mail | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
+ Scenario: Changing expire date
+ Given As an "admin"
+ And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | public@@@expire_date@@@enabled | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
+ Scenario: Changing expire date enforcing
+ Given As an "admin"
+ And parameter "shareapi_default_expire_date" of app "core" is set to "yes"
+ And parameter "shareapi_enforce_expire_date" of app "core" is set to "yes"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | path_to_element | value |
+ | core | pollinterval | 60 |
+ | core | webdav-root | remote.php/webdav |
+ | files_sharing | api_enabled | 1 |
+ | files_sharing | public@@@enabled | 1 |
+ | files_sharing | public@@@upload | 1 |
+ | files_sharing | public@@@expire_date@@@enabled | 1 |
+ | files_sharing | public@@@expire_date@@@enforced | 1 |
+ | files_sharing | resharing | 1 |
+ | files_sharing | federation@@@outgoing | 1 |
+ | files_sharing | federation@@@incoming | 1 |
+ | files | bigfilechunking | 1 |
+ | files | undelete | 1 |
+ | files | versioning | 1 |
+
+
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index e423be7f9f3..a39150d0371 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -29,21 +29,18 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
$capabilitiesXML = $this->response->xml()->data->capabilities;
foreach ($formData->getHash() as $row) {
- if ($row['value'] === ''){
- $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature'];
- PHPUnit_Framework_Assert::assertEquals(
- $row['value_or_subfeature']==="EMPTY" ? '' : $row['value_or_subfeature'],
- $answeredValue,
- "Failed field " . $row['capability'] . " " . $row['feature']
- );
- } else{
- $answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']->$row['value_or_subfeature'];
- PHPUnit_Framework_Assert::assertEquals(
- $row['value']==="EMPTY" ? '' : $row['value'],
- $answeredValue,
- "Failed field: " . $row['capability'] . " " . $row['feature'] . " " . $row['value_or_subfeature']
- );
+ $path_to_element = explode('@@@', $row['path_to_element']);
+ $answeredValue = $capabilitiesXML->$row['capability'];
+ for ($i = 0; $i < count($path_to_element); $i++){
+ $answeredValue = $answeredValue->$path_to_element[$i];
}
+ $answeredValue = (string)$answeredValue;
+ PHPUnit_Framework_Assert::assertEquals(
+ $row['value']==="EMPTY" ? '' : $row['value'],
+ $answeredValue,
+ "Failed field " . $row['capability'] . " " . $row['path_to_element']
+ );
+
}
}
@@ -57,6 +54,10 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
$this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
$this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
$this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_enforce_links_password', 'no');
+ $this->modifyServerConfig('core', 'shareapi_allow_public_notification', 'no');
+ $this->modifyServerConfig('core', 'shareapi_default_expire_date', 'no');
+ $this->modifyServerConfig('core', 'shareapi_enforce_expire_date', 'no');
}
/**
@@ -69,6 +70,10 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
$this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
$this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
$this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_enforce_links_password', 'no');
+ $this->modifyServerConfig('core', 'shareapi_allow_public_notification', 'no');
+ $this->modifyServerConfig('core', 'shareapi_default_expire_date', 'no');
+ $this->modifyServerConfig('core', 'shareapi_enforce_expire_date', 'no');
}
/**