Fix SpecFlow test

HTML generation had changed since last time this test passed.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-07-17 13:45:34 -07:00
parent 4f1dd9d185
commit 8022b45560
2 changed files with 220 additions and 204 deletions

View File

@@ -27,7 +27,7 @@ Scenario: A new tenant is created
| Name | Scott |
And I hit "Save"
And I am redirected
Then I should see "<span class="tenantName">Scott</span>"
Then I should see "<h3>Scott</h3>"
And the status should be 200 OK
Scenario: A new tenant is created with uninitialized state
@@ -87,6 +87,7 @@ Scenario: A new tenant runs the setup
| name | value |
| SiteName | Scott Site |
| AdminPassword | 6655321 |
| ConfirmPassword | 6655321 |
And I hit "Finish Setup"
And I go to "/Default.aspx"
Then I should see "<h1>Scott Site</h1>"
@@ -106,6 +107,7 @@ Scenario: An existing initialized tenant cannot have its database option cleared
| name | value |
| SiteName | Scott Site |
| AdminPassword | 6655321 |
| ConfirmPassword | 6655321 |
And I hit "Finish Setup"
And I go to "/Admin/MultiTenancy/Edit/Scott" on host localhost
Then I should see "<h1>Edit Tenant</h1>"
@@ -132,6 +134,7 @@ Scenario: A running tenant can be disabled
| name | value |
| SiteName | Scott Site |
| AdminPassword | 6655321 |
| ConfirmPassword | 6655321 |
And I hit "Finish Setup"
And I go to "/Admin/MultiTenancy" on host localhost
And I hit "Suspend"
@@ -152,6 +155,7 @@ Scenario: A running tenant which is disabled can be enabled
| name | value |
| SiteName | Scott Site |
| AdminPassword | 6655321 |
| ConfirmPassword | 6655321 |
And I hit "Finish Setup"
And I go to "/Admin/MultiTenancy" on host localhost
And I hit "Suspend"

View File

@@ -9,7 +9,7 @@
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
namespace Orchard.Tests
namespace Orchard.Specs
{
using TechTalk.SpecFlow;
@@ -124,7 +124,7 @@ testRunner.And("I hit \"Save\"");
#line 29
testRunner.And("I am redirected");
#line 30
testRunner.Then("I should see \"<span class=\"tenantName\">Scott</span>\"");
testRunner.Then("I should see \"<h3>Scott</h3>\"");
#line 31
testRunner.And("the status should be 200 OK");
#line hidden
@@ -289,15 +289,18 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org");
table6.AddRow(new string[] {
"AdminPassword",
"6655321"});
table6.AddRow(new string[] {
"ConfirmPassword",
"6655321"});
#line 86
testRunner.And("I fill in", ((string)(null)), table6);
#line 90
testRunner.And("I hit \"Finish Setup\"");
#line 91
testRunner.And("I go to \"/Default.aspx\"");
testRunner.And("I hit \"Finish Setup\"");
#line 92
testRunner.Then("I should see \"<h1>Scott Site</h1>\"");
testRunner.And("I go to \"/Default.aspx\"");
#line 93
testRunner.Then("I should see \"<h1>Scott Site</h1>\"");
#line 94
testRunner.And("I should see \"Welcome, <strong>admin</strong>!\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -308,13 +311,13 @@ testRunner.And("I should see \"Welcome, <strong>admin</strong>!\"");
public virtual void AnExistingInitializedTenantCannotHaveItsDatabaseOptionCleared()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("An existing initialized tenant cannot have its database option cleared", ((string[])(null)));
#line 95
this.ScenarioSetup(scenarioInfo);
#line 96
testRunner.Given("I have installed Orchard");
this.ScenarioSetup(scenarioInfo);
#line 97
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
testRunner.Given("I have installed Orchard");
#line 98
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 99
testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
#line hidden
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
@@ -326,11 +329,11 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
table7.AddRow(new string[] {
"RequestUrlHost",
"scott.example.org"});
#line 99
#line 100
testRunner.And("I fill in", ((string)(null)), table7);
#line 103
testRunner.And("I hit \"Save\"");
#line 104
testRunner.And("I hit \"Save\"");
#line 105
testRunner.And("I go to \"/Setup\" on host scott.example.org");
#line hidden
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
@@ -342,17 +345,20 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org");
table8.AddRow(new string[] {
"AdminPassword",
"6655321"});
#line 105
table8.AddRow(new string[] {
"ConfirmPassword",
"6655321"});
#line 106
testRunner.And("I fill in", ((string)(null)), table8);
#line 109
testRunner.And("I hit \"Finish Setup\"");
#line 110
testRunner.And("I go to \"/Admin/MultiTenancy/Edit/Scott\" on host localhost");
#line 111
testRunner.Then("I should see \"<h1>Edit Tenant</h1>\"");
testRunner.And("I hit \"Finish Setup\"");
#line 112
testRunner.And("I should see \"<h2>Scott</h2>\"");
testRunner.And("I go to \"/Admin/MultiTenancy/Edit/Scott\" on host localhost");
#line 113
testRunner.Then("I should see \"<h1>Edit Tenant</h1>\"");
#line 114
testRunner.And("I should see \"<h2>Scott</h2>\"");
#line 115
testRunner.And("I should not see \"Allow the tenant to set up the database\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -363,15 +369,15 @@ testRunner.And("I should not see \"Allow the tenant to set up the database\"");
public virtual void DefaultTenantCannotBeDisabled()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Default tenant cannot be disabled", ((string[])(null)));
#line 115
this.ScenarioSetup(scenarioInfo);
#line 116
testRunner.Given("I have installed Orchard");
#line 117
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
this.ScenarioSetup(scenarioInfo);
#line 118
testRunner.When("I go to \"Admin/MultiTenancy\"");
testRunner.Given("I have installed Orchard");
#line 119
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 120
testRunner.When("I go to \"Admin/MultiTenancy\"");
#line 121
testRunner.Then("I should not see \"<form action=\"/Admin/MultiTenancy/disable\"\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -382,13 +388,13 @@ testRunner.Then("I should not see \"<form action=\"/Admin/MultiTenancy/disable\"
public virtual void ARunningTenantCanBeDisabled()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A running tenant can be disabled", ((string[])(null)));
#line 121
this.ScenarioSetup(scenarioInfo);
#line 122
testRunner.Given("I have installed Orchard");
#line 123
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
this.ScenarioSetup(scenarioInfo);
#line 124
testRunner.Given("I have installed Orchard");
#line 125
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 126
testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
#line hidden
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
@@ -400,11 +406,11 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
table9.AddRow(new string[] {
"RequestUrlHost",
"scott.example.org"});
#line 125
#line 127
testRunner.And("I fill in", ((string)(null)), table9);
#line 129
#line 131
testRunner.And("I hit \"Save\"");
#line 130
#line 132
testRunner.And("I go to \"/Setup\" on host scott.example.org");
#line hidden
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
@@ -416,17 +422,20 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org");
table10.AddRow(new string[] {
"AdminPassword",
"6655321"});
#line 131
table10.AddRow(new string[] {
"ConfirmPassword",
"6655321"});
#line 133
testRunner.And("I fill in", ((string)(null)), table10);
#line 135
testRunner.And("I hit \"Finish Setup\"");
#line 136
testRunner.And("I go to \"/Admin/MultiTenancy\" on host localhost");
#line 137
testRunner.And("I hit \"Suspend\"");
#line 138
testRunner.And("I am redirected");
testRunner.And("I hit \"Finish Setup\"");
#line 139
testRunner.And("I go to \"/Admin/MultiTenancy\" on host localhost");
#line 140
testRunner.And("I hit \"Suspend\"");
#line 141
testRunner.And("I am redirected");
#line 142
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/enable\"\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -437,13 +446,13 @@ testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/enable\"\"");
public virtual void ARunningTenantWhichIsDisabledCanBeEnabled()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("A running tenant which is disabled can be enabled", ((string[])(null)));
#line 141
this.ScenarioSetup(scenarioInfo);
#line 142
testRunner.Given("I have installed Orchard");
#line 143
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 144
this.ScenarioSetup(scenarioInfo);
#line 145
testRunner.Given("I have installed Orchard");
#line 146
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 147
testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
#line hidden
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
@@ -455,11 +464,11 @@ testRunner.When("I go to \"Admin/MultiTenancy/Add\"");
table11.AddRow(new string[] {
"RequestUrlHost",
"scott.example.org"});
#line 145
#line 148
testRunner.And("I fill in", ((string)(null)), table11);
#line 149
#line 152
testRunner.And("I hit \"Save\"");
#line 150
#line 153
testRunner.And("I go to \"/Setup\" on host scott.example.org");
#line hidden
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
@@ -471,21 +480,24 @@ testRunner.And("I go to \"/Setup\" on host scott.example.org");
table12.AddRow(new string[] {
"AdminPassword",
"6655321"});
#line 151
table12.AddRow(new string[] {
"ConfirmPassword",
"6655321"});
#line 154
testRunner.And("I fill in", ((string)(null)), table12);
#line 155
testRunner.And("I hit \"Finish Setup\"");
#line 156
testRunner.And("I go to \"/Admin/MultiTenancy\" on host localhost");
#line 157
testRunner.And("I hit \"Suspend\"");
#line 158
testRunner.And("I am redirected");
#line 159
testRunner.And("I hit \"Resume\"");
testRunner.And("I hit \"Finish Setup\"");
#line 160
testRunner.And("I am redirected");
testRunner.And("I go to \"/Admin/MultiTenancy\" on host localhost");
#line 161
testRunner.And("I hit \"Suspend\"");
#line 162
testRunner.And("I am redirected");
#line 163
testRunner.And("I hit \"Resume\"");
#line 164
testRunner.And("I am redirected");
#line 165
testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/disable\"\"");
#line hidden
testRunner.CollectScenarioErrors();
@@ -496,19 +508,19 @@ testRunner.Then("I should see \"<form action=\"/Admin/MultiTenancy/disable\"\"")
public virtual void ListingTenantsFromCommandLine()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Listing tenants from command line", ((string[])(null)));
#line 163
this.ScenarioSetup(scenarioInfo);
#line 164
testRunner.Given("I have installed Orchard");
#line 165
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 166
testRunner.And("I have tenant \"Alpha\" on \"example.org\" as \"New-site-name\"");
#line 167
testRunner.When("I execute >tenant list");
this.ScenarioSetup(scenarioInfo);
#line 168
testRunner.Then("I should see \"Name: Alpha\"");
testRunner.Given("I have installed Orchard");
#line 169
testRunner.And("I have installed \"Orchard.MultiTenancy\"");
#line 170
testRunner.And("I have tenant \"Alpha\" on \"example.org\" as \"New-site-name\"");
#line 171
testRunner.When("I execute >tenant list");
#line 172
testRunner.Then("I should see \"Name: Alpha\"");
#line 173
testRunner.And("I should see \"Request Url Host: example.org\"");
#line hidden
testRunner.CollectScenarioErrors();