More specific behat tree assertions

This commit is contained in:
Ingo Schommer 2013-09-14 00:21:29 +02:00
parent 7ec7a263c0
commit 16c802f7e1
4 changed files with 24 additions and 24 deletions

View File

@ -7,16 +7,16 @@ Feature: Edit a page
Given a "page" "About Us" Given a "page" "About Us"
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in CMS Tree Then I should see "About Us" in the tree
@javascript @javascript
Scenario: I can open a page for editing from the pages tree Scenario: I can open a page for editing from the pages tree
When I follow "About Us" When I click on "About Us" in the tree
Then I should see an edit page form Then I should see an edit page form
@javascript @javascript
Scenario: I can edit title and content and see the changes on draft Scenario: I can edit title and content and see the changes on draft
When I follow "About Us" When I click on "About Us" in the tree
Then I should see an edit page form Then I should see an edit page form
When I fill in "Title" with "About Us!" When I fill in "Title" with "About Us!"
@ -24,6 +24,6 @@ Feature: Edit a page
And I press the "Save draft" button And I press the "Save draft" button
Then I should see "Saved" in the "button#Form_EditForm_action_save" element Then I should see "Saved" in the "button#Form_EditForm_action_save" element
When I follow "About Us" When I click on "About Us" in the tree
Then the "Title" field should contain "About Us!" Then the "Title" field should contain "About Us!"
And the "Content" HTML field should contain "my new content" And the "Content" HTML field should contain "my new content"

View File

@ -10,9 +10,9 @@ Feature: Preview a page
Scenario: I can show a preview of the current page from the pages section Scenario: I can show a preview of the current page from the pages section
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in CMS Tree Then I should see "About Us" in the tree
When I follow "About Us" When I click on "About Us" in the tree
And I set the CMS mode to "Preview mode" And I set the CMS mode to "Preview mode"
Then I can see the preview panel Then I can see the preview panel
And the preview contains "About Us" And the preview contains "About Us"
@ -25,9 +25,9 @@ Feature: Preview a page
Scenario: I can see an updated preview when editing content Scenario: I can see an updated preview when editing content
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
Then I should see "About Us" in CMS Tree Then I should see "About Us" in the tree
When I follow "About Us" When I click on "About Us" in the tree
And I fill in the "Content" HTML field with "first content" And I fill in the "Content" HTML field with "first content"
And I press the "Publish" button And I press the "Publish" button
And I fill in the "Content" HTML field with "my new content" And I fill in the "Content" HTML field with "my new content"

View File

@ -16,8 +16,8 @@ So that only high quality changes are seen by our visitors
Scenario: I can publish a previously never published page Scenario: I can publish a previously never published page
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in CMS Tree And I should see "My Page" in the tree
And I follow "My Page" And I click on "My Page" in the tree
And I press the "Publish" button And I press the "Publish" button
Then I press the "Log out" button Then I press the "Log out" button
@ -29,8 +29,8 @@ So that only high quality changes are seen by our visitors
Scenario: I will get different options depending on the current publish state of the page Scenario: I will get different options depending on the current publish state of the page
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in CMS Tree And I should see "My Page" in the tree
And I follow "My Page" And I click on "My Page" in the tree
When I click "More options" in the "#ActionMenus" element When I click "More options" in the "#ActionMenus" element
Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element Then I should not see "Unpublish" in the "#ActionMenus_MoreOptions" element
@ -60,7 +60,7 @@ So that only high quality changes are seen by our visitors
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "Hello" in CMS Tree And I should see "Hello" in the tree
And I follow "Hello" And I follow "Hello"
When I click "More options" in the "#ActionMenus" element When I click "More options" in the "#ActionMenus" element
@ -74,7 +74,7 @@ So that only high quality changes are seen by our visitors
Scenario: I can delete a page from live and draft stage to completely remove it Scenario: I can delete a page from live and draft stage to completely remove it
Given I am logged in with "ADMIN" permissions Given I am logged in with "ADMIN" permissions
And I go to "/admin/pages" And I go to "/admin/pages"
And I should see "My Page" in CMS Tree And I should see "My Page" in the tree
When I follow "My Page" When I follow "My Page"
And I press the "Publish" button And I press the "Publish" button
And I click "More options" in the "#ActionMenus" element And I click "More options" in the "#ActionMenus" element

View File

@ -14,16 +14,16 @@ Feature: Search for a page
Scenario: I can search for a page by its title Scenario: I can search for a page by its title
Given I fill in "Content" with "About Us" Given I fill in "Content" with "About Us"
And I press the "Apply Filter" button And I press the "Apply Filter" button
Then I should see "About Us" in CMS Tree Then I should see "About Us" in the tree
But I should not see "Contact Us" in CMS Tree But I should not see "Contact Us" in the tree
@todo @todo
Scenario: I can search for a page by its type Scenario: I can search for a page by its type
Given a "page" "My Error Page" of type "Error Page" Given a "page" "My Error Page" of type "Error Page"
And I fill in "Page Type" with "Redirector Page" And I fill in "Page Type" with "Redirector Page"
And I press the "Apply Filter" button And I press the "Apply Filter" button
Then I should see "My Error Page" in CMS Tree Then I should see "My Error Page" in the tree
But I should not see "Contact Us" in CMS Tree But I should not see "Contact Us" in the tree
@todo @todo
Scenario: I can search for a page by its oldest last edited date Scenario: I can search for a page by its oldest last edited date
@ -31,8 +31,8 @@ Feature: Search for a page
And a "page" "Old Page" was last edited 7 days ago And a "page" "Old Page" was last edited 7 days ago
When I fill in "From" with "5 days ago" When I fill in "From" with "5 days ago"
And I press the "Apply Filter" button And I press the "Apply Filter" button
Then I should see "Recent Page" in CMS Tree Then I should see "Recent Page" in the tree
But I should not see "Old Page" in CMS Tree But I should not see "Old Page" in the tree
@todo @todo
Scenario: I can search for a page by its newest last edited date Scenario: I can search for a page by its newest last edited date
@ -40,15 +40,15 @@ Feature: Search for a page
And a "page" "Old Page" was last edited 7 days ago And a "page" "Old Page" was last edited 7 days ago
When I fill in "To" with "5 days ago" When I fill in "To" with "5 days ago"
And I press the "Apply Filter" button And I press the "Apply Filter" button
Then I should not see "Recent Page" in CMS Tree Then I should not see "Recent Page" in the tree
But I should see "Old Page" in CMS Tree But I should see "Old Page" in the tree
@todo @todo
Scenario: I can include deleted pages in my search Scenario: I can include deleted pages in my search
Given a "page" "Deleted Page" Given a "page" "Deleted Page"
And the "page" "Old Page" is deleted And the "page" "Old Page" is deleted
When I press the "Apply Filter" button When I press the "Apply Filter" button
Then I should not see "Deleted Page" in CMS Tree Then I should not see "Deleted Page" in the tree
When I fill in "Pages" with "All pages, including deleted" When I fill in "Pages" with "All pages, including deleted"
And I press the "Apply Filter" button And I press the "Apply Filter" button
Then I should see "Deleted Page" in CMS Tree Then I should see "Deleted Page" in the tree