-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: ~> 1.0 | ||
|
||
import: | ||
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml | ||
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range-behat.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
default: | ||
suites: | ||
taxonomy: | ||
paths: | ||
- "%paths.modules.taxonomy%/tests/behat/features" | ||
contexts: | ||
- SilverStripe\Admin\Tests\Behat\Context\AdminContext | ||
- SilverStripe\BehatExtension\Context\BasicContext | ||
- SilverStripe\BehatExtension\Context\EmailContext | ||
- SilverStripe\BehatExtension\Context\LoginContext | ||
- SilverStripe\Framework\Tests\Behaviour\CmsFormsContext | ||
- SilverStripe\Framework\Tests\Behaviour\CmsUiContext | ||
- SilverStripe\Taxonomy\Tests\Behat\Context\FeatureContext | ||
- SilverStripe\Taxonomy\Tests\Behat\Context\FixtureContext | ||
- | ||
SilverStripe\Taxonomy\Tests\Behat\Context\FixtureContext: | ||
- "%paths.modules.taxonomy%/tests/behat/files/" | ||
|
||
extensions: | ||
SilverStripe\BehatExtension\MinkExtension: | ||
default_session: facebook_web_driver | ||
javascript_session: facebook_web_driver | ||
facebook_web_driver: | ||
browser: chrome | ||
wd_host: "http://127.0.0.1:9515" | ||
|
||
SilverStripe\BehatExtension\Extension: | ||
screenshot_path: "%paths.base%/artifacts/screenshots" | ||
bootstrap_file: vendor/silverstripe/framework/tests/behat/serve-bootstrap.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Feature: Create taxonomies | ||
As a website user | ||
I want to create and link taxonomies | ||
|
||
Background: | ||
Given the "group" "EDITOR group" has permissions "CMS_ACCESS_LeftAndMain" and "TAXONOMYTERM_CREATE" and "TAXONOMYTERM_EDIT" and "TAXONOMYTERM_DELETE" | ||
|
||
Scenario: Create taxonomy terms, types and link them together | ||
# Only admins can create Taxonomy Types | ||
Given I am logged in with "ADMIN" permissions | ||
When I go to "/admin/taxonomy" | ||
When I click the "Taxonomy Types" CMS tab | ||
When I press the "Add Taxonomy Type" button | ||
And I fill in "Name" with "My taxonomy type" | ||
And I press the "Create" button | ||
When I follow "Taxonomy Types" | ||
Then I should see "My taxonomy type" | ||
|
||
# Login as editor to create taxonomy term | ||
When I go to "/Security/login" | ||
And I press the "Log in as someone else" button | ||
And I am logged in with "EDITOR" permissions | ||
When I go to "/admin/taxonomy" | ||
Then I should see the ".current[aria-controls='Taxonomy_Terms']" element | ||
When I press the "Add Taxonomy Term" button | ||
And I fill in "Name" with "My taxonomy term" | ||
And I select "My taxonomy type" from "Type" | ||
And I press the "Create" button | ||
When I follow "Taxonomy Terms" | ||
Then I should see "My taxonomy term" | ||
|
||
# Create child term | ||
When I click the "Edit" button in the "SilverStripe-Taxonomy-TaxonomyTerm" gridfield for the "My taxonomy term" row | ||
When I click the "Children" CMS tab | ||
When I press the "Add Taxonomy Term" button | ||
And I fill in "Name" with "My child taxonomy term" | ||
And I press the "Create" button | ||
When I follow "My taxonomy term" | ||
And I click the "Children" CMS tab | ||
Then I should see "My child taxonomy term" | ||
When I follow "Taxonomy Terms" | ||
Then I should not see "My child taxonomy term" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace SilverStripe\Taxonomy\Tests\Behat\Context; | ||
|
||
use SilverStripe\BehatExtension\Context\SilverStripeContext; | ||
|
||
class FeatureContext extends SilverStripeContext | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace SilverStripe\Taxonomy\Tests\Behat\Context; | ||
|
||
use SilverStripe\BehatExtension\Context\FixtureContext as BaseFixtureContext; | ||
|
||
class FixtureContext extends BaseFixtureContext | ||
{ | ||
} |
File renamed without changes.
File renamed without changes.