Fixing Page spec flow tests

--HG--
branch : autoroute
This commit is contained in:
Sebastien Ros
2012-02-06 17:42:49 -08:00
parent fd89f5b101
commit 74a933fb4e
12 changed files with 96 additions and 93 deletions

View File

@@ -1,4 +1,4 @@
ff8186d1974b453d2406709f925ac953814fbf54 src/Orchard.Web/Modules/Orchard.Autoroute 6766f8961c16fce20dd9f1cff2abbabc1d8913f3 src/Orchard.Web/Modules/Orchard.Autoroute
c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms c54cb640d6bc14c51b9fb9bd78231bb0facec067 src/Orchard.Web/Modules/Orchard.Forms
204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules 204bdef384f41bb5e463bed6b98a056945a7d839 src/Orchard.Web/Modules/Orchard.Rules
ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease ce578373f907c0a55fd91229a344f0755f290174 src/Orchard.Web/Modules/Orchard.TaskLease

View File

@@ -23,7 +23,7 @@ namespace Orchard.Specs.Bindings {
webApp.GivenIHaveACleanSiteWith( webApp.GivenIHaveACleanSiteWith(
virtualDirectory, virtualDirectory,
TableData( TableData(
new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Lists, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup" }, new { extension = "Module", names = "Orchard.Setup, Orchard.Pages, Orchard.Blogs, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.Lists, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.jQuery, Orchard.Tags, TinyMce, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Tokens, Orchard.Autoroute" },
new { extension = "Core", names = "Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title" }, new { extension = "Core", names = "Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title" },
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" })); new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));

View File

@@ -67,7 +67,7 @@ Scenario: I can create a new blog with multiple blog posts each with the same ti
And I fill in And I fill in
| name | value | | name | value |
| Title.Title | My Post | | Title.Title | My Post |
| Routable.Slug | my-post | | Autoroute.CurrentUrl | my-post |
| Body.Text | Are you still there? | | Body.Text | Are you still there? |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "my-blog/my-post-3" And I go to "my-blog/my-post-3"
@@ -99,7 +99,7 @@ Scenario: I can create a new blog and blog post and when I change the slug of th
And I follow "Blog Properties" And I follow "Blog Properties"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Slug | my-other-blog | | Autoroute.CurrentUrl | my-other-blog |
And I hit "Save" And I hit "Save"
And I go to "my-other-blog" And I go to "my-other-blog"
Then I should see "<h1[^>]*>.*?My Blog.*?</h1>" Then I should see "<h1[^>]*>.*?My Blog.*?</h1>"
@@ -175,7 +175,7 @@ Scenario: I set my blog to be the content for the home page and the posts for th
And I fill in And I fill in
| name | value | | name | value |
| Title.Title | My Blog | | Title.Title | My Blog |
| Routable.PromoteToHomePage | true | | Autoroute.PromoteToHomePage | true |
And I hit "Save" And I hit "Save"
And I go to "admin/blogs" And I go to "admin/blogs"
And I follow "My Blog" And I follow "My Blog"

View File

@@ -98,7 +98,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 14 #line 14
testRunner.And("I fill in", ((string)(null)), table1); testRunner.And("I fill in", ((string)(null)), table1);
@@ -115,7 +115,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -162,7 +162,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table3.AddRow(new string[] { table3.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 38 #line 38
testRunner.And("I fill in", ((string)(null)), table3); testRunner.And("I fill in", ((string)(null)), table3);
@@ -179,7 +179,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table4.AddRow(new string[] { table4.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table4.AddRow(new string[] { table4.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -205,7 +205,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table5.AddRow(new string[] { table5.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table5.AddRow(new string[] { table5.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -231,10 +231,10 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table6.AddRow(new string[] { table6.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table6.AddRow(new string[] { table6.AddRow(new string[] {
"Routable.Slug", "Autoroute.CurrentUrl",
"my-post"}); "my-post"});
table6.AddRow(new string[] { table6.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -255,11 +255,11 @@ this.ScenarioSetup(scenarioInfo);
[NUnit.Framework.TestAttribute()] [NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("I can create a new blog and blog post and when I change the slug of the blog the " + [NUnit.Framework.DescriptionAttribute("I can create a new blog and blog post and when I change the slug of the blog the " +
"path of the plog post is updated")] "path of the blog post is updated")]
public virtual void ICanCreateANewBlogAndBlogPostAndWhenIChangeTheSlugOfTheBlogThePathOfThePlogPostIsUpdated() public virtual void ICanCreateANewBlogAndBlogPostAndWhenIChangeTheSlugOfTheBlogThePathOfTheBlogPostIsUpdated()
{ {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create a new blog and blog post and when I change the slug of the blog the " + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create a new blog and blog post and when I change the slug of the blog the " +
"path of the plog post is updated", ((string[])(null))); "path of the blog post is updated", ((string[])(null)));
#line 77 #line 77
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 78 #line 78
@@ -271,7 +271,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table7.AddRow(new string[] { table7.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 80 #line 80
testRunner.And("I fill in", ((string)(null)), table7); testRunner.And("I fill in", ((string)(null)), table7);
@@ -292,7 +292,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table8.AddRow(new string[] { table8.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table8.AddRow(new string[] { table8.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -318,7 +318,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table9.AddRow(new string[] { table9.AddRow(new string[] {
"Routable.Slug", "Autoroute.CurrentUrl",
"my-other-blog"}); "my-other-blog"});
#line 100 #line 100
testRunner.And("I fill in", ((string)(null)), table9); testRunner.And("I fill in", ((string)(null)), table9);
@@ -354,7 +354,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table10.AddRow(new string[] { table10.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 113 #line 113
testRunner.And("I fill in", ((string)(null)), table10); testRunner.And("I fill in", ((string)(null)), table10);
@@ -371,7 +371,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table11.AddRow(new string[] { table11.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table11.AddRow(new string[] { table11.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -413,7 +413,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table12.AddRow(new string[] { table12.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 135 #line 135
testRunner.And("I fill in", ((string)(null)), table12); testRunner.And("I fill in", ((string)(null)), table12);
@@ -457,7 +457,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table13.AddRow(new string[] { table13.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 150 #line 150
testRunner.When("I fill in", ((string)(null)), table13); testRunner.When("I fill in", ((string)(null)), table13);
@@ -495,7 +495,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table14.AddRow(new string[] { table14.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 163 #line 163
testRunner.When("I fill in", ((string)(null)), table14); testRunner.When("I fill in", ((string)(null)), table14);
@@ -531,10 +531,10 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table15.AddRow(new string[] { table15.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
table15.AddRow(new string[] { table15.AddRow(new string[] {
"Routable.PromoteToHomePage", "Autoroute.PromoteToHomePage",
"true"}); "true"});
#line 175 #line 175
testRunner.And("I fill in", ((string)(null)), table15); testRunner.And("I fill in", ((string)(null)), table15);
@@ -551,7 +551,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table16.AddRow(new string[] { table16.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table16.AddRow(new string[] { table16.AddRow(new string[] {
"Body.Text", "Body.Text",

View File

@@ -8,14 +8,14 @@ Scenario: HTML markup in any given comment is encoded
When I go to "admin/blogs/create" When I go to "admin/blogs/create"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | My Blog | | Title.Title | My Blog |
And I hit "Save" And I hit "Save"
And I go to "admin/blogs" And I go to "admin/blogs"
And I follow "My Blog" And I follow "My Blog"
And I follow "New Post" where class name has "primaryAction" And I follow "New Post" where class name has "primaryAction"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | My Post | | Title.Title | My Post |
| Body.Text | Hi there. | | Body.Text | Hi there. |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "my-blog/my-post" And I go to "my-blog/my-post"

View File

@@ -81,7 +81,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Blog"}); "My Blog"});
#line 9 #line 9
testRunner.And("I fill in", ((string)(null)), table1); testRunner.And("I fill in", ((string)(null)), table1);
@@ -98,7 +98,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Routable.Title", "Title.Title",
"My Post"}); "My Post"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Body.Text", "Body.Text",

View File

@@ -8,7 +8,7 @@ Scenario: I can create a new list
When I go to "Admin/Contents/Create/List" When I go to "Admin/Contents/Create/List"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | MyList | | Title.Title | MyList |
And I hit "Save" And I hit "Save"
And I go to "Admin/Contents/List/List" And I go to "Admin/Contents/List/List"
Then I should see "MyList" Then I should see "MyList"
@@ -19,7 +19,7 @@ Scenario: I can add content items to a list
When I go to "Admin/Contents/Create/List" When I go to "Admin/Contents/Create/List"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | MyList | | Title.Title | MyList |
And I hit "Save" And I hit "Save"
And I go to "Admin/Contents/List/List" And I go to "Admin/Contents/List/List"
Then I should see "MyList" Then I should see "MyList"
@@ -30,7 +30,7 @@ Scenario: I can add content items to a list
When I follow "MyType" where href has "ReturnUrl" When I follow "MyType" where href has "ReturnUrl"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | MyContentItem | | Title.Title | MyContentItem |
And I hit "Save" And I hit "Save"
And I am redirected And I am redirected
Then I should see "Manage MyList" Then I should see "Manage MyList"

View File

@@ -81,7 +81,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Routable.Title", "Title.Title",
"MyList"}); "MyList"});
#line 9 #line 9
testRunner.And("I fill in", ((string)(null)), table1); testRunner.And("I fill in", ((string)(null)), table1);
@@ -113,7 +113,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Routable.Title", "Title.Title",
"MyList"}); "MyList"});
#line 20 #line 20
testRunner.And("I fill in", ((string)(null)), table2); testRunner.And("I fill in", ((string)(null)), table2);
@@ -138,7 +138,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table3.AddRow(new string[] { table3.AddRow(new string[] {
"Routable.Title", "Title.Title",
"MyContentItem"}); "MyContentItem"});
#line 31 #line 31
testRunner.And("I fill in", ((string)(null)), table3); testRunner.And("I fill in", ((string)(null)), table3);

View File

@@ -5,6 +5,7 @@
Scenario: In the admin (menu) there is a link to create a Page Scenario: In the admin (menu) there is a link to create a Page
Given I have installed Orchard Given I have installed Orchard
And I have installed "Orchard.jQuery"
When I go to "admin" When I go to "admin"
Then I should see "<a href="/Admin/Contents/Create/Page"[^>]*>Page</a>" Then I should see "<a href="/Admin/Contents/Create/Page"[^>]*>Page</a>"
@@ -13,7 +14,7 @@ Scenario: I can create and publish a new Page
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is super. | | Body.Text | This is super. |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "super-duper" And I go to "super-duper"
@@ -25,7 +26,7 @@ Scenario: If I create a page which gets a conflicting path generated its path is
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is super. | | Body.Text | This is super. |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "super-duper" And I go to "super-duper"
@@ -34,7 +35,7 @@ Scenario: If I create a page which gets a conflicting path generated its path is
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is super number two. | | Body.Text | This is super number two. |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "super-duper-2" And I go to "super-duper-2"
@@ -46,9 +47,9 @@ Scenario: A new page marked to be the home page and publish does take over the h
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is a draft of the new home page. | | Body.Text | This is a draft of the new home page. |
| Routable.PromoteToHomePage | true | | Autoroute.PromoteToHomePage | true |
And I hit "Publish Now" And I hit "Publish Now"
And I go to "/" And I go to "/"
Then I should see "<h1>Super Duper</h1>" Then I should see "<h1>Super Duper</h1>"
@@ -60,9 +61,9 @@ Scenario: A new page marked to be the home page but only saved as draft does not
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Drafty | | Title.Title | Drafty |
| Body.Text | This is a draft of the new home page. | | Body.Text | This is a draft of the new home page. |
| Routable.PromoteToHomePage | true | | Autoroute.PromoteToHomePage | true |
And I hit "Save" And I hit "Save"
And I go to "/" And I go to "/"
Then I should see "<h1>Welcome to Orchard!</h1>" Then I should see "<h1>Welcome to Orchard!</h1>"

View File

@@ -75,8 +75,10 @@ this.ScenarioSetup(scenarioInfo);
#line 7 #line 7
testRunner.Given("I have installed Orchard"); testRunner.Given("I have installed Orchard");
#line 8 #line 8
testRunner.When("I go to \"admin\""); testRunner.And("I have installed \"Orchard.jQuery\"");
#line 9 #line 9
testRunner.When("I go to \"admin\"");
#line 10
testRunner.Then("I should see \"<a href=\"/Admin/Contents/Create/Page\"[^>]*>Page</a>\""); testRunner.Then("I should see \"<a href=\"/Admin/Contents/Create/Page\"[^>]*>Page</a>\"");
#line hidden #line hidden
this.ScenarioCleanup(); this.ScenarioCleanup();
@@ -87,31 +89,31 @@ this.ScenarioSetup(scenarioInfo);
public virtual void ICanCreateAndPublishANewPage() public virtual void ICanCreateAndPublishANewPage()
{ {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create and publish a new Page", ((string[])(null))); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can create and publish a new Page", ((string[])(null)));
#line 11
this.ScenarioSetup(scenarioInfo);
#line 12 #line 12
testRunner.Given("I have installed Orchard"); this.ScenarioSetup(scenarioInfo);
#line 13 #line 13
testRunner.Given("I have installed Orchard");
#line 14
testRunner.When("I go to \"admin/contents/create/page\""); testRunner.When("I go to \"admin/contents/create/page\"");
#line hidden #line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name", "name",
"value"}); "value"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Body.Text", "Body.Text",
"This is super."}); "This is super."});
#line 14 #line 15
testRunner.And("I fill in", ((string)(null)), table1); testRunner.And("I fill in", ((string)(null)), table1);
#line 18
testRunner.And("I hit \"Publish Now\"");
#line 19 #line 19
testRunner.And("I go to \"super-duper\""); testRunner.And("I hit \"Publish Now\"");
#line 20 #line 20
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\""); testRunner.And("I go to \"super-duper\"");
#line 21 #line 21
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\"");
#line 22
testRunner.And("I should see \"This is super.\""); testRunner.And("I should see \"This is super.\"");
#line hidden #line hidden
this.ScenarioCleanup(); this.ScenarioCleanup();
@@ -124,53 +126,53 @@ this.ScenarioSetup(scenarioInfo);
{ {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("If I create a page which gets a conflicting path generated its path is made to be" + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("If I create a page which gets a conflicting path generated its path is made to be" +
" unique", ((string[])(null))); " unique", ((string[])(null)));
#line 23
this.ScenarioSetup(scenarioInfo);
#line 24 #line 24
testRunner.Given("I have installed Orchard"); this.ScenarioSetup(scenarioInfo);
#line 25 #line 25
testRunner.Given("I have installed Orchard");
#line 26
testRunner.When("I go to \"admin/contents/create/page\""); testRunner.When("I go to \"admin/contents/create/page\"");
#line hidden #line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name", "name",
"value"}); "value"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Body.Text", "Body.Text",
"This is super."}); "This is super."});
#line 26 #line 27
testRunner.And("I fill in", ((string)(null)), table2); testRunner.And("I fill in", ((string)(null)), table2);
#line 30
testRunner.And("I hit \"Publish Now\"");
#line 31 #line 31
testRunner.And("I go to \"super-duper\""); testRunner.And("I hit \"Publish Now\"");
#line 32 #line 32
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\""); testRunner.And("I go to \"super-duper\"");
#line 33 #line 33
testRunner.And("I should see \"This is super.\""); testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\"");
#line 34 #line 34
testRunner.And("I should see \"This is super.\"");
#line 35
testRunner.When("I go to \"admin/contents/create/page\""); testRunner.When("I go to \"admin/contents/create/page\"");
#line hidden #line hidden
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
"name", "name",
"value"}); "value"});
table3.AddRow(new string[] { table3.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table3.AddRow(new string[] { table3.AddRow(new string[] {
"Body.Text", "Body.Text",
"This is super number two."}); "This is super number two."});
#line 35 #line 36
testRunner.And("I fill in", ((string)(null)), table3); testRunner.And("I fill in", ((string)(null)), table3);
#line 39
testRunner.And("I hit \"Publish Now\"");
#line 40 #line 40
testRunner.And("I go to \"super-duper-2\""); testRunner.And("I hit \"Publish Now\"");
#line 41 #line 41
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\""); testRunner.And("I go to \"super-duper-2\"");
#line 42 #line 42
testRunner.Then("I should see \"<h1[^>]*>.*?Super Duper.*?</h1>\"");
#line 43
testRunner.And("I should see \"This is super number two.\""); testRunner.And("I should see \"This is super number two.\"");
#line hidden #line hidden
this.ScenarioCleanup(); this.ScenarioCleanup();
@@ -183,36 +185,36 @@ this.ScenarioSetup(scenarioInfo);
{ {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A new page marked to be the home page and publish does take over the home page an" + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A new page marked to be the home page and publish does take over the home page an" +
"d is not accessible from its own standard path", ((string[])(null))); "d is not accessible from its own standard path", ((string[])(null)));
#line 44
this.ScenarioSetup(scenarioInfo);
#line 45 #line 45
testRunner.Given("I have installed Orchard"); this.ScenarioSetup(scenarioInfo);
#line 46 #line 46
testRunner.Given("I have installed Orchard");
#line 47
testRunner.When("I go to \"admin/contents/create/page\""); testRunner.When("I go to \"admin/contents/create/page\"");
#line hidden #line hidden
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] { TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
"name", "name",
"value"}); "value"});
table4.AddRow(new string[] { table4.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table4.AddRow(new string[] { table4.AddRow(new string[] {
"Body.Text", "Body.Text",
"This is a draft of the new home page."}); "This is a draft of the new home page."});
table4.AddRow(new string[] { table4.AddRow(new string[] {
"Routable.PromoteToHomePage", "Autoroute.PromoteToHomePage",
"true"}); "true"});
#line 47 #line 48
testRunner.And("I fill in", ((string)(null)), table4); testRunner.And("I fill in", ((string)(null)), table4);
#line 52
testRunner.And("I hit \"Publish Now\"");
#line 53 #line 53
testRunner.And("I go to \"/\""); testRunner.And("I hit \"Publish Now\"");
#line 54 #line 54
testRunner.Then("I should see \"<h1>Super Duper</h1>\""); testRunner.And("I go to \"/\"");
#line 55 #line 55
testRunner.When("I go to \"super-duper\""); testRunner.Then("I should see \"<h1>Super Duper</h1>\"");
#line 56 #line 56
testRunner.When("I go to \"super-duper\"");
#line 57
testRunner.Then("the status should be 404 \"Not Found\""); testRunner.Then("the status should be 404 \"Not Found\"");
#line hidden #line hidden
this.ScenarioCleanup(); this.ScenarioCleanup();
@@ -225,32 +227,32 @@ this.ScenarioSetup(scenarioInfo);
{ {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A new page marked to be the home page but only saved as draft does not take over " + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A new page marked to be the home page but only saved as draft does not take over " +
"the home page", ((string[])(null))); "the home page", ((string[])(null)));
#line 58
this.ScenarioSetup(scenarioInfo);
#line 59 #line 59
testRunner.Given("I have installed Orchard"); this.ScenarioSetup(scenarioInfo);
#line 60 #line 60
testRunner.Given("I have installed Orchard");
#line 61
testRunner.When("I go to \"admin/contents/create/page\""); testRunner.When("I go to \"admin/contents/create/page\"");
#line hidden #line hidden
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] { TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
"name", "name",
"value"}); "value"});
table5.AddRow(new string[] { table5.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Drafty"}); "Drafty"});
table5.AddRow(new string[] { table5.AddRow(new string[] {
"Body.Text", "Body.Text",
"This is a draft of the new home page."}); "This is a draft of the new home page."});
table5.AddRow(new string[] { table5.AddRow(new string[] {
"Routable.PromoteToHomePage", "Autoroute.PromoteToHomePage",
"true"}); "true"});
#line 61 #line 62
testRunner.And("I fill in", ((string)(null)), table5); testRunner.And("I fill in", ((string)(null)), table5);
#line 66
testRunner.And("I hit \"Save\"");
#line 67 #line 67
testRunner.And("I go to \"/\""); testRunner.And("I hit \"Save\"");
#line 68 #line 68
testRunner.And("I go to \"/\"");
#line 69
testRunner.Then("I should see \"<h1>Welcome to Orchard!</h1>\""); testRunner.Then("I should see \"<h1>Welcome to Orchard!</h1>\"");
#line hidden #line hidden
this.ScenarioCleanup(); this.ScenarioCleanup();

View File

@@ -8,7 +8,7 @@ Scenario: I can add a tag to a new Page
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is super. | | Body.Text | This is super. |
| Tags.Tags | Foo, Bar | | Tags.Tags | Foo, Bar |
And I hit "Publish Now" And I hit "Publish Now"
@@ -22,7 +22,7 @@ Scenario: I can't add a tag with disallowed chars to a new Page
When I go to "admin/contents/create/page" When I go to "admin/contents/create/page"
And I fill in And I fill in
| name | value | | name | value |
| Routable.Title | Super Duper | | Title.Title | Super Duper |
| Body.Text | This is super. | | Body.Text | This is super. |
| Tags.Tags | Foo, I <3 Orchard | | Tags.Tags | Foo, I <3 Orchard |
And I hit "Publish Now" And I hit "Publish Now"

View File

@@ -81,7 +81,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table1.AddRow(new string[] { table1.AddRow(new string[] {
"Body.Text", "Body.Text",
@@ -121,7 +121,7 @@ this.ScenarioSetup(scenarioInfo);
"name", "name",
"value"}); "value"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Routable.Title", "Title.Title",
"Super Duper"}); "Super Duper"});
table2.AddRow(new string[] { table2.AddRow(new string[] {
"Body.Text", "Body.Text",