diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature index 4c2460b31..c3e87d12f 100644 --- a/src/Orchard.Specs/Blogs.feature +++ b/src/Orchard.Specs/Blogs.feature @@ -273,3 +273,22 @@ Scenario: I can create browse blog posts on several pages And I should see "]*>.*?My Post 1.*?" And I should see "]*>.*?My Post 2.*?" And I should not see "]*>.*?My Post 3.*?" + +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 "]*>.*?My Post with a % Sign.*?" + And I should see "Hi there." \ No newline at end of file diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs index 009fde8a3..0996f3940 100644 --- a/src/Orchard.Specs/Blogs.feature.cs +++ b/src/Orchard.Specs/Blogs.feature.cs @@ -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.18003 +// Runtime Version:4.0.30319.18046 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -765,6 +765,60 @@ this.ScenarioSetup(scenarioInfo); testRunner.And("I should see \"]*>.*?My Post 2.*?\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line 275 testRunner.And("I should not see \"]*>.*?My Post 3.*?\"", ((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 \"]*>.*?My Post with a % Sign.*?\"", ((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 this.ScenarioCleanup(); }