mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing Pages spec flow test.
This commit is contained in:
@@ -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 "/"
|
||||
|
||||
20
src/Orchard.Specs/Pages.feature.cs
generated
20
src/Orchard.Specs/Pages.feature.cs
generated
@@ -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"});
|
||||
|
||||
Reference in New Issue
Block a user