Fixing Lists specflow tests

This commit is contained in:
Sebastien Ros
2014-05-19 16:00:04 -07:00
parent 34410dd429
commit 84feb2814e
2 changed files with 63 additions and 82 deletions

View File

@@ -6,34 +6,30 @@
Scenario: I can create a new list
Given I have installed Orchard
And I have installed "Orchard.Lists"
When I go to "Admin/Contents/Create/List"
When I go to "Admin/ContentTypes"
And I go to "Admin/ContentTypes/Create"
And I fill in
| name | value |
| Title.Title | MyList |
And I hit "Save"
And I go to "Admin/Contents/List/List"
Then I should see "MyList"
| name | value |
| DisplayName | Event |
| Name | Event |
And I hit "Create"
And I am redirected
And I fill in
| name | value |
| PartSelections[5].IsSelected | True |
And I hit "Save"
And I go to "Admin/ContentTypes/"
Then I should see "Event"
Scenario: I can add content items to a list
Given I have installed Orchard
And I have installed "Orchard.Lists"
And I have a containable content type "MyType"
When I go to "Admin/Contents/Create/List"
And I fill in
| name | value |
| Title.Title | MyList |
| name | value |
| Title.Title | MyList |
| Container.SelectedItemContentTypes | Event |
And I hit "Save"
And I go to "Admin/Contents/List/List"
And I am redirected
Then I should see "Your List has been created"
When I go to "Admin/Lists"
Then I should see "MyList"
When I follow "Contained Items"
Then I should see "The 'MyList' List has no content items."
When I follow "Create New Content" where href has "ReturnUrl"
Then I should see "MyType"
When I follow "MyType" where href has "ReturnUrl"
And I fill in
| name | value |
| Title.Title | MyContentItem |
And I hit "Save"
And I am redirected
Then I should see "Manage MyList"
And I should see "MyContentItem"
When I follow "Contained Items (0)"
Then I should see "'MyList' has no content items"

View File

@@ -3,7 +3,7 @@
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.9.0.77
// SpecFlow Generator Version:1.9.0.0
// Runtime Version:4.0.30319.33440
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -77,83 +77,68 @@ this.ScenarioSetup(scenarioInfo);
#line 8
testRunner.And("I have installed \"Orchard.Lists\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 9
testRunner.When("I go to \"Admin/Contents/Create/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 10
testRunner.And("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table1.AddRow(new string[] {
"Title.Title",
"MyList"});
#line 10
"DisplayName",
"Event"});
table1.AddRow(new string[] {
"Name",
"Event"});
#line 11
testRunner.And("I fill in", ((string)(null)), table1, "And ");
#line 13
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 14
testRunner.And("I go to \"Admin/Contents/List/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 15
testRunner.Then("I should see \"MyList\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("I can add content items to a list")]
public virtual void ICanAddContentItemsToAList()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("I can add content items to a list", ((string[])(null)));
#line 17
this.ScenarioSetup(scenarioInfo);
#line 18
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 19
testRunner.And("I have installed \"Orchard.Lists\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 20
testRunner.And("I have a containable content type \"MyType\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 21
testRunner.When("I go to \"Admin/Contents/Create/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 16
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table2.AddRow(new string[] {
"Title.Title",
"MyList"});
#line 22
"PartSelections[5].IsSelected",
"True"});
#line 17
testRunner.And("I fill in", ((string)(null)), table2, "And ");
#line 25
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 26
testRunner.And("I go to \"Admin/Contents/List/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 27
testRunner.Then("I should see \"MyList\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 28
testRunner.When("I follow \"Contained Items\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 29
testRunner.Then("I should see \"The \'MyList\' List has no content items.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 30
testRunner.When("I follow \"Create New Content\" where href has \"ReturnUrl\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 31
testRunner.Then("I should see \"MyType\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 32
testRunner.When("I follow \"MyType\" where href has \"ReturnUrl\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 20
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 21
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 22
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 24
testRunner.When("I go to \"Admin/Contents/Create/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table3.AddRow(new string[] {
"Title.Title",
"MyContentItem"});
#line 33
"MyList"});
table3.AddRow(new string[] {
"Container.SelectedItemContentTypes",
"Event"});
#line 25
testRunner.And("I fill in", ((string)(null)), table3, "And ");
#line 36
#line 29
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 37
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 38
testRunner.Then("I should see \"Manage MyList\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 39
testRunner.And("I should see \"MyContentItem\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 30
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 31
testRunner.Then("I should see \"Your List has been created\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 32
testRunner.When("I go to \"Admin/Lists\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 33
testRunner.Then("I should see \"MyList\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 34
testRunner.When("I follow \"Contained Items (0)\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 35
testRunner.Then("I should see \"\'MyList\' has no content items\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
this.ScenarioCleanup();
}