mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-06-26 14:39:30 +02:00
MNT Add behat tests
This commit is contained in:
parent
22839ec8c2
commit
d8e3b06c1b
|
@ -1,7 +1,7 @@
|
||||||
version: ~> 1.0
|
version: ~> 1.0
|
||||||
|
|
||||||
import:
|
import:
|
||||||
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed.yml
|
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed-behat.yml
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
|
29
behat.yml
Normal file
29
behat.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
default:
|
||||||
|
suites:
|
||||||
|
reports:
|
||||||
|
paths:
|
||||||
|
- "%paths.modules.reports%/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\Reports\Tests\Behat\Context\FeatureContext
|
||||||
|
- SilverStripe\Reports\Tests\Behat\Context\FixtureContext
|
||||||
|
-
|
||||||
|
SilverStripe\Reports\Tests\Behat\Context\FixtureContext:
|
||||||
|
- "%paths.modules.reports%/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
|
|
@ -39,7 +39,8 @@
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"SilverStripe\\Reports\\": "code/",
|
"SilverStripe\\Reports\\": "code/",
|
||||||
"SilverStripe\\Reports\\Tests\\": "tests/"
|
"SilverStripe\\Reports\\Tests\\": "tests/",
|
||||||
|
"SilverStripe\\Reports\\Tests\\Behat\\Context\\": "tests/behat/src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
|
|
0
tests/behat/_manifest_exclude
Normal file
0
tests/behat/_manifest_exclude
Normal file
16
tests/behat/features/reports.feature
Normal file
16
tests/behat/features/reports.feature
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Feature: CMS reports
|
||||||
|
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"
|
||||||
|
|
||||||
|
# TODO: delete
|
||||||
|
Given I take a screenshot after every step
|
||||||
|
Given I dump the rendered HTML after every step
|
||||||
|
|
||||||
|
|
||||||
|
@sboyd
|
||||||
|
Scenario: Operate reports
|
||||||
|
Given I am logged in with "EDITOR" permissions
|
||||||
|
When I go to "/admin/reports"
|
0
tests/behat/files/blank.txt
Normal file
0
tests/behat/files/blank.txt
Normal file
9
tests/behat/src/FeatureContext.php
Normal file
9
tests/behat/src/FeatureContext.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\Reports\Tests\Behat\Context;
|
||||||
|
|
||||||
|
use SilverStripe\BehatExtension\Context\SilverStripeContext;
|
||||||
|
|
||||||
|
class FeatureContext extends SilverStripeContext
|
||||||
|
{
|
||||||
|
}
|
9
tests/behat/src/FixtureContext.php
Normal file
9
tests/behat/src/FixtureContext.php
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SilverStripe\Reports\Tests\Behat\Context;
|
||||||
|
|
||||||
|
use SilverStripe\BehatExtension\Context\FixtureContext as BaseFixtureContext;
|
||||||
|
|
||||||
|
class FixtureContext extends BaseFixtureContext
|
||||||
|
{
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user