From 1e4820166ed1f7bd4030e5588a5b1494e5958b88 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Tue, 22 Feb 2011 10:18:56 -0800 Subject: [PATCH] Fixing a spec test. --HG-- branch : dev --- src/Orchard.Specs/Blogs.feature | 2 +- src/Orchard.Specs/Blogs.feature.cs | 262 ++++++++++++++--------------- 2 files changed, 132 insertions(+), 132 deletions(-) diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature index 28812fc7b..6701fd81e 100644 --- a/src/Orchard.Specs/Blogs.feature +++ b/src/Orchard.Specs/Blogs.feature @@ -6,7 +6,7 @@ Scenario: In the admin (menu) there is a link to create a Blog Given I have installed Orchard When I go to "admin" - Then I should see "Blogs" + Then I should see "]*href="/Admin/Blogs/Create"[^>]*>Blog" Scenario: I can create a new blog and blog post Given I have installed Orchard diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs index 227bb49a9..60245a6c4 100644 --- a/src/Orchard.Specs/Blogs.feature.cs +++ b/src/Orchard.Specs/Blogs.feature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------ // // This code was generated by SpecFlow (http://www.specflow.org/). -// SpecFlow Version:1.3.2.0 +// SpecFlow Version:1.4.0.0 // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if @@ -14,7 +14,7 @@ namespace Orchard.Specs using TechTalk.SpecFlow; - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")] [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.DescriptionAttribute("Blog")] @@ -31,7 +31,7 @@ namespace Orchard.Specs { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Blog", "In order to add blogs to my site\r\nAs an author\r\nI want to create blogs and create" + - ", publish and edit blog posts", ((string[])(null))); + ", publish and edit blog posts", GenerationTargetLanguage.CSharp, ((string[])(null))); testRunner.OnFeatureStart(featureInfo); } @@ -61,11 +61,11 @@ namespace Orchard.Specs #line 6 this.ScenarioSetup(scenarioInfo); #line 7 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 8 -testRunner.When("I go to \"admin\""); + testRunner.When("I go to \"admin\""); #line 9 -testRunner.Then("I should see \"Blogs\""); + testRunner.Then("I should see \"]*href=\"/Admin/Blogs/Create\"[^>]*>Blog\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -78,9 +78,9 @@ testRunner.Then("I should see \"Blogs\""); #line 11 this.ScenarioSetup(scenarioInfo); #line 12 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 13 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line hidden TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -89,15 +89,15 @@ testRunner.When("I go to \"admin/blogs/create\""); "Routable.Title", "My Blog"}); #line 14 -testRunner.And("I fill in", ((string)(null)), table1); + testRunner.And("I fill in", ((string)(null)), table1); #line 17 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 18 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 19 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 20 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -109,21 +109,21 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there."}); #line 21 -testRunner.And("I fill in", ((string)(null)), table2); + testRunner.And("I fill in", ((string)(null)), table2); #line 25 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 26 -testRunner.And("I go to \"my-blog\""); + testRunner.And("I go to \"my-blog\""); #line 27 -testRunner.Then("I should see \"]*>.*?My Blog.*?\""); + testRunner.Then("I should see \"]*>.*?My Blog.*?\""); #line 28 -testRunner.And("I should see \"]*>.*?My Post.*?\""); + testRunner.And("I should see \"]*>.*?My Post.*?\""); #line 29 -testRunner.When("I go to \"my-blog/my-post\""); + testRunner.When("I go to \"my-blog/my-post\""); #line 30 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 31 -testRunner.And("I should see \"Hi there.\""); + testRunner.And("I should see \"Hi there.\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -138,9 +138,9 @@ testRunner.And("I should see \"Hi there.\""); #line 33 this.ScenarioSetup(scenarioInfo); #line 34 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 35 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line hidden TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -149,15 +149,15 @@ testRunner.When("I go to \"admin/blogs/create\""); "Routable.Title", "My Blog"}); #line 36 -testRunner.And("I fill in", ((string)(null)), table3); + testRunner.And("I fill in", ((string)(null)), table3); #line 39 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 40 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 41 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 42 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -169,21 +169,21 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there."}); #line 43 -testRunner.And("I fill in", ((string)(null)), table4); + testRunner.And("I fill in", ((string)(null)), table4); #line 47 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 48 -testRunner.And("I go to \"my-blog/my-post\""); + testRunner.And("I go to \"my-blog/my-post\""); #line 49 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 50 -testRunner.And("I should see \"Hi there.\""); + testRunner.And("I should see \"Hi there.\""); #line 51 -testRunner.When("I go to \"admin/blogs\""); + testRunner.When("I go to \"admin/blogs\""); #line 52 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 53 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -195,21 +195,21 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there, again."}); #line 54 -testRunner.And("I fill in", ((string)(null)), table5); + testRunner.And("I fill in", ((string)(null)), table5); #line 58 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 59 -testRunner.And("I go to \"my-blog/my-post-2\""); + testRunner.And("I go to \"my-blog/my-post-2\""); #line 60 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 61 -testRunner.And("I should see \"Hi there, again.\""); + testRunner.And("I should see \"Hi there, again.\""); #line 62 -testRunner.When("I go to \"admin/blogs\""); + testRunner.When("I go to \"admin/blogs\""); #line 63 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 64 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -224,15 +224,15 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Are you still there?"}); #line 65 -testRunner.And("I fill in", ((string)(null)), table6); + testRunner.And("I fill in", ((string)(null)), table6); #line 70 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 71 -testRunner.And("I go to \"my-blog/my-post-3\""); + testRunner.And("I go to \"my-blog/my-post-3\""); #line 72 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 73 -testRunner.And("I should see \"Are you still there?\""); + testRunner.And("I should see \"Are you still there?\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -247,9 +247,9 @@ testRunner.And("I should see \"Are you still there?\""); #line 75 this.ScenarioSetup(scenarioInfo); #line 76 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 77 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line hidden TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -258,19 +258,19 @@ testRunner.When("I go to \"admin/blogs/create\""); "Routable.Title", "My Blog"}); #line 78 -testRunner.And("I fill in", ((string)(null)), table7); + testRunner.And("I fill in", ((string)(null)), table7); #line 81 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 82 -testRunner.And("I go to \"my-blog\""); + testRunner.And("I go to \"my-blog\""); #line 83 -testRunner.Then("I should see \"]*>.*?My Blog.*?\""); + testRunner.Then("I should see \"]*>.*?My Blog.*?\""); #line 84 -testRunner.When("I go to \"admin/blogs\""); + testRunner.When("I go to \"admin/blogs\""); #line 85 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 86 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -282,21 +282,21 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there."}); #line 87 -testRunner.And("I fill in", ((string)(null)), table8); + testRunner.And("I fill in", ((string)(null)), table8); #line 91 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 92 -testRunner.And("I go to \"my-blog/my-post\""); + testRunner.And("I go to \"my-blog/my-post\""); #line 93 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 94 -testRunner.And("I should see \"Hi there.\""); + testRunner.And("I should see \"Hi there.\""); #line 95 -testRunner.When("I go to \"admin/blogs\""); + testRunner.When("I go to \"admin/blogs\""); #line 96 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 97 -testRunner.And("I follow \"Blog Properties\""); + testRunner.And("I follow \"Blog Properties\""); #line hidden TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -305,19 +305,19 @@ testRunner.And("I follow \"Blog Properties\""); "Routable.Slug", "my-other-blog"}); #line 98 -testRunner.And("I fill in", ((string)(null)), table9); + testRunner.And("I fill in", ((string)(null)), table9); #line 101 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 102 -testRunner.And("I go to \"my-other-blog\""); + testRunner.And("I go to \"my-other-blog\""); #line 103 -testRunner.Then("I should see \"]*>.*?My Blog.*?\""); + testRunner.Then("I should see \"]*>.*?My Blog.*?\""); #line 104 -testRunner.When("I go to \"my-other-blog/my-post\""); + testRunner.When("I go to \"my-other-blog/my-post\""); #line 105 -testRunner.Then("I should see \"]*>.*?My Post.*?\""); + testRunner.Then("I should see \"]*>.*?My Post.*?\""); #line 106 -testRunner.And("I should see \"Hi there.\""); + testRunner.And("I should see \"Hi there.\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -330,9 +330,9 @@ testRunner.And("I should see \"Hi there.\""); #line 108 this.ScenarioSetup(scenarioInfo); #line 109 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 110 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line hidden TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -341,15 +341,15 @@ testRunner.When("I go to \"admin/blogs/create\""); "Routable.Title", "My Blog"}); #line 111 -testRunner.And("I fill in", ((string)(null)), table10); + testRunner.And("I fill in", ((string)(null)), table10); #line 114 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 115 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 116 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 117 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -361,15 +361,15 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there."}); #line 118 -testRunner.And("I fill in", ((string)(null)), table11); + testRunner.And("I fill in", ((string)(null)), table11); #line 122 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 123 -testRunner.And("I am redirected"); + testRunner.And("I am redirected"); #line 124 -testRunner.And("I go to \"my-blog/my-post\""); + testRunner.And("I go to \"my-blog/my-post\""); #line 125 -testRunner.Then("I should see \"\""); #line hidden testRunner.CollectScenarioErrors(); @@ -385,13 +385,13 @@ testRunner.Then("I should see \"\""); #line 139 -testRunner.When("I go to \"/XmlRpc/LiveWriter/Manifest\""); + testRunner.When("I go to \"/XmlRpc/LiveWriter/Manifest\""); #line 140 -testRunner.Then("the content type should be \"\\btext/xml\\b\""); + testRunner.Then("the content type should be \"\\btext/xml\\b\""); #line 141 -testRunner.And("I should see \"\""); #line 142 -testRunner.And("I should see \"Metaweblog\""); + testRunner.And("I should see \"Metaweblog\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -431,11 +431,11 @@ testRunner.And("I should see \"Metaweblog\""); #line 144 this.ScenarioSetup(scenarioInfo); #line 145 -testRunner.Given("I have installed Orchard at \"/OrchardLocal\""); + testRunner.Given("I have installed Orchard at \"/OrchardLocal\""); #line 146 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line 147 -testRunner.Then("I should see \"http\\://localhost/OrchardLocal/\""); + testRunner.Then("I should see \"http\\://localhost/OrchardLocal/\""); #line hidden TechTalk.SpecFlow.Table table13 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -444,17 +444,17 @@ testRunner.Then("I should see \"http\\://localhost/OrchardLocal/\"" "Routable.Title", "My Blog"}); #line 148 -testRunner.When("I fill in", ((string)(null)), table13); + testRunner.When("I fill in", ((string)(null)), table13); #line 151 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 152 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 153 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 154 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line 155 -testRunner.Then("I should see \"http\\://localhost/OrchardLocal/my-blog/\""); + testRunner.Then("I should see \"http\\://localhost/OrchardLocal/my-blog/\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -469,11 +469,11 @@ testRunner.Then("I should see \"http\\://localhost/OrchardLocal/my-blog/http\\://localhost/\""); + testRunner.Then("I should see \"http\\://localhost/\""); #line hidden TechTalk.SpecFlow.Table table14 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -482,17 +482,17 @@ testRunner.Then("I should see \"http\\://localhost/\""); "Routable.Title", "My Blog"}); #line 161 -testRunner.When("I fill in", ((string)(null)), table14); + testRunner.When("I fill in", ((string)(null)), table14); #line 164 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 165 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 166 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 167 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line 168 -testRunner.Then("I should see \"http\\://localhost/my-blog/\""); + testRunner.Then("I should see \"http\\://localhost/my-blog/\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -507,9 +507,9 @@ testRunner.Then("I should see \"http\\://localhost/my-blog/\""); #line 170 this.ScenarioSetup(scenarioInfo); #line 171 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 172 -testRunner.When("I go to \"admin/blogs/create\""); + testRunner.When("I go to \"admin/blogs/create\""); #line hidden TechTalk.SpecFlow.Table table15 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -521,15 +521,15 @@ testRunner.When("I go to \"admin/blogs/create\""); "Routable.PromoteToHomePage", "true"}); #line 173 -testRunner.And("I fill in", ((string)(null)), table15); + testRunner.And("I fill in", ((string)(null)), table15); #line 177 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 178 -testRunner.And("I go to \"admin/blogs\""); + testRunner.And("I go to \"admin/blogs\""); #line 179 -testRunner.And("I follow \"My Blog\""); + testRunner.And("I follow \"My Blog\""); #line 180 -testRunner.And("I follow \"New Post\""); + testRunner.And("I follow \"New Post\""); #line hidden TechTalk.SpecFlow.Table table16 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -541,23 +541,23 @@ testRunner.And("I follow \"New Post\""); "Body.Text", "Hi there."}); #line 181 -testRunner.And("I fill in", ((string)(null)), table16); + testRunner.And("I fill in", ((string)(null)), table16); #line 185 -testRunner.And("I hit \"Publish Now\""); + testRunner.And("I hit \"Publish Now\""); #line 186 -testRunner.And("I am redirected"); + testRunner.And("I am redirected"); #line 187 -testRunner.And("I go to \"/\""); + testRunner.And("I go to \"/\""); #line 188 -testRunner.Then("I should see \"

My Blog

\""); + testRunner.Then("I should see \"

My Blog

\""); #line 189 -testRunner.When("I go to \"/my-blog\""); + testRunner.When("I go to \"/my-blog\""); #line 190 -testRunner.Then("the status should be 404 \"Not Found\""); + testRunner.Then("the status should be 404 \"Not Found\""); #line 191 -testRunner.When("I go to \"/my-post\""); + testRunner.When("I go to \"/my-post\""); #line 192 -testRunner.Then("I should see \"

My Post

\""); + testRunner.Then("I should see \"

My Post

\""); #line hidden testRunner.CollectScenarioErrors(); }