Fixing Pages spec flow test.

This commit is contained in:
Sipke Schoorstra
2014-11-20 19:12:37 -08:00
parent 89dae6ee08
commit 159a707130
2 changed files with 20 additions and 16 deletions

View File

@@ -9,34 +9,34 @@ Scenario: In the admin (menu) there is a link to create a Page
When I go to "Admin"
Then I should see "<a href="/Admin/Contents/Create/Page"[^>]*>Page</a>"
# I can create and publish a new Page
# I can create and publish a new Page
When I go to "Admin/Contents/Create/Page"
And I fill in
| name | value |
| Title.Title | Super Duper |
| Body.Text | This is super. |
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
And I hit "Publish Now"
And I go to "super-duper"
Then I should see "<h1[^>]*>.*?Super Duper.*?</h1>"
And I should see "This is super."
# If I create a page which gets a conflicting path generated its path is made to be unique
# If I create a page which gets a conflicting path generated its path is made to be unique
When I go to "Admin/Contents/Create/Page"
And I fill in
| name | value |
| Title.Title | Super Duper |
| Body.Text | This is super number two. |
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super+number+two."} ] } |
And I hit "Publish Now"
And I go to "super-duper-2"
Then I should see "<h1[^>]*>.*?Super Duper.*?</h1>"
And I should see "This is super number two."
# A new page marked to be the home page and publish does take over the home page and is not accessible from its own standard path
# A new page marked to be the home page and publish does take over the home page and is not accessible from its own standard path
When I go to "Admin/Contents/Create/Page"
And I fill in
| name | value |
| Title.Title | Another |
| Body.Text | This is a draft of the new home page. |
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
| Autoroute.PromoteToHomePage | true |
And I hit "Publish Now"
And I go to "/"
@@ -44,12 +44,12 @@ Scenario: In the admin (menu) there is a link to create a Page
When I go to "another"
Then the status should be 404 "Not Found"
# A new page marked to be the home page but only saved as draft does not take over the home page
# A new page marked to be the home page but only saved as draft does not take over the home page
When I go to "Admin/Contents/Create/Page"
And I fill in
| name | value |
| Title.Title | Drafty |
| Body.Text | This is a draft of the new home page. |
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
| Autoroute.PromoteToHomePage | true |
And I hit "Save"
And I go to "/"

View File

@@ -88,8 +88,9 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table1.AddRow(new string[] {
"Body.Text",
"This is super."});
"LayoutPart.State",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+super.\"} ] }"});
#line 14
testRunner.And("I fill in", ((string)(null)), table1, "And ");
#line 18
@@ -110,8 +111,9 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Super Duper"});
table2.AddRow(new string[] {
"Body.Text",
"This is super number two."});
"LayoutPart.State",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+super+number+two.\"} ] }"});
#line 25
testRunner.And("I fill in", ((string)(null)), table2, "And ");
#line 29
@@ -132,8 +134,9 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Another"});
table3.AddRow(new string[] {
"Body.Text",
"This is a draft of the new home page."});
"LayoutPart.State",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+the+draft+of+a+new+homepage.\"} ] }"});
table3.AddRow(new string[] {
"Autoroute.PromoteToHomePage",
"true"});
@@ -159,8 +162,9 @@ this.ScenarioSetup(scenarioInfo);
"Title.Title",
"Drafty"});
table4.AddRow(new string[] {
"Body.Text",
"This is a draft of the new home page."});
"LayoutPart.State",
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
"This+is+the+draft+of+a+new+homepage.\"} ] }"});
table4.AddRow(new string[] {
"Autoroute.PromoteToHomePage",
"true"});