From 472183c3da240b89aaed86f13f941f044c3260d9 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Tue, 21 Sep 2010 18:00:55 -0700 Subject: [PATCH] And some more specflows fixed --HG-- branch : dev --- src/Orchard.Specs/Setup.feature | 30 ++-- src/Orchard.Specs/Setup.feature.cs | 141 +++++++++++------- .../Views/Admin/Index.cshtml | 3 +- 3 files changed, 107 insertions(+), 67 deletions(-) diff --git a/src/Orchard.Specs/Setup.feature b/src/Orchard.Specs/Setup.feature index 633950314..81a679fa0 100644 --- a/src/Orchard.Specs/Setup.feature +++ b/src/Orchard.Specs/Setup.feature @@ -4,36 +4,42 @@ Feature: Setup I want to setup a new site from the default screen Scenario: Root request shows setup form - Given I have a clean site - And I have module "Orchard.Setup" - And I have theme "SafeMode" + Given I have a clean site with + | extension | names | + | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Orchard.jQuery, TinyMce | + | core | Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, Shapes, XmlRpc | + | theme | SafeMode | When I go to "/Default.aspx" Then I should see "Welcome to Orchard" And I should see "Finish Setup" And the status should be 200 OK Scenario: Setup folder also shows setup form - Given I have a clean site - And I have module "Orchard.Setup" - And I have theme "SafeMode" + Given I have a clean site with + | extension | names | + | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Orchard.jQuery, TinyMce | + | core | Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, Shapes, XmlRpc | + | theme | SafeMode | When I go to "/Setup" Then I should see "Welcome to Orchard" And I should see "Finish Setup" And the status should be 200 OK Scenario: Some of the initial form values are required - Given I have a clean site - And I have module "Orchard.Setup" - And I have theme "SafeMode" + Given I have a clean site with + | extension | names | + | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Orchard.jQuery, TinyMce | + | core | Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, Shapes, XmlRpc | + | theme | SafeMode | When I go to "/Setup" And I hit "Finish Setup" - Then I should see "Site name is required" - And I should see "Password is required" + Then I should see "" + And I should see "" Scenario: Calling setup on a brand new install Given I have a clean site with | extension | names | - | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Orchard.jQuery, Orchard.Contents, TinyMce | + | module | Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Orchard.jQuery, TinyMce | | core | Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routable, PublishLater, Scheduling, Settings, Shapes, XmlRpc | | theme | SafeMode, Classic | And I am on "/Setup" diff --git a/src/Orchard.Specs/Setup.feature.cs b/src/Orchard.Specs/Setup.feature.cs index 320d2b1d2..6627d193e 100644 --- a/src/Orchard.Specs/Setup.feature.cs +++ b/src/Orchard.Specs/Setup.feature.cs @@ -60,19 +60,30 @@ namespace Orchard.Specs TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Root request shows setup form", ((string[])(null))); #line 6 this.ScenarioSetup(scenarioInfo); +#line hidden + TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { + "extension", + "names"}); + table1.AddRow(new string[] { + "module", + "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Or" + + "chard.jQuery, TinyMce"}); + table1.AddRow(new string[] { + "core", + "Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routa" + + "ble, PublishLater, Scheduling, Settings, Shapes, XmlRpc"}); + table1.AddRow(new string[] { + "theme", + "SafeMode"}); #line 7 -testRunner.Given("I have a clean site"); -#line 8 -testRunner.And("I have module \"Orchard.Setup\""); -#line 9 -testRunner.And("I have theme \"SafeMode\""); -#line 10 -testRunner.When("I go to \"/Default.aspx\""); -#line 11 -testRunner.Then("I should see \"Welcome to Orchard\""); +testRunner.Given("I have a clean site with", ((string)(null)), table1); #line 12 -testRunner.And("I should see \"Finish Setup\""); +testRunner.When("I go to \"/Default.aspx\""); #line 13 +testRunner.Then("I should see \"Welcome to Orchard\""); +#line 14 +testRunner.And("I should see \"Finish Setup\""); +#line 15 testRunner.And("the status should be 200 OK"); #line hidden testRunner.CollectScenarioErrors(); @@ -83,21 +94,32 @@ testRunner.And("the status should be 200 OK"); public virtual void SetupFolderAlsoShowsSetupForm() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Setup folder also shows setup form", ((string[])(null))); -#line 15 -this.ScenarioSetup(scenarioInfo); -#line 16 -testRunner.Given("I have a clean site"); #line 17 -testRunner.And("I have module \"Orchard.Setup\""); +this.ScenarioSetup(scenarioInfo); +#line hidden + TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { + "extension", + "names"}); + table2.AddRow(new string[] { + "module", + "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Or" + + "chard.jQuery, TinyMce"}); + table2.AddRow(new string[] { + "core", + "Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routa" + + "ble, PublishLater, Scheduling, Settings, Shapes, XmlRpc"}); + table2.AddRow(new string[] { + "theme", + "SafeMode"}); #line 18 -testRunner.And("I have theme \"SafeMode\""); -#line 19 +testRunner.Given("I have a clean site with", ((string)(null)), table2); +#line 23 testRunner.When("I go to \"/Setup\""); -#line 20 +#line 24 testRunner.Then("I should see \"Welcome to Orchard\""); -#line 21 +#line 25 testRunner.And("I should see \"Finish Setup\""); -#line 22 +#line 26 testRunner.And("the status should be 200 OK"); #line hidden testRunner.CollectScenarioErrors(); @@ -108,22 +130,35 @@ testRunner.And("the status should be 200 OK"); public virtual void SomeOfTheInitialFormValuesAreRequired() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Some of the initial form values are required", ((string[])(null))); -#line 24 -this.ScenarioSetup(scenarioInfo); -#line 25 -testRunner.Given("I have a clean site"); -#line 26 -testRunner.And("I have module \"Orchard.Setup\""); -#line 27 -testRunner.And("I have theme \"SafeMode\""); #line 28 -testRunner.When("I go to \"/Setup\""); +this.ScenarioSetup(scenarioInfo); +#line hidden + TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { + "extension", + "names"}); + table3.AddRow(new string[] { + "module", + "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Or" + + "chard.jQuery, TinyMce"}); + table3.AddRow(new string[] { + "core", + "Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routa" + + "ble, PublishLater, Scheduling, Settings, Shapes, XmlRpc"}); + table3.AddRow(new string[] { + "theme", + "SafeMode"}); #line 29 +testRunner.Given("I have a clean site with", ((string)(null)), table3); +#line 34 +testRunner.When("I go to \"/Setup\""); +#line 35 testRunner.And("I hit \"Finish Setup\""); -#line 30 -testRunner.Then("I should see \"Site name is required\""); -#line 31 -testRunner.And("I should see \"Password is required\""); +#line 36 +testRunner.Then("I should see \"\""); +#line 37 +testRunner.And("I should see \"\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -133,51 +168,51 @@ testRunner.And("I should see \"Password is required\""); public virtual void CallingSetupOnABrandNewInstall() { TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Calling setup on a brand new install", ((string[])(null))); -#line 33 +#line 39 this.ScenarioSetup(scenarioInfo); #line hidden - TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { + TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] { "extension", "names"}); - table1.AddRow(new string[] { + table4.AddRow(new string[] { "module", "Orchard.Setup, Orchard.Users, Orchard.Roles, Orchard.Comments, Orchard.Themes, Or" + - "chard.jQuery, Orchard.Contents, TinyMce"}); - table1.AddRow(new string[] { + "chard.jQuery, TinyMce"}); + table4.AddRow(new string[] { "core", "Common, Contents, ContentsLocation, Dashboard, Feeds, HomePage, Navigation, Routa" + "ble, PublishLater, Scheduling, Settings, Shapes, XmlRpc"}); - table1.AddRow(new string[] { + table4.AddRow(new string[] { "theme", "SafeMode, Classic"}); -#line 34 -testRunner.Given("I have a clean site with", ((string)(null)), table1); -#line 39 +#line 40 +testRunner.Given("I have a clean site with", ((string)(null)), table4); +#line 45 testRunner.And("I am on \"/Setup\""); #line hidden - TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { + TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] { "name", "value"}); - table2.AddRow(new string[] { + table5.AddRow(new string[] { "SiteName", "My Site"}); - table2.AddRow(new string[] { + table5.AddRow(new string[] { "AdminPassword", "6655321"}); - table2.AddRow(new string[] { + table5.AddRow(new string[] { "ConfirmPassword", "6655321"}); -#line 40 -testRunner.When("I fill in", ((string)(null)), table2); -#line 45 -testRunner.And("I hit \"Finish Setup\""); #line 46 +testRunner.When("I fill in", ((string)(null)), table5); +#line 51 +testRunner.And("I hit \"Finish Setup\""); +#line 52 testRunner.And("I go to \"/Default.aspx\""); -#line 47 +#line 53 testRunner.Then("I should see \"My Site\""); -#line 48 +#line 54 testRunner.And("I should see \"Welcome\""); -#line 49 +#line 55 testRunner.And("I should see \"you\'ve successfully set-up your Orchard site\""); #line hidden testRunner.CollectScenarioErrors(); diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.cshtml b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.cshtml index c9aded06e..65edce358 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Index.cshtml @@ -10,8 +10,7 @@
  • -

    @tenant.Name - @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) { +

    @tenant.Name @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) { - @Html.Link(Url.Tenant(tenant), Url.Tenant(tenant)) }