Files
Orchard/src/Orchard.Specs/DateTime.feature.cs

499 lines
25 KiB
C#
Raw Normal View History

2013-09-10 16:12:43 -07:00
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:2.4.0.0
// SpecFlow Generator Version:2.4.0.0
2013-09-10 16:12:43 -07:00
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#region Designer generated code
#pragma warning disable
namespace Orchard.Specs
{
using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "2.4.0.0")]
2013-09-10 16:12:43 -07:00
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("DateTime Field")]
public partial class DateTimeFieldFeature
{
2025-09-19 18:31:39 +02:00
private TechTalk.SpecFlow.ITestRunner testRunner;
2013-09-10 16:12:43 -07:00
#line 1 "DateTime.feature"
#line hidden
2025-09-19 18:31:39 +02:00
[NUnit.Framework.OneTimeSetUpAttribute()]
2013-09-10 16:12:43 -07:00
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "DateTime Field", " In order to add Date content to my types\r\n As an administrator\r\n I want" +
" to create, edit and publish DateTime fields", ProgrammingLanguage.CSharp, ((string[])(null)));
2013-09-10 16:12:43 -07:00
testRunner.OnFeatureStart(featureInfo);
}
2025-09-19 18:31:39 +02:00
[NUnit.Framework.OneTimeTearDownAttribute()]
2013-09-10 16:12:43 -07:00
public virtual void FeatureTearDown()
{
testRunner.OnFeatureEnd();
testRunner = null;
}
[NUnit.Framework.SetUpAttribute()]
public virtual void TestInitialize()
{
}
[NUnit.Framework.TearDownAttribute()]
public virtual void ScenarioTearDown()
{
testRunner.OnScenarioEnd();
}
public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
2013-09-10 16:12:43 -07:00
{
testRunner.OnScenarioInitialize(scenarioInfo);
testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs<NUnit.Framework.TestContext>(NUnit.Framework.TestContext.CurrentContext);
}
public virtual void ScenarioStart()
{
testRunner.OnScenarioStart();
2013-09-10 16:12:43 -07:00
}
public virtual void ScenarioCleanup()
{
testRunner.CollectScenarioErrors();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Creating and using Date fields")]
public virtual void CreatingAndUsingDateFields()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using Date fields", null, ((string[])(null)));
2013-09-10 16:12:43 -07:00
#line 6
this.ScenarioInitialize(scenarioInfo);
this.ScenarioStart();
2013-09-10 16:12:43 -07:00
#line 9
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 10
2015-09-11 19:46:09 +01:00
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line 11
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 12
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 13
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table53 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table53.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"DisplayName",
"Event"});
2025-09-19 18:31:39 +02:00
table53.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"Name",
"Event"});
#line 14
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table53, "And ");
2013-09-10 16:12:43 -07:00
#line 18
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 19
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 20
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 23
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line 24
2015-09-11 19:46:09 +01:00
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table54 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table54.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"DisplayName",
"Date of the event"});
2025-09-19 18:31:39 +02:00
table54.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"Name",
"EventDate"});
2025-09-19 18:31:39 +02:00
table54.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"FieldTypeName",
"DateTimeField"});
#line 25
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table54, "And ");
2013-09-10 16:12:43 -07:00
#line 30
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line 31
2015-09-11 19:46:09 +01:00
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line 32
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 35
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line 36
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table55 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table55.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Date",
2013-09-10 16:12:43 -07:00
"31/01/2012"});
2025-09-19 18:31:39 +02:00
table55.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Time",
2013-09-10 16:12:43 -07:00
"12:00 AM"});
#line 37
2025-09-19 18:31:39 +02:00
testRunner.When("I fill in", ((string)(null)), table55, "When ");
2013-09-10 16:12:43 -07:00
#line 41
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line 42
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 ");
2013-09-10 16:12:43 -07:00
#line 45
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line 46
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table56 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table56.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Date",
2013-09-10 16:12:43 -07:00
"01/31/2012"});
2025-09-19 18:31:39 +02:00
table56.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Time",
2013-09-10 16:12:43 -07:00
"12:00 AM"});
#line 47
2025-09-19 18:31:39 +02:00
testRunner.When("I fill in", ((string)(null)), table56, "When ");
#line 51
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 52
2015-09-11 19:46:09 +01:00
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 53
2017-04-25 08:32:59 -07:00
testRunner.Then("I should see \"The Event has been created as a draft.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 54
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 55
testRunner.Then("I should see \"Date of the event:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 56
2015-09-11 19:46:09 +01:00
testRunner.And("I should see \"1/31/2012 12:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 59
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table57 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table57.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Hint",
2013-09-10 16:12:43 -07:00
"Enter the date of the event"});
#line 60
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table57, "And ");
#line 63
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 64
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 65
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Enter the date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 68
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table58 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table58.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"DateOnly"});
#line 69
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table58, "And ");
#line 72
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 73
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 74
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 75
2015-09-11 19:46:09 +01:00
testRunner.And("I should not see \"Event.EventDate.Editor.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 78
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table59 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table59.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"TimeOnly"});
#line 79
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table59, "And ");
#line 82
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 83
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 84
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Event.EventDate.Editor.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 85
2015-09-11 19:46:09 +01:00
testRunner.And("I should not see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 88
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table60 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table60.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"DateAndTime"});
2025-09-19 18:31:39 +02:00
table60.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Required",
2013-09-10 16:12:43 -07:00
"true"});
#line 89
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table60, "And ");
#line 93
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 94
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table61 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table61.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Date",
2013-09-10 16:12:43 -07:00
"01/31/2012"});
#line 95
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table61, "And ");
2013-09-10 16:12:43 -07:00
#line 98
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 99
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 100
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table62 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table62.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Time",
2013-09-10 16:12:43 -07:00
"12:00 AM"});
#line 101
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table62, "And ");
#line 104
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 105
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 108
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table63 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table63.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"DateOnly"});
2025-09-19 18:31:39 +02:00
table63.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Required",
2013-09-10 16:12:43 -07:00
"true"});
#line 109
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table63, "And ");
#line 113
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 114
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 115
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 116
2017-04-04 16:41:06 -07:00
testRunner.When("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 117
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 120
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table64 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table64.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"TimeOnly"});
2025-09-19 18:31:39 +02:00
table64.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Required",
2013-09-10 16:12:43 -07:00
"true"});
#line 121
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table64, "And ");
#line 125
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 126
2015-09-11 19:46:09 +01:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 127
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 128
2017-04-04 16:41:06 -07:00
testRunner.When("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 129
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Date of the event is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 132
2016-03-29 03:02:01 +02:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table65 = new TechTalk.SpecFlow.Table(new string[] {
2016-03-29 03:02:01 +02:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table65.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2016-03-29 03:02:01 +02:00
"DateAndTime"});
2025-09-19 18:31:39 +02:00
table65.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Editor.Date",
"01/31/2016"});
2025-09-19 18:31:39 +02:00
table65.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Editor.Time",
"10:00 AM"});
#line 133
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table65, "And ");
#line 138
2016-03-29 03:02:01 +02:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 139
2016-03-29 03:02:01 +02:00
testRunner.And("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 140
2016-03-29 03:02:01 +02:00
testRunner.Then("I should see \"Event.EventDate.Editor.Date\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 141
testRunner.And("I should see \"Event.EventDate.Editor.Time\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 142
2017-04-04 16:41:06 -07:00
testRunner.When("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 143
2016-03-29 03:02:01 +02:00
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 144
2017-04-04 16:41:06 -07:00
testRunner.Then("I should see \"The Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 145
2016-03-29 03:02:01 +02:00
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 146
2016-03-29 03:02:01 +02:00
testRunner.Then("I should see \"Date of the event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 147
testRunner.And("I should see \"1/31/2016 10:00\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line hidden
this.ScenarioCleanup();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Creating and using date time fields in another culture")]
public virtual void CreatingAndUsingDateTimeFieldsInAnotherCulture()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using date time fields in another culture", null, ((string[])(null)));
#line 149
this.ScenarioInitialize(scenarioInfo);
this.ScenarioStart();
#line 152
2013-09-10 16:12:43 -07:00
testRunner.Given("I have installed Orchard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
#line 153
2015-09-11 19:46:09 +01:00
testRunner.And("I have installed \"Orchard.Fields\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 154
2015-09-11 19:46:09 +01:00
testRunner.And("I have the file \"Content\\orchard.core.po\" in \"Core\\App_Data\\Localization\\fr-FR\\or" +
2013-09-10 16:12:43 -07:00
"chard.core.po\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 155
2013-09-10 16:12:43 -07:00
testRunner.When("I go to \"Admin/ContentTypes\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 156
2013-09-10 16:12:43 -07:00
testRunner.Then("I should see \"<a[^>]*>.*?Create new type</a>\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 157
2013-09-10 16:12:43 -07:00
testRunner.When("I go to \"Admin/ContentTypes/Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table66 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table66.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"DisplayName",
"Event"});
2025-09-19 18:31:39 +02:00
table66.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"Name",
"Event"});
#line 158
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table66, "And ");
#line 162
2013-09-10 16:12:43 -07:00
testRunner.And("I hit \"Create\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 163
2013-09-10 16:12:43 -07:00
testRunner.And("I go to \"Admin/ContentTypes/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 164
2013-09-10 16:12:43 -07:00
testRunner.Then("I should see \"Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 167
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 168
2015-09-11 19:46:09 +01:00
testRunner.And("I follow \"Add Field\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table67 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table67.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"DisplayName",
"Date of the event"});
2025-09-19 18:31:39 +02:00
table67.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"Name",
"EventDate"});
2025-09-19 18:31:39 +02:00
table67.AddRow(new string[] {
2013-09-10 16:12:43 -07:00
"FieldTypeName",
"DateTimeField"});
#line 169
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table67, "And ");
#line 174
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 175
2015-09-11 19:46:09 +01:00
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 176
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"The \\\"Date of the event\\\" field has been added.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
#line 177
8686: Fixing build and tests on 1.10.x (#8687) * Fixing that RecipeManagerTests failed due to HttpContext not being available * Fixing OwnerEditor tests in CommonPartProviderTests as the owner editor now checks for a different permission since 5b0c82d1ad39526253eb2a5caf74dbcb8615860a * Fixing typo in CommonPartProviderTests.UpdateModelStub class name * Fixing that test cases for invalid path in FileSystemStorageProviderTests broke in a3e9bef3ca084aedc0dbdcc6e82d31f4497b2007 (issue #6802, PR #6919) I should review PRs more carefully! * Fixing CurrentCultureWorkContextTests * Fixing indentation in DefaultDateFormatterTests * Updating Orchard.Azure.Web's required version of System.Web.Mvc to match the rest of the solution * Orchard.Specs: Fixing assembly loading errors when starting up the web host by adding binding redirects * Adding empty compile workflow from dev * Adding the compile workflow's actual contents * Changing default shell to pwsh (msbuild was not found in cmd?) * Adding msbuild to PATH * Removing unused references to System.Net.Http * Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental) * Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency * Orchard.proj: Spec target actually depends on only the Compile target, not Package-Stage (experimental) * Compile workflow: Testing the Test and Spec targets * Fixing Test step * Fixing compile workflow to also mark Razor compilation warnings as errors * Restoring Orchard.Specs/Hosting/Orchard.Web/Web.config to match Orchard.Web's web.config closer so that it loads assemblies from the Dependencies folder. This fixes the error with Autofac not being able to resolve dependencies for DefaultOrchardShell * Orchard.Specs/Hosting/Orchard.Web/Global.asax.cs: Workaround for AntiForgeryToken bug in ASP.NET MVC since version 5.2.4 https://github.com/aspnet/AspNetWebStack/issues/162 * Revert "Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental)" This reverts commit 087f2849b116fd1e1d890a8e5ea867a644f05426. * Revert "Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency" This reverts commit be2ba866e34b9140e92365ede4876c375a0053f2. * Reverting the addition of assembly binding redirects to Orchard.Specs/Hosting/Simple.Web/Web.config since it doesn't need them like Orchard.Specs/Hosting/Orchard.Web/Web.config does * Disabling Test and Spec execution for now * Orchard.Framework: Making the System.Net.Http not-private to prevent an outdated version sticking around * Orchard.Workflows: Adding assembly binding redirect for System.Net.Http to avoid Razor compilation warning * Moving the System.Net.Http assembly redirect to Orchard.Web * Specs: Fixing "I can create browse blog posts on several pages" Blog test's usage of "I should not see" and correcting the parameters too because unlike "I should see", this is not a regex match, just contains * Specs: Fixing "I can create browse blog posts on several pages" Blog test's flakyness due to timing because the blog posts are created quickly after one another and the lack of millisecond-precision can cause the blog posts to appear out of order of creation * Specs: Media test simplified since the Orchard.Media feature is deprecated * Adding step to the Compile workflow to upload the MSBuild binlog results * Pinning the referenced version of System.Net.Http to 4.2.0.0 to prevent Razor compilation warning System.Net.Http is known to have such problems across different framework versions ways of referencing it The original warning is: ASPNETCOMPILER : error : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: Orchard.Workflows, Version=1.10.3.0, Culture=neutral, PublicKeyToken=null. The dependencies are: System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. [D:\a\Orchard\Orchard\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj * Re-enabling the Test step * Re-enabling the Specs step * Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version * Revert "Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version" This reverts commit e4f563223689b5cf88a143634a75e8b999a55a76. * Orchard.Specs: Adding Settings feature * Orchard.Specs: Updating DateTime.CreatingAndUsingDateTimeFieldsInAnotherCulture structure without functional change * Orchard.Specs: Updating Settings.AddingANewSiteCultureAndSelectingItAsTheDefaultWorks to correctly detect that a culture that wasn't added before can be set as default * Fixing Newtonsoft.Json references * Specs: Workaround for the DefineDefaultCulture binding and removing the Settings feature which is now redundant with CreatingAndUsingDateTimeFieldsInAnotherCulture * Updating the compile workflow to run the build + tests on PR, dev and 1.10.x commits * Adding the compile workflow to the solution
2023-06-28 15:11:46 +02:00
testRunner.When("I go to \"Admin/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table68 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table68.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Display",
2013-09-10 16:12:43 -07:00
"DateAndTime"});
2025-09-19 18:31:39 +02:00
table68.AddRow(new string[] {
"Fields[EventDate].DateTimeFieldSettings.Required",
2013-09-10 16:12:43 -07:00
"true"});
#line 178
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table68, "And ");
#line 182
2015-09-11 19:46:09 +01:00
testRunner.And("I hit \"Save\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 185
8686: Fixing build and tests on 1.10.x (#8687) * Fixing that RecipeManagerTests failed due to HttpContext not being available * Fixing OwnerEditor tests in CommonPartProviderTests as the owner editor now checks for a different permission since 5b0c82d1ad39526253eb2a5caf74dbcb8615860a * Fixing typo in CommonPartProviderTests.UpdateModelStub class name * Fixing that test cases for invalid path in FileSystemStorageProviderTests broke in a3e9bef3ca084aedc0dbdcc6e82d31f4497b2007 (issue #6802, PR #6919) I should review PRs more carefully! * Fixing CurrentCultureWorkContextTests * Fixing indentation in DefaultDateFormatterTests * Updating Orchard.Azure.Web's required version of System.Web.Mvc to match the rest of the solution * Orchard.Specs: Fixing assembly loading errors when starting up the web host by adding binding redirects * Adding empty compile workflow from dev * Adding the compile workflow's actual contents * Changing default shell to pwsh (msbuild was not found in cmd?) * Adding msbuild to PATH * Removing unused references to System.Net.Http * Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental) * Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency * Orchard.proj: Spec target actually depends on only the Compile target, not Package-Stage (experimental) * Compile workflow: Testing the Test and Spec targets * Fixing Test step * Fixing compile workflow to also mark Razor compilation warnings as errors * Restoring Orchard.Specs/Hosting/Orchard.Web/Web.config to match Orchard.Web's web.config closer so that it loads assemblies from the Dependencies folder. This fixes the error with Autofac not being able to resolve dependencies for DefaultOrchardShell * Orchard.Specs/Hosting/Orchard.Web/Global.asax.cs: Workaround for AntiForgeryToken bug in ASP.NET MVC since version 5.2.4 https://github.com/aspnet/AspNetWebStack/issues/162 * Revert "Replacing System.Net.Http references with its NuGet package to pin the correct version number (experimental)" This reverts commit 087f2849b116fd1e1d890a8e5ea867a644f05426. * Revert "Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 4.1.0 (latest) to get rid of old System.Http.Net dependency" This reverts commit be2ba866e34b9140e92365ede4876c375a0053f2. * Reverting the addition of assembly binding redirects to Orchard.Specs/Hosting/Simple.Web/Web.config since it doesn't need them like Orchard.Specs/Hosting/Orchard.Web/Web.config does * Disabling Test and Spec execution for now * Orchard.Framework: Making the System.Net.Http not-private to prevent an outdated version sticking around * Orchard.Workflows: Adding assembly binding redirect for System.Net.Http to avoid Razor compilation warning * Moving the System.Net.Http assembly redirect to Orchard.Web * Specs: Fixing "I can create browse blog posts on several pages" Blog test's usage of "I should not see" and correcting the parameters too because unlike "I should see", this is not a regex match, just contains * Specs: Fixing "I can create browse blog posts on several pages" Blog test's flakyness due to timing because the blog posts are created quickly after one another and the lack of millisecond-precision can cause the blog posts to appear out of order of creation * Specs: Media test simplified since the Orchard.Media feature is deprecated * Adding step to the Compile workflow to upload the MSBuild binlog results * Pinning the referenced version of System.Net.Http to 4.2.0.0 to prevent Razor compilation warning System.Net.Http is known to have such problems across different framework versions ways of referencing it The original warning is: ASPNETCOMPILER : error : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: Orchard.Workflows, Version=1.10.3.0, Culture=neutral, PublicKeyToken=null. The dependencies are: System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly. [D:\a\Orchard\Orchard\src\Orchard.Web\Modules\Orchard.Workflows\Orchard.Workflows.csproj * Re-enabling the Test step * Re-enabling the Specs step * Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version * Revert "Marking System.Net.Http references as private (copy local) to make sure that it's always available, because it requires a specific version" This reverts commit e4f563223689b5cf88a143634a75e8b999a55a76. * Orchard.Specs: Adding Settings feature * Orchard.Specs: Updating DateTime.CreatingAndUsingDateTimeFieldsInAnotherCulture structure without functional change * Orchard.Specs: Updating Settings.AddingANewSiteCultureAndSelectingItAsTheDefaultWorks to correctly detect that a culture that wasn't added before can be set as default * Fixing Newtonsoft.Json references * Specs: Workaround for the DefineDefaultCulture binding and removing the Settings feature which is now redundant with CreatingAndUsingDateTimeFieldsInAnotherCulture * Updating the compile workflow to run the build + tests on PR, dev and 1.10.x commits * Adding the compile workflow to the solution
2023-06-28 15:11:46 +02:00
testRunner.When("I have \"fr-FR\" as the default culture", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
#line 186
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table69 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table69.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Date",
2013-09-10 16:12:43 -07:00
"01/31/2012"});
2025-09-19 18:31:39 +02:00
table69.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Time",
2013-09-10 16:12:43 -07:00
"12:00 AM"});
#line 187
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table69, "And ");
#line 191
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 192
2015-09-11 19:46:09 +01:00
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 193
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/Create/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
2025-09-19 18:31:39 +02:00
TechTalk.SpecFlow.Table table70 = new TechTalk.SpecFlow.Table(new string[] {
2013-09-10 16:12:43 -07:00
"name",
"value"});
2025-09-19 18:31:39 +02:00
table70.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Date",
2013-09-10 16:12:43 -07:00
"31/01/2012"});
2025-09-19 18:31:39 +02:00
table70.AddRow(new string[] {
2014-05-19 14:38:49 -07:00
"Event.EventDate.Editor.Time",
2013-09-10 16:12:43 -07:00
"18:00"});
#line 194
2025-09-19 18:31:39 +02:00
testRunner.And("I fill in", ((string)(null)), table70, "And ");
#line 198
2017-04-04 16:41:06 -07:00
testRunner.And("I hit \"Save Draft\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 199
2015-09-11 19:46:09 +01:00
testRunner.And("I am redirected", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
#line 200
2017-04-25 08:32:59 -07:00
testRunner.Then("I should see \"The Event has been created as a draft.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line hidden
this.ScenarioCleanup();
}
}
}
#pragma warning restore
#endregion