From 8b82879b031143e217d47c9bab970348448bbdf7 Mon Sep 17 00:00:00 2001 From: Artur Neumann Date: Mon, 13 Aug 2018 11:15:36 +0545 Subject: [PATCH] separate When from the Given step --- .../features/apiProvisioning-v1/getGroups.feature | 1 - .../features/apiProvisioning-v2/getGroups.feature | 1 - .../acceptance/features/bootstrap/Provisioning.php | 13 ++++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/apiProvisioning-v1/getGroups.feature b/tests/acceptance/features/apiProvisioning-v1/getGroups.feature index 77cabe02c426..02afe75917ac 100644 --- a/tests/acceptance/features/apiProvisioning-v1/getGroups.feature +++ b/tests/acceptance/features/apiProvisioning-v1/getGroups.feature @@ -10,7 +10,6 @@ So that I can see all the groups in my ownCloud Scenario: admin gets all the groups Given group "0" has been created And group "new-group" has been created - And group "admin" has been created And group "España" has been created When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/groups" Then the groups returned by the API should be diff --git a/tests/acceptance/features/apiProvisioning-v2/getGroups.feature b/tests/acceptance/features/apiProvisioning-v2/getGroups.feature index e2f1360e2493..287013dc4926 100644 --- a/tests/acceptance/features/apiProvisioning-v2/getGroups.feature +++ b/tests/acceptance/features/apiProvisioning-v2/getGroups.feature @@ -10,7 +10,6 @@ So that I can see all the groups in my ownCloud Scenario: admin gets all the groups Given group "0" has been created And group "new-group" has been created - And group "admin" has been created And group "España" has been created When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/groups" Then the groups returned by the API should be diff --git a/tests/acceptance/features/bootstrap/Provisioning.php b/tests/acceptance/features/bootstrap/Provisioning.php index 6a539b80c8c8..688fbc250bc4 100644 --- a/tests/acceptance/features/bootstrap/Provisioning.php +++ b/tests/acceptance/features/bootstrap/Provisioning.php @@ -906,7 +906,6 @@ public function rememberThatGroupIsNotExpectedToExist($group) { /** * @When /^the administrator creates group "([^"]*)" using the provisioning API$/ - * @Given /^group "([^"]*)" has been created$/ * * @param string $group * @@ -920,6 +919,18 @@ public function adminCreatesGroupUsingTheProvisioningApi($group) { $this->groupShouldExist($group); } + /** @Given /^group "([^"]*)" has been created$/ + * + * @param string $group + * + * @return void + * @throws \Exception + */ + public function groupHasBeenCreated($group) { + $this->createTheGroup($group); + $this->groupShouldExist($group); + } + /** * @Given these groups have been created: * expects a table of groups with the heading "groupname"