silverstripe-reports/tests/behat/features/edit-a-page.feature

29 lines
937 B
Gherkin
Raw Normal View History

2012-11-09 19:15:54 +01:00
Feature: Edit a page
As an author
I want to edit a page in the CMS
So that I correct errors and provide new information
2012-11-09 19:15:54 +01:00
Background:
Given a "page" "About Us"
Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages"
Then I should see "About Us" in CMS Tree
2012-11-09 19:15:54 +01:00
@javascript
Scenario: I can open a page for editing from the pages tree
When I follow "About Us"
Then I should see an edit page form
2012-11-09 19:15:54 +01:00
@javascript
Scenario: I can edit title and content and see the changes on draft
When I follow "About Us"
Then I should see an edit page form
2012-11-09 19:15:54 +01:00
When I fill in "Title" with "About Us!"
And I fill in the "Content" HTML field with "my new content"
And I press the "Save draft" button
Then I should see "Saved" in the "button#Form_EditForm_action_save" element
2012-11-09 19:15:54 +01:00
When I follow "About Us"
Then the "Title" field should contain "About Us!"
And the "Content" HTML field should contain "my new content"