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

307 lines
15 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:1.9.0.77
// SpecFlow Generator Version:1.9.0.0
2015-09-11 19:46:09 +01:00
// Runtime Version:4.0.30319.42000
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", "1.9.0.77")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Input Field")]
public partial class InputFieldFeature
{
private static TechTalk.SpecFlow.ITestRunner testRunner;
#line 1 "Input.feature"
#line hidden
[NUnit.Framework.TestFixtureSetUpAttribute()]
public virtual void FeatureSetup()
{
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
2015-09-11 19:46:09 +01:00
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Input Field", " In order to add an input to my types\r\n As an administrator\r\n I want to create" +
", edit and publish input fields", ProgrammingLanguage.CSharp, ((string[])(null)));
2013-09-10 16:12:43 -07:00
testRunner.OnFeatureStart(featureInfo);
}
[NUnit.Framework.TestFixtureTearDownAttribute()]
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 ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioStart(scenarioInfo);
}
public virtual void ScenarioCleanup()
{
testRunner.CollectScenarioErrors();
}
[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Creating and using Input fields")]
public virtual void CreatingAndUsingInputFields()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Creating and using Input fields", ((string[])(null)));
#line 6
this.ScenarioSetup(scenarioInfo);
#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
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table1.AddRow(new string[] {
"DisplayName",
"Event"});
table1.AddRow(new string[] {
"Name",
"Event"});
#line 14
testRunner.And("I fill in", ((string)(null)), table1, "And ");
#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
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table2.AddRow(new string[] {
"DisplayName",
"Contact"});
table2.AddRow(new string[] {
"Name",
"Contact"});
table2.AddRow(new string[] {
"FieldTypeName",
"InputField"});
#line 25
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table2, "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 \\\"Contact\\\" 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/ContentTypes/Edit/Event\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line hidden
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table3.AddRow(new string[] {
"Fields[0].InputFieldSettings.Hint",
"Enter the contact email address"});
#line 36
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table3, "And ");
2013-09-10 16:12:43 -07:00
#line 39
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 40
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 41
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Enter the contact email address\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 53
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
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table4.AddRow(new string[] {
"Fields[0].InputFieldSettings.Type",
"Email"});
#line 54
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table4, "And ");
2013-09-10 16:12:43 -07:00
#line 57
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 58
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 59
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"type=\\\"email\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 62
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
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table5.AddRow(new string[] {
"Fields[0].InputFieldSettings.Title",
"Enter an email address"});
#line 63
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table5, "And ");
2013-09-10 16:12:43 -07:00
#line 66
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 67
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 68
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"title=\\\"Enter an email address\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 71
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
TechTalk.SpecFlow.Table table6 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table6.AddRow(new string[] {
"Fields[0].InputFieldSettings.AutoFocus",
"true"});
#line 72
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table6, "And ");
2013-09-10 16:12:43 -07:00
#line 75
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 76
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 77
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"autofocus=\\\"autofocus\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 80
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
TechTalk.SpecFlow.Table table7 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table7.AddRow(new string[] {
"Fields[0].InputFieldSettings.AutoComplete",
"true"});
#line 81
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table7, "And ");
2013-09-10 16:12:43 -07:00
#line 84
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 85
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 86
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"autocomplete=\\\"on\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 89
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
TechTalk.SpecFlow.Table table8 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table8.AddRow(new string[] {
"Fields[0].InputFieldSettings.Placeholder",
"email@domain.com"});
#line 90
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table8, "And ");
2013-09-10 16:12:43 -07:00
#line 93
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 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 95
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"placeholder=\\\"email@domain.com\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 98
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
TechTalk.SpecFlow.Table table9 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table9.AddRow(new string[] {
"Fields[0].InputFieldSettings.MaxLength",
"100"});
#line 99
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table9, "And ");
2013-09-10 16:12:43 -07:00
#line 102
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 103
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 104
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"maxlength=\\\"100\\\"\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 107
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
TechTalk.SpecFlow.Table table10 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table10.AddRow(new string[] {
"Fields[0].InputFieldSettings.Required",
"true"});
#line 108
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table10, "And ");
2013-09-10 16:12:43 -07:00
#line 111
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 112
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
TechTalk.SpecFlow.Table table11 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table11.AddRow(new string[] {
"Event.Contact.Value",
""});
#line 113
2015-09-11 19:46:09 +01:00
testRunner.And("I fill in", ((string)(null)), table11, "And ");
2013-09-10 16:12:43 -07:00
#line 116
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 117
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"The field Contact is mandatory.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 120
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 121
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Contact\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line hidden
TechTalk.SpecFlow.Table table12 = new TechTalk.SpecFlow.Table(new string[] {
"name",
"value"});
table12.AddRow(new string[] {
"Event.Contact.Value",
"contact@orchardproject.net"});
#line 122
2015-09-11 19:46:09 +01:00
testRunner.When("I fill in", ((string)(null)), table12, "When ");
2013-09-10 16:12:43 -07:00
#line 125
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 126
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 127
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Your Event has been created.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 128
2015-09-11 19:46:09 +01:00
testRunner.When("I go to \"Admin/Contents/List\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
2013-09-10 16:12:43 -07:00
#line 129
2015-09-11 19:46:09 +01:00
testRunner.Then("I should see \"Contact:\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
2013-09-10 16:12:43 -07:00
#line 130
2015-09-11 19:46:09 +01:00
testRunner.And("I should see \"contact@orchardproject.net\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
2013-09-10 16:12:43 -07:00
#line hidden
this.ScenarioCleanup();
}
}
}
#pragma warning restore
#endregion