mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Fixing some specflow tests
This commit is contained in:
@@ -14,7 +14,7 @@ Scenario: In the admin (menu) there is a link to create a Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Super Duper |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "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>"
|
||||
@@ -25,7 +25,7 @@ Scenario: In the admin (menu) there is a link to create a Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Super Duper |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super+number+two."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "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>"
|
||||
@@ -36,7 +36,7 @@ Scenario: In the admin (menu) there is a link to create a Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Another |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "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 "/"
|
||||
@@ -49,7 +49,7 @@ Scenario: In the admin (menu) there is a link to create a Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Drafty |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+the+draft+of+a+new+homepage."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "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 "/"
|
||||
|
10
src/Orchard.Specs/Pages.feature.cs
generated
10
src/Orchard.Specs/Pages.feature.cs
generated
@@ -3,7 +3,7 @@
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -88,7 +88,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Super Duper"});
|
||||
table1.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+super.\"} ] }"});
|
||||
#line 14
|
||||
@@ -111,7 +111,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Super Duper"});
|
||||
table2.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+super+number+two.\"} ] }"});
|
||||
#line 25
|
||||
@@ -134,7 +134,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Another"});
|
||||
table3.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+the+draft+of+a+new+homepage.\"} ] }"});
|
||||
table3.AddRow(new string[] {
|
||||
@@ -162,7 +162,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Drafty"});
|
||||
table4.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+the+draft+of+a+new+homepage.\"} ] }"});
|
||||
table4.AddRow(new string[] {
|
||||
|
@@ -9,7 +9,7 @@ Scenario: I can add a tag to a new Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Super Duper |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
|
||||
| Tags.Tags | Foo, Bar |
|
||||
And I hit "Publish Now"
|
||||
And I go to "super-duper"
|
||||
@@ -23,10 +23,8 @@ Scenario: I can't add a tag with disallowed chars to a new Page
|
||||
And I fill in
|
||||
| name | value |
|
||||
| Title.Title | Super Duper |
|
||||
| LayoutPart.State | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
|
||||
| LayoutPart.LayoutEditor.Data | { "elements": [ { "typeName": "Orchard.Layouts.Elements.Text", "state": "Content=This+is+super."} ] } |
|
||||
| Tags.Tags | Foo, I <3 Orchard |
|
||||
And I hit "Publish Now"
|
||||
And I go to "super-duper"
|
||||
Then I should see "<h1[^>]*>.*?Super Duper.*?</h1>"
|
||||
And I should see "<a[^>]*>Foo</a>"
|
||||
And I should not see "<a[^>]*>I <3 Orchard</a>"
|
||||
And I am redirected
|
||||
Then I should see "forbidden chars"
|
||||
|
14
src/Orchard.Specs/Tags.feature.cs
generated
14
src/Orchard.Specs/Tags.feature.cs
generated
@@ -3,7 +3,7 @@
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -84,7 +84,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Super Duper"});
|
||||
table1.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+super.\"} ] }"});
|
||||
table1.AddRow(new string[] {
|
||||
@@ -125,7 +125,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
"Title.Title",
|
||||
"Super Duper"});
|
||||
table2.AddRow(new string[] {
|
||||
"LayoutPart.State",
|
||||
"LayoutPart.LayoutEditor.Data",
|
||||
"{ \"elements\": [ { \"typeName\": \"Orchard.Layouts.Elements.Text\", \"state\": \"Content=" +
|
||||
"This+is+super.\"} ] }"});
|
||||
table2.AddRow(new string[] {
|
||||
@@ -136,13 +136,9 @@ this.ScenarioSetup(scenarioInfo);
|
||||
#line 28
|
||||
testRunner.And("I hit \"Publish Now\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 29
|
||||
testRunner.And("I go to \"super-duper\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 30
|
||||
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 31
|
||||
testRunner.And("I should see \"<a[^>]*>Foo</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 32
|
||||
testRunner.And("I should not see \"<a[^>]*>I <3 Orchard</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
testRunner.Then("I should see \"forbidden chars\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
Reference in New Issue
Block a user