-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Update behat tests and add configuration
- Loading branch information
1 parent
1a9797c
commit d934fbe
Showing
4 changed files
with
38 additions
and
125 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
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,27 @@ | ||
default: | ||
suites: | ||
subsites: | ||
paths: | ||
- %paths.modules.subsites%/tests/behat/features | ||
contexts: | ||
- SilverStripe\Framework\Tests\Behaviour\FeatureContext | ||
- SilverStripe\Framework\Tests\Behaviour\CmsFormsContext | ||
- SilverStripe\Framework\Tests\Behaviour\CmsUiContext | ||
- SilverStripe\BehatExtension\Context\BasicContext | ||
- SilverStripe\BehatExtension\Context\EmailContext | ||
- SilverStripe\CMS\Tests\Behaviour\LoginContext | ||
- SilverStripe\CMS\Tests\Behaviour\ThemeContext | ||
- SilverStripe\CMS\Tests\Behaviour\FixtureContext: | ||
# Note: double indent for args is intentional | ||
- %paths.modules.subsites%/tests/behat/features/files/ | ||
|
||
extensions: | ||
SilverStripe\BehatExtension\MinkExtension: | ||
default_session: selenium2 | ||
javascript_session: selenium2 | ||
selenium2: | ||
browser: firefox | ||
|
||
SilverStripe\BehatExtension\Extension: | ||
screenshot_path: %paths.base%/artifacts/screenshots | ||
bootstrap_file: "cms/tests/behat/serve-bootstrap.php" |
115 changes: 0 additions & 115 deletions
115
tests/behat/features/bootstrap/Context/FeatureContext.php
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,22 +5,21 @@ Feature: Preview navigation | |
|
||
Background: | ||
Given a "subsite" "My subsite" | ||
And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content <a name='aname'>aname</a><a href='other-page'>ahref</a>" and "Subsite"="=>Subsite.My subsite" | ||
And a "page" "Other page" with "URLSegment"="other-page", "Content"="Other page content <form action='my-page'><input type='submit' value='Submit my form'></form>" and "Subsite"="=>Subsite.My subsite" | ||
And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content <a name='aname'>aname</a><a href='other-page'>ahref</a>" and "Subsite"="=>SilverStripe\Subsites\Model\Subsite.My subsite" | ||
And a "page" "Other page" with "URLSegment"="other-page", "Content"="Other page content <a href='my-page'>Goto my page></a>" and "Subsite"="=>SilverStripe\Subsites\Model\Subsite.My subsite" | ||
Given a "member" "Joe" belonging to "Admin Group" with "Email"="[email protected]" and "Password"="Password1" | ||
And the "group" "Admin Group" has permissions "Full administrative rights" | ||
And I log in with "[email protected]" and "Password1" | ||
|
||
@javascript | ||
Scenario: I can navigate the subsite preview | ||
When I go to "admin" | ||
And I select "My subsite" from "SubsitesSelect" | ||
And I go to "admin/pages" | ||
And I click on "My page" in the tree | ||
And I wait for 3 seconds | ||
And I set the CMS mode to "Preview mode" | ||
And I follow "ahref" in preview | ||
Then the preview contains "Other page content" | ||
# We are already on the second page, submit the form to return to first one. | ||
When I wait for 3 seconds | ||
And I press "Submit my form" in preview | ||
# We are already on the second page, submit the form to return to first one. | ||
And I follow "Goto my page" in preview | ||
Then the preview contains "My page content" |