Fixing DateTimeField specflow tests

This commit is contained in:
Sebastien Ros
2014-05-19 14:38:49 -07:00
parent 6e90698c8c
commit 6aea57b2ca
2 changed files with 43 additions and 43 deletions

View File

@@ -36,20 +36,20 @@ Scenario: Creating and using Date fields
Then I should see "Date of the event"
When I fill in
| name | value |
| Event.EventDate.Date | 31/01/2012 |
| Event.EventDate.Time | 12:00 AM |
| Event.EventDate.Editor.Date | 31/01/2012 |
| Event.EventDate.Editor.Time | 12:00 AM |
And I hit "Save"
Then I should see "Date of the event is an invalid date and time"
Then I should see "Date of the event could not be parsed as a valid date and time"
# Creating an Event content item
When I go to "Admin/Contents/Create/Event"
Then I should see "Date of the event"
When I fill in
| name | value |
| Event.EventDate.Date | 01/31/2012 |
| Event.EventDate.Editor.Date | 01/31/2012 |
And I fill in
| name | value |
| Event.EventDate.Time | 12:00 AM |
| Event.EventDate.Editor.Time | 12:00 AM |
And I hit "Save"
And I am redirected
Then I should see "Your Event has been created."
@@ -73,8 +73,8 @@ Scenario: Creating and using Date fields
| Fields[0].DateTimeFieldSettings.Display | DateOnly |
And I hit "Save"
And I go to "Admin/Contents/Create/Event"
Then I should see "Event.EventDate.Date"
And I should not see "Event.EventDate.Time"
Then I should see "Event.EventDate.Editor.Date"
And I should not see "Event.EventDate.Editor.Time"
# Display = TimeOnly
When I go to "Admin/ContentTypes/Edit/Event"
@@ -83,8 +83,8 @@ Scenario: Creating and using Date fields
| Fields[0].DateTimeFieldSettings.Display | TimeOnly |
And I hit "Save"
And I go to "Admin/Contents/Create/Event"
Then I should see "Event.EventDate.Time"
And I should not see "Event.EventDate.Date"
Then I should see "Event.EventDate.Editor.Time"
And I should not see "Event.EventDate.Editor.Date"
# Required & Date and Time
When I go to "Admin/ContentTypes/Edit/Event"
@@ -94,24 +94,24 @@ Scenario: Creating and using Date fields
| Fields[0].DateTimeFieldSettings.Required | true |
And I hit "Save"
And I go to "Admin/Contents/Create/Event"
Then I should see "Event.EventDate.Date"
Then I should see "Event.EventDate.Editor.Date"
When I fill in
| name | value |
| Event.EventDate.Date | 01/31/2012 |
| Event.EventDate.Time | 12:00 AM |
| Event.EventDate.Editor.Date | 01/31/2012 |
| Event.EventDate.Editor.Time | 12:00 AM |
And I hit "Save"
And I am redirected
Then I should see "Your Event has been created."
When I go to "Admin/Contents/Create/Event"
And I fill in
| name | value |
| Event.EventDate.Date | 01/31/2012 |
| Event.EventDate.Editor.Date | 01/31/2012 |
And I hit "Save"
Then I should see "Date of the event is required."
When I go to "Admin/Contents/Create/Event"
And I fill in
| name | value |
| Event.EventDate.Time | 12:00 AM |
| Event.EventDate.Editor.Time | 12:00 AM |
And I hit "Save"
Then I should see "Date of the event is required."
@@ -123,7 +123,7 @@ Scenario: Creating and using Date fields
| Fields[0].DateTimeFieldSettings.Required | true |
And I hit "Save"
And I go to "Admin/Contents/Create/Event"
Then I should see "Event.EventDate.Date"
Then I should see "Event.EventDate.Editor.Date"
When I hit "Save"
Then I should see "Date of the event is required."
@@ -135,7 +135,7 @@ Scenario: Creating and using Date fields
| Fields[0].DateTimeFieldSettings.Required | true |
And I hit "Save"
And I go to "Admin/Contents/Create/Event"
Then I should see "Event.EventDate.Date"
Then I should see "Event.EventDate.Editor.Date"
When I hit "Save"
Then I should see "Date of the event is required."
@@ -179,15 +179,15 @@ Scenario: Creating and using date time fields in another culture
When I go to "Admin/Contents/Create/Event"
And I fill in
| name | value |
| Event.EventDate.Date | 01/31/2012 |
| Event.EventDate.Time | 12:00 AM |
| Event.EventDate.Editor.Date | 01/31/2012 |
| Event.EventDate.Editor.Time | 12:00 AM |
And I hit "Save"
Then I should see "Date of the event is an invalid date and time"
Then I should see "Date of the event could not be parsed as a valid date and time"
When I go to "Admin/Contents/Create/Event"
And I fill in
| name | value |
| Event.EventDate.Date | 31/01/2012 |
| Event.EventDate.Time | 18:00 |
| Event.EventDate.Editor.Date | 31/01/2012 |
| Event.EventDate.Editor.Time | 18:00 |
And I hit "Save"
And I am redirected
Then I should see "Your Event has been created."

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.
@@ -134,17 +134,17 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table3.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"31/01/2012"});
table3.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"12:00 AM"});
#line 37
testRunner.When("I fill in", ((string)(null)), table3, "When ");
#line 41
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 42
testRunner.Then("I should see \"Date of the event is an invalid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 45
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 46
@@ -154,7 +154,7 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table4.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"01/31/2012"});
#line 47
testRunner.When("I fill in", ((string)(null)), table4, "When ");
@@ -163,7 +163,7 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table5.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"12:00 AM"});
#line 50
testRunner.And("I fill in", ((string)(null)), table5, "And ");
@@ -212,9 +212,9 @@ this.ScenarioSetup(scenarioInfo);
#line 75
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 76
testRunner.Then("I should see \"Event.EventDate.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 77
testRunner.And("I should not see \"Event.EventDate.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
testRunner.And("I should not see \"Event.EventDate.Editor.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 80
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
@@ -231,9 +231,9 @@ this.ScenarioSetup(scenarioInfo);
#line 85
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 86
testRunner.Then("I should see \"Event.EventDate.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Event.EventDate.Editor.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 87
testRunner.And("I should not see \"Event.EventDate.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
testRunner.And("I should not see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 90
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
@@ -253,16 +253,16 @@ this.ScenarioSetup(scenarioInfo);
#line 96
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 97
testRunner.Then("I should see \"Event.EventDate.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line hidden
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table10.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"01/31/2012"});
table10.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"12:00 AM"});
#line 98
testRunner.When("I fill in", ((string)(null)), table10, "When ");
@@ -279,7 +279,7 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table11.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"01/31/2012"});
#line 106
testRunner.And("I fill in", ((string)(null)), table11, "And ");
@@ -294,7 +294,7 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table12.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"12:00 AM"});
#line 112
testRunner.And("I fill in", ((string)(null)), table12, "And ");
@@ -321,7 +321,7 @@ this.ScenarioSetup(scenarioInfo);
#line 125
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 126
testRunner.Then("I should see \"Event.EventDate.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 127
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 128
@@ -345,7 +345,7 @@ this.ScenarioSetup(scenarioInfo);
#line 137
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 138
testRunner.Then("I should see \"Event.EventDate.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 139
testRunner.When("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 140
@@ -442,17 +442,17 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table18.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"01/31/2012"});
table18.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"12:00 AM"});
#line 180
testRunner.And("I fill in", ((string)(null)), table18, "And ");
#line 184
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 185
testRunner.Then("I should see \"Date of the event is an invalid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
testRunner.Then("I should see \"Date of the event could not be parsed as a valid date and time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 186
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
@@ -460,10 +460,10 @@ this.ScenarioSetup(scenarioInfo);
"name",
"value"});
table19.AddRow(new string[] {
"Event.EventDate.Date",
"Event.EventDate.Editor.Date",
"31/01/2012"});
table19.AddRow(new string[] {
"Event.EventDate.Time",
"Event.EventDate.Editor.Time",
"18:00"});
#line 187
testRunner.And("I fill in", ((string)(null)), table19, "And ");