And some more specflows fixed

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-09-21 18:00:55 -07:00
parent a7b488bdef
commit 472183c3da
3 changed files with 107 additions and 67 deletions

View File

@@ -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 "<input autofocus="autofocus" class="input-validation-error" id="SiteName" name="SiteName" type="text" value="" />"
And I should see "<input class="input-validation-error" id="AdminPassword" name="AdminPassword" type="password" />"
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"

View File

@@ -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 \"<input autofocus=\"autofocus\" class=\"input-validation-error\" id=\"Sit" +
"eName\" name=\"SiteName\" type=\"text\" value=\"\" />\"");
#line 37
testRunner.And("I should see \"<input class=\"input-validation-error\" id=\"AdminPassword\" name=\"Admi" +
"nPassword\" type=\"password\" />\"");
#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();

View File

@@ -10,8 +10,7 @@
<li class="tenant @tenant.State.CurrentState">
<div class="summary">
<div class="properties">
<h3>@tenant.Name
@if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
<h3>@tenant.Name @if (!string.IsNullOrEmpty(tenant.RequestUrlHost)) {
<span class="tenantHost"> - @Html.Link(Url.Tenant(tenant), Url.Tenant(tenant))</span>
}</h3>
</div>