From 9e0387c76a8a6f39f5394795f17ddaaa9cf4ca21 Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Fri, 10 Dec 2010 21:42:57 -0800 Subject: [PATCH] Remove all traces of "default.aspx" --HG-- branch : dev --- .../Hosting/RequestExtensions.cs | 10 +- src/Orchard.Specs/MultiTenancy.feature | 2 +- src/Orchard.Specs/MultiTenancy.feature.cs | 218 +++++++++--------- src/Orchard.Specs/Pages.feature | 4 +- src/Orchard.Specs/Pages.feature.cs | 4 +- src/Orchard.Specs/Setup.feature | 4 +- src/Orchard.Specs/Setup.feature.cs | 50 ++-- src/Orchard.Web/Web.config | 2 - .../TestData/ExtraFiles.xml | 4 - .../TestData/SimpleWebProject.xml | 5 - 10 files changed, 147 insertions(+), 156 deletions(-) diff --git a/src/Orchard.Specs/Hosting/RequestExtensions.cs b/src/Orchard.Specs/Hosting/RequestExtensions.cs index 7cd5b1143..0da7f701d 100644 --- a/src/Orchard.Specs/Hosting/RequestExtensions.cs +++ b/src/Orchard.Specs/Hosting/RequestExtensions.cs @@ -15,13 +15,15 @@ namespace Orchard.Specs.Hosting { var physicalPath = Bleroy.FluentPath.Path.Get(webHost.PhysicalDirectory); - urlPath = StripVDir(urlPath, webHost.VirtualDirectory); + bool isHomepage = urlPath == "/"; + + if (!isHomepage) + urlPath = StripVDir(urlPath, webHost.VirtualDirectory); + var details = new RequestDetails { HostName = webHost.HostName, UrlPath = urlPath, - Page = physicalPath - .Combine(urlPath.TrimStart('/', '\\')) - .GetRelativePath(physicalPath) + Page = (isHomepage ? "" : physicalPath.Combine(urlPath.TrimStart('/', '\\')).GetRelativePath(physicalPath).ToString()) }; if (!string.IsNullOrEmpty(webHost.Cookies)) { diff --git a/src/Orchard.Specs/MultiTenancy.feature b/src/Orchard.Specs/MultiTenancy.feature index 8890a98a0..c8a5bcf34 100644 --- a/src/Orchard.Specs/MultiTenancy.feature +++ b/src/Orchard.Specs/MultiTenancy.feature @@ -89,7 +89,7 @@ Scenario: A new tenant runs the setup | AdminPassword | 6655321 | | ConfirmPassword | 6655321 | And I hit "Finish Setup" - And I go to "/Default.aspx" + And I go to "/" Then I should see "Scott Site" And I should see "Welcome" diff --git a/src/Orchard.Specs/MultiTenancy.feature.cs b/src/Orchard.Specs/MultiTenancy.feature.cs index 8c653f8d8..a3371537d 100644 --- a/src/Orchard.Specs/MultiTenancy.feature.cs +++ b/src/Orchard.Specs/MultiTenancy.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("Multiple tenant management")] @@ -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"), "Multiple tenant management", "In order to host several isolated web applications\r\nAs a root Orchard system oper" + - "ator\r\nI want to create and manage tenant configurations", ((string[])(null))); + "ator\r\nI want to create and manage tenant configurations", GenerationTargetLanguage.CSharp, ((string[])(null))); testRunner.OnFeatureStart(featureInfo); } @@ -61,17 +61,17 @@ 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.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 9 -testRunner.When("I go to \"Admin/MultiTenancy\""); + testRunner.When("I go to \"Admin/MultiTenancy\""); #line 10 -testRunner.Then("I should see \"List of Site's Tenants\""); + testRunner.Then("I should see \"List of Site's Tenants\""); #line 11 -testRunner.And("I should see \"

Default

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

Default

\""); #line 12 -testRunner.And("the status should be 200 \"OK\""); + testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -84,15 +84,15 @@ testRunner.And("the status should be 200 \"OK\""); #line 14 this.ScenarioSetup(scenarioInfo); #line 15 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 16 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 17 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line 18 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 19 -testRunner.Then("I should see \"is required\""); + testRunner.Then("I should see \"is required\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -105,11 +105,11 @@ testRunner.Then("I should see \"is required\""); #line 21 this.ScenarioSetup(scenarioInfo); #line 22 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 23 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 24 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -118,15 +118,15 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "Name", "Scott"}); #line 25 -testRunner.And("I fill in", ((string)(null)), table1); + testRunner.And("I fill in", ((string)(null)), table1); #line 28 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 29 -testRunner.And("I am redirected"); + testRunner.And("I am redirected"); #line 30 -testRunner.Then("I should see \"

Scott

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

Scott

\""); #line 31 -testRunner.And("the status should be 200 \"OK\""); + testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -139,11 +139,11 @@ testRunner.And("the status should be 200 \"OK\""); #line 33 this.ScenarioSetup(scenarioInfo); #line 34 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 35 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 36 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -152,15 +152,15 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "Name", "Scott"}); #line 37 -testRunner.And("I fill in", ((string)(null)), table2); + testRunner.And("I fill in", ((string)(null)), table2); #line 40 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 41 -testRunner.And("I am redirected"); + testRunner.And("I am redirected"); #line 42 -testRunner.Then("I should see \"
  • \""); + testRunner.Then("I should see \"
  • \""); #line 43 -testRunner.And("the status should be 200 \"OK\""); + testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -173,11 +173,11 @@ testRunner.And("the status should be 200 \"OK\""); #line 45 this.ScenarioSetup(scenarioInfo); #line 46 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 47 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 48 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -189,17 +189,17 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "RequestUrlHost", "scott.example.org"}); #line 49 -testRunner.And("I fill in", ((string)(null)), table3); + testRunner.And("I fill in", ((string)(null)), table3); #line 53 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 54 -testRunner.And("I go to \"/Setup\" on host scott.example.org"); + testRunner.And("I go to \"/Setup\" on host scott.example.org"); #line 55 -testRunner.Then("I should see \"Welcome to Orchard\""); + testRunner.Then("I should see \"Welcome to Orchard\""); #line 56 -testRunner.And("I should see \"Finish Setup\""); + testRunner.And("I should see \"Finish Setup\""); #line 57 -testRunner.And("the status should be 200 \"OK\""); + testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -212,11 +212,11 @@ testRunner.And("the status should be 200 \"OK\""); #line 59 this.ScenarioSetup(scenarioInfo); #line 60 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 61 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 62 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -231,21 +231,21 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "DataProvider", "SqlCe"}); #line 63 -testRunner.And("I fill in", ((string)(null)), table4); + testRunner.And("I fill in", ((string)(null)), table4); #line 68 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 69 -testRunner.And("I am redirected"); + testRunner.And("I am redirected"); #line 70 -testRunner.And("I go to \"/Setup\" on host scott.example.org"); + testRunner.And("I go to \"/Setup\" on host scott.example.org"); #line 71 -testRunner.Then("I should see \"Welcome to Orchard\""); + testRunner.Then("I should see \"Welcome to Orchard\""); #line 72 -testRunner.And("I should see \"Finish Setup\""); + testRunner.And("I should see \"Finish Setup\""); #line 73 -testRunner.And("I should not see \"SQL Server Compact\""); + testRunner.And("I should not see \"SQL Server Compact\""); #line 74 -testRunner.And("the status should be 200 \"OK\""); + testRunner.And("the status should be 200 \"OK\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -258,11 +258,11 @@ testRunner.And("the status should be 200 \"OK\""); #line 76 this.ScenarioSetup(scenarioInfo); #line 77 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 78 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 79 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -274,11 +274,11 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "RequestUrlHost", "scott.example.org"}); #line 80 -testRunner.And("I fill in", ((string)(null)), table5); + testRunner.And("I fill in", ((string)(null)), table5); #line 84 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 85 -testRunner.And("I go to \"/Setup\" on host scott.example.org"); + testRunner.And("I go to \"/Setup\" on host scott.example.org"); #line hidden TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -293,15 +293,15 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org"); "ConfirmPassword", "6655321"}); #line 86 -testRunner.And("I fill in", ((string)(null)), table6); + testRunner.And("I fill in", ((string)(null)), table6); #line 91 -testRunner.And("I hit \"Finish Setup\""); + testRunner.And("I hit \"Finish Setup\""); #line 92 -testRunner.And("I go to \"/Default.aspx\""); + testRunner.And("I go to \"/\""); #line 93 -testRunner.Then("I should see \"Scott Site\""); + testRunner.Then("I should see \"Scott Site\""); #line 94 -testRunner.And("I should see \"Welcome\""); + testRunner.And("I should see \"Welcome\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -314,11 +314,11 @@ testRunner.And("I should see \"Welcome\""); #line 96 this.ScenarioSetup(scenarioInfo); #line 97 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 98 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 99 -testRunner.When("I go to \"Admin/MultiTenancy/Add\""); + testRunner.When("I go to \"Admin/MultiTenancy/Add\""); #line hidden TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -330,11 +330,11 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\""); "RequestUrlHost", "scott.example.org"}); #line 100 -testRunner.And("I fill in", ((string)(null)), table7); + testRunner.And("I fill in", ((string)(null)), table7); #line 104 -testRunner.And("I hit \"Save\""); + testRunner.And("I hit \"Save\""); #line 105 -testRunner.And("I go to \"/Setup\" on host scott.example.org"); + testRunner.And("I go to \"/Setup\" on host scott.example.org"); #line hidden TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -349,17 +349,17 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org"); "ConfirmPassword", "6655321"}); #line 106 -testRunner.And("I fill in", ((string)(null)), table8); + testRunner.And("I fill in", ((string)(null)), table8); #line 111 -testRunner.And("I hit \"Finish Setup\""); + testRunner.And("I hit \"Finish Setup\""); #line 112 -testRunner.And("I go to \"/Admin/MultiTenancy/Edit/Scott\" on host localhost"); + testRunner.And("I go to \"/Admin/MultiTenancy/Edit/Scott\" on host localhost"); #line 113 -testRunner.Then("I should see \"

    Edit Tenant

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

    Edit Tenant

    \""); #line 114 -testRunner.And("I should see \"

    Scott

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

    Scott

    \""); #line 115 -testRunner.And("I should not see \"Allow the tenant to set up the database\""); + testRunner.And("I should not see \"Allow the tenant to set up the database\""); #line hidden testRunner.CollectScenarioErrors(); } @@ -372,13 +372,13 @@ testRunner.And("I should not see \"Allow the tenant to set up the database\""); #line 117 this.ScenarioSetup(scenarioInfo); #line 118 -testRunner.Given("I have installed Orchard"); + testRunner.Given("I have installed Orchard"); #line 119 -testRunner.And("I have installed \"Orchard.MultiTenancy\""); + testRunner.And("I have installed \"Orchard.MultiTenancy\""); #line 120 -testRunner.When("I go to \"Admin/MultiTenancy\""); + testRunner.When("I go to \"Admin/MultiTenancy\""); #line 121 -testRunner.Then("I should not see \"