Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Commit 28f8846

Browse files
committed
Merge pull request #108 from cleverti/bdd_create_contenttypegroup
Bdd create contenttypegroup
2 parents 2f68497 + 61c400c commit 28f8846

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@contenttypegroup @adminFeature
2+
Feature: Creating a Content Type Group
3+
Create Content Type Group
4+
As an administrator or anonymous user
5+
I want to create a Content Type Group
6+
7+
Scenario: Create a valid Content Type Group
8+
Given I am logged as an "administrator"
9+
And I don't have a Content Type Group "A"
10+
When I create a Content Type Group "A"
11+
Then I see a Content Type Group "A"
12+
13+
Scenario: Attempt to create a Content Type Group with same name of an existing group
14+
Given I am logged as an "administrator"
15+
And I have a Content Type Group "A"
16+
When I create a Content Type Group "A"
17+
Then I see an invalid field error
18+
And I see 1 Content Type Group "A"
19+
20+
Scenario: Attempt to create a Content Type Group with not authorized user
21+
Given I am not logged in
22+
When I create a Content Type Group "A"
23+
Then I see not authorized error
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?php
2+
/**
3+
* File containing the ContentTypeGroup class.
4+
*
5+
* This interface has the sentences definitions for the ContentTypeGroup steps
6+
*
7+
* @copyright Copyright (C) 1999-2014 eZ Systems AS. All rights reserved.
8+
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
9+
* @version //autogentag//
10+
*/
11+
12+
namespace EzSystems\BehatBundle\Features\Context\SentencesInterfaces;
13+
14+
use Behat\Gherkin\Node\TableNode;
15+
16+
/**
17+
* ContentTypeGroup Sentences Interface
18+
*/
19+
interface ContentTypeGroup
20+
{
21+
/**
22+
* @Given /^I have (?:a |)Content Type Group "(?P<identifier>[A-Z])"$/
23+
* @Given /^I have (?:a |)Content Type Group with "(?P<identifier>[^"])" identifier$/
24+
*/
25+
public function iHaveContentTypeGroup( $identifier );
26+
27+
/**
28+
* @Given /^I (?:do not|don\'t) have a Content Type Group "(?P<identifier>[A-Z])"$/
29+
* @Given /^I (?:do not|don\'t) have a Content Type Group with "(?P<identifier>[^"])" identifier$/
30+
*/
31+
public function iDonTHaveContentTypeGroup( $identifier );
32+
33+
/**
34+
* @When /^I create a Content Type Group "(?P<identifier>[A-Z])"$/
35+
* @When /^I create a Content Type Group with "(?P<identifier>[^"])" identifier$/
36+
*/
37+
public function iCreateContentTypeGroup( $identifier );
38+
39+
/**
40+
* @Then /^I see a Content Type Group "(?P<identifier>[A-Z])"$/
41+
* @Then /^I see a Content Type Group with "(?P<identifier>[^"])" identifier$/
42+
*/
43+
public function iSeeContentTypeGroup( $identifier );
44+
45+
/**
46+
* @Then /^I see (?P<total>\d+) Content Type Group(?:s|) "(?P<identifier>[A-Z])"$/
47+
* @Then /^I see (?P<total>\d+) Content Type Group(?:s|) with "(?P<identifier>[^"])" identifier$/
48+
*/
49+
public function iSeeTotalContentTypeGroup( $total, $identifier );
50+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* File containing the Error class.
4+
*
5+
* This interface has the sentences definitions for the Error steps
6+
*
7+
* @copyright Copyright (C) 1999-2014 eZ Systems AS. All rights reserved.
8+
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
9+
* @version //autogentag//
10+
*/
11+
12+
namespace EzSystems\BehatBundle\Features\Context\SentencesInterfaces;
13+
14+
/**
15+
* Errors Sentences Interface
16+
*/
17+
interface Error
18+
{
19+
/**
20+
* @Then /^I see an invalid field error$/
21+
*/
22+
public function iSeeAnInvalidFieldError();
23+
24+
/**
25+
* @Then /^I see not authorized error$/
26+
*/
27+
public function iSeeNotAuthorizedError();
28+
}

0 commit comments

Comments
 (0)