2009-12-16 06:58:50 +01:00
|
|
|
Feature: Page deletion in the CMS
|
|
|
|
As a content author
|
|
|
|
I want to delete pages in the CMS
|
|
|
|
So that out of date content can be removed
|
2010-10-04 08:12:29 +02:00
|
|
|
|
2009-12-16 06:58:50 +01:00
|
|
|
Scenario: User can delete a page without making any changes
|
|
|
|
Given I log into the CMS as admin
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario1"
|
|
|
|
And I create a new page called "delete-page.scenario1"
|
|
|
|
And there are 1 root pages with navigation label "delete-page.scenario1"
|
2009-12-16 06:58:50 +01:00
|
|
|
When I delete the current page
|
2010-10-04 08:12:29 +02:00
|
|
|
Then there are 0 root pages with navigation label "delete-page.scenario1"
|
|
|
|
|
2009-12-16 06:58:50 +01:00
|
|
|
Scenario: A deleted page can't be viewed
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario2"
|
|
|
|
Given I create a new page called "delete-page.scenario2"
|
|
|
|
And there is 1 root page with navigation label "delete-page.scenario2"
|
2009-12-16 06:58:50 +01:00
|
|
|
When I delete the current page
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario2"
|
2009-12-16 06:58:50 +01:00
|
|
|
And I log out
|
2010-10-04 08:12:29 +02:00
|
|
|
Then url delete-page-scenario2 does not exist
|
|
|
|
|
2009-12-16 06:58:50 +01:00
|
|
|
Scenario: A deleted URL can be re-used
|
|
|
|
Given I log into the CMS as admin
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario3"
|
|
|
|
And I create a new page called "delete-page.scenario3"
|
|
|
|
And there are 1 root pages with navigation label "delete-page.scenario3"
|
2009-12-16 06:58:50 +01:00
|
|
|
And I click on the "Metadata" tab
|
2010-10-04 08:12:29 +02:00
|
|
|
And the "URLSegment" field is "delete-page-scenario3"
|
2009-12-16 06:58:50 +01:00
|
|
|
And I delete the current page
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario3"
|
|
|
|
When I create a new page called "delete-page.scenario3"
|
2009-12-16 06:58:50 +01:00
|
|
|
And I click on the "Metadata" tab
|
2010-10-04 08:12:29 +02:00
|
|
|
Then the "URLSegment" field is "delete-page-scenario3"
|
2009-12-16 06:58:50 +01:00
|
|
|
Then delete the current page
|
|
|
|
|
|
|
|
Scenario: A deleted page doesn't appear after re-login
|
2010-10-04 08:12:29 +02:00
|
|
|
Given there are 0 root pages with navigation label "delete-page.scenario4"
|
|
|
|
And I create a new page called "delete-page.scenario4"
|
|
|
|
And there is 1 root page with navigation label "delete-page.scenario4"
|
2009-12-16 06:58:50 +01:00
|
|
|
And I save the page
|
|
|
|
And I delete the current page
|
2010-10-04 08:12:29 +02:00
|
|
|
And there are 0 root pages with navigation label "delete-page.scenario4"
|
2009-12-16 06:58:50 +01:00
|
|
|
When I log out
|
|
|
|
And I log into the CMS as admin
|
2010-10-04 08:12:29 +02:00
|
|
|
Then there are 0 root pages with navigation label "delete-page.scenario4"
|
|
|
|
|