Fix specflow test

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-07-14 17:29:23 -07:00
parent 881b71db4b
commit 522a5ff6dc
3 changed files with 42 additions and 34 deletions

View File

@@ -9,8 +9,8 @@
<components> <components>
<component instance-scope="single-instance" <component instance-scope="single-instance"
type="Orchard.Specs.Hosting.TraceEnabledSessionFactoryBuilder, Orchard.Specs" type="Orchard.Specs.Hosting.TraceEnabledDataServicesProviderFactory, Orchard.Specs"
service="Orchard.Data.Builders.ISessionFactoryBuilder, Orchard.Framework"/> service="Orchard.Data.Providers.IDataServicesProviderFactory, Orchard.Framework"/>
</components> </components>
</autofac> </autofac>

View File

@@ -41,6 +41,7 @@ Scenario: Calling setup on a brand new install
| name | value | | name | value |
| SiteName | My Site | | SiteName | My Site |
| AdminPassword | 6655321 | | AdminPassword | 6655321 |
| ConfirmPassword | 6655321 |
And I hit "Finish Setup" And I hit "Finish Setup"
And I go to "/Default.aspx" And I go to "/Default.aspx"
Then I should see "<h1>My Site</h1>" Then I should see "<h1>My Site</h1>"

View File

@@ -1,18 +1,21 @@
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/). // This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.2.0.0 // SpecFlow Version:1.3.2.0
// Runtime Version:2.0.50727.4200 // Runtime Version:4.0.30319.1
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
#region Designer generated code
namespace Orchard.Specs namespace Orchard.Specs
{ {
using TechTalk.SpecFlow; using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Setup")] [NUnit.Framework.DescriptionAttribute("Setup")]
public partial class SetupFeature public partial class SetupFeature
@@ -58,19 +61,19 @@ namespace Orchard.Specs
#line 6 #line 6
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 7 #line 7
testRunner.Given("I have a clean site"); testRunner.Given("I have a clean site");
#line 8 #line 8
testRunner.And("I have module \"Orchard.Setup\""); testRunner.And("I have module \"Orchard.Setup\"");
#line 9 #line 9
testRunner.And("I have theme \"SafeMode\""); testRunner.And("I have theme \"SafeMode\"");
#line 10 #line 10
testRunner.When("I go to \"/Default.aspx\""); testRunner.When("I go to \"/Default.aspx\"");
#line 11 #line 11
testRunner.Then("I should see \"Welcome to Orchard\""); testRunner.Then("I should see \"Welcome to Orchard\"");
#line 12 #line 12
testRunner.And("I should see \"Finish Setup\""); testRunner.And("I should see \"Finish Setup\"");
#line 13 #line 13
testRunner.And("the status should be 200 OK"); testRunner.And("the status should be 200 OK");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@@ -83,19 +86,19 @@ this.ScenarioSetup(scenarioInfo);
#line 15 #line 15
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 16 #line 16
testRunner.Given("I have a clean site"); testRunner.Given("I have a clean site");
#line 17 #line 17
testRunner.And("I have module \"Orchard.Setup\""); testRunner.And("I have module \"Orchard.Setup\"");
#line 18 #line 18
testRunner.And("I have theme \"SafeMode\""); testRunner.And("I have theme \"SafeMode\"");
#line 19 #line 19
testRunner.When("I go to \"/Setup\""); testRunner.When("I go to \"/Setup\"");
#line 20 #line 20
testRunner.Then("I should see \"Welcome to Orchard\""); testRunner.Then("I should see \"Welcome to Orchard\"");
#line 21 #line 21
testRunner.And("I should see \"Finish Setup\""); testRunner.And("I should see \"Finish Setup\"");
#line 22 #line 22
testRunner.And("the status should be 200 OK"); testRunner.And("the status should be 200 OK");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@@ -108,19 +111,19 @@ this.ScenarioSetup(scenarioInfo);
#line 24 #line 24
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 25 #line 25
testRunner.Given("I have a clean site"); testRunner.Given("I have a clean site");
#line 26 #line 26
testRunner.And("I have module \"Orchard.Setup\""); testRunner.And("I have module \"Orchard.Setup\"");
#line 27 #line 27
testRunner.And("I have theme \"SafeMode\""); testRunner.And("I have theme \"SafeMode\"");
#line 28 #line 28
testRunner.When("I go to \"/Setup\""); testRunner.When("I go to \"/Setup\"");
#line 29 #line 29
testRunner.And("I hit \"Finish Setup\""); testRunner.And("I hit \"Finish Setup\"");
#line 30 #line 30
testRunner.Then("I should see \"Site name is required\""); testRunner.Then("I should see \"Site name is required\"");
#line 31 #line 31
testRunner.And("I should see \"Password is required\""); testRunner.And("I should see \"Password is required\"");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@@ -147,9 +150,9 @@ this.ScenarioSetup(scenarioInfo);
"theme", "theme",
"SafeMode, Classic"}); "SafeMode, Classic"});
#line 34 #line 34
testRunner.Given("I have a clean site with", ((string)(null)), table1); testRunner.Given("I have a clean site with", ((string)(null)), table1);
#line 39 #line 39
testRunner.And("I am on \"/Setup\""); testRunner.And("I am on \"/Setup\"");
#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",
@@ -160,20 +163,24 @@ this.ScenarioSetup(scenarioInfo);
table2.AddRow(new string[] { table2.AddRow(new string[] {
"AdminPassword", "AdminPassword",
"6655321"}); "6655321"});
table2.AddRow(new string[] {
"ConfirmPassword",
"6655321"});
#line 40 #line 40
testRunner.When("I fill in", ((string)(null)), table2); testRunner.When("I fill in", ((string)(null)), table2);
#line 44
testRunner.And("I hit \"Finish Setup\"");
#line 45 #line 45
testRunner.And("I go to \"/Default.aspx\""); testRunner.And("I hit \"Finish Setup\"");
#line 46 #line 46
testRunner.Then("I should see \"<h1>My Site</h1>\""); testRunner.And("I go to \"/Default.aspx\"");
#line 47 #line 47
testRunner.And("I should see \"Welcome, <strong>admin</strong>!\""); testRunner.Then("I should see \"<h1>My Site</h1>\"");
#line 48 #line 48
testRunner.And("I should see \"you\'ve successfully set-up your Orchard site\""); testRunner.And("I should see \"Welcome, <strong>admin</strong>!\"");
#line 49
testRunner.And("I should see \"you\'ve successfully set-up your Orchard site\"");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
} }
} }
#endregion