mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
#19362: Pulled in specflow test.
https://orchard.codeplex.com/SourceControl/network/forks/mlybrand/orchard/contribution/3990 Thanks mlybrand Work Item: 19362 --HG-- branch : 1.x
This commit is contained in:
@@ -273,3 +273,22 @@ Scenario: I can create browse blog posts on several pages
|
|||||||
And I should see "<h1[^>]*>.*?My Post 1.*?</h1>"
|
And I should see "<h1[^>]*>.*?My Post 1.*?</h1>"
|
||||||
And I should see "<h1[^>]*>.*?My Post 2.*?</h1>"
|
And I should see "<h1[^>]*>.*?My Post 2.*?</h1>"
|
||||||
And I should not see "<h1[^>]*>.*?My Post 3.*?</h1>"
|
And I should not see "<h1[^>]*>.*?My Post 3.*?</h1>"
|
||||||
|
|
||||||
|
Scenario: I can create a new blog with a percent sign in the title and it gets stripped out of the slug
|
||||||
|
Given I have installed Orchard
|
||||||
|
When I go to "admin/blogs/create"
|
||||||
|
And I fill in
|
||||||
|
| name | value |
|
||||||
|
| Title.Title | My Blog |
|
||||||
|
And I hit "Save"
|
||||||
|
And I go to "admin/blogs"
|
||||||
|
And I follow "My Blog"
|
||||||
|
And I follow "New Post" where class name has "primaryAction"
|
||||||
|
And I fill in
|
||||||
|
| name | value |
|
||||||
|
| Title.Title | My Post with a % Sign |
|
||||||
|
| Body.Text | Hi there. |
|
||||||
|
And I hit "Publish Now"
|
||||||
|
And I go to "my-blog/my-post-with-a-sign"
|
||||||
|
Then I should see "<h1[^>]*>.*?My Post with a % Sign.*?</h1>"
|
||||||
|
And I should see "Hi there."
|
||||||
56
src/Orchard.Specs/Blogs.feature.cs
generated
56
src/Orchard.Specs/Blogs.feature.cs
generated
@@ -3,7 +3,7 @@
|
|||||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||||
// SpecFlow Version:1.9.0.77
|
// SpecFlow Version:1.9.0.77
|
||||||
// SpecFlow Generator Version:1.9.0.0
|
// SpecFlow Generator Version:1.9.0.0
|
||||||
// Runtime Version:4.0.30319.18003
|
// Runtime Version:4.0.30319.18046
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
@@ -765,6 +765,60 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
testRunner.And("I should see \"<h1[^>]*>.*?My Post 2.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
testRunner.And("I should see \"<h1[^>]*>.*?My Post 2.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
#line 275
|
#line 275
|
||||||
testRunner.And("I should not see \"<h1[^>]*>.*?My Post 3.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
testRunner.And("I should not see \"<h1[^>]*>.*?My Post 3.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line hidden
|
||||||
|
this.ScenarioCleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
[NUnit.Framework.TestAttribute()]
|
||||||
|
[NUnit.Framework.DescriptionAttribute("I can create a new blog with a percent sign in the title and it gets stripped out" +
|
||||||
|
" of the slug")]
|
||||||
|
public virtual void ICanCreateANewBlogWithAPercentSignInTheTitleAndItGetsStrippedOutOfTheSlug()
|
||||||
|
{
|
||||||
|
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create a new blog with a percent sign in the title and it gets stripped out" +
|
||||||
|
" of the slug", ((string[])(null)));
|
||||||
|
#line 277
|
||||||
|
this.ScenarioSetup(scenarioInfo);
|
||||||
|
#line 278
|
||||||
|
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||||
|
#line 279
|
||||||
|
testRunner.When("I go to \"admin/blogs/create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||||
|
#line hidden
|
||||||
|
TechTalk.SpecFlow.Table table27 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
|
"name",
|
||||||
|
"value"});
|
||||||
|
table27.AddRow(new string[] {
|
||||||
|
"Title.Title",
|
||||||
|
"My Blog"});
|
||||||
|
#line 280
|
||||||
|
testRunner.And("I fill in", ((string)(null)), table27, "And ");
|
||||||
|
#line 283
|
||||||
|
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line 284
|
||||||
|
testRunner.And("I go to \"admin/blogs\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line 285
|
||||||
|
testRunner.And("I follow \"My Blog\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line 286
|
||||||
|
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line hidden
|
||||||
|
TechTalk.SpecFlow.Table table28 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
|
"name",
|
||||||
|
"value"});
|
||||||
|
table28.AddRow(new string[] {
|
||||||
|
"Title.Title",
|
||||||
|
"My Post with a % Sign"});
|
||||||
|
table28.AddRow(new string[] {
|
||||||
|
"Body.Text",
|
||||||
|
"Hi there."});
|
||||||
|
#line 287
|
||||||
|
testRunner.And("I fill in", ((string)(null)), table28, "And ");
|
||||||
|
#line 291
|
||||||
|
testRunner.And("I hit \"Publish Now\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line 292
|
||||||
|
testRunner.And("I go to \"my-blog/my-post-with-a-sign\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
|
#line 293
|
||||||
|
testRunner.Then("I should see \"<h1[^>]*>.*?My Post with a % Sign.*?</h1>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||||
|
#line 294
|
||||||
|
testRunner.And("I should see \"Hi there.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||||
#line hidden
|
#line hidden
|
||||||
this.ScenarioCleanup();
|
this.ScenarioCleanup();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user