mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing a few more spec flows.
--HG-- branch : 1.x
This commit is contained in:
@@ -12,7 +12,7 @@ Scenario: HTML markup in any given comment is encoded
|
|||||||
And I hit "Save"
|
And I hit "Save"
|
||||||
And I go to "admin/blogs"
|
And I go to "admin/blogs"
|
||||||
And I follow "My Blog"
|
And I follow "My Blog"
|
||||||
And I follow "New Post"
|
And I follow "New Post" where class name has "primaryAction"
|
||||||
And I fill in
|
And I fill in
|
||||||
| name | value |
|
| name | value |
|
||||||
| Routable.Title | My Post |
|
| Routable.Title | My Post |
|
||||||
|
6
src/Orchard.Specs/Comments.feature.cs
generated
6
src/Orchard.Specs/Comments.feature.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||||
// SpecFlow Version:1.4.0.0
|
// SpecFlow Version:1.5.0.0
|
||||||
// Runtime Version:4.0.30319.1
|
// Runtime Version:4.0.30319.1
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
@@ -14,7 +14,7 @@ namespace Orchard.Specs
|
|||||||
using TechTalk.SpecFlow;
|
using TechTalk.SpecFlow;
|
||||||
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.5.0.0")]
|
||||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[NUnit.Framework.TestFixtureAttribute()]
|
[NUnit.Framework.TestFixtureAttribute()]
|
||||||
[NUnit.Framework.DescriptionAttribute("Comments")]
|
[NUnit.Framework.DescriptionAttribute("Comments")]
|
||||||
@@ -80,7 +80,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 14
|
#line 14
|
||||||
testRunner.And("I follow \"My Blog\"");
|
testRunner.And("I follow \"My Blog\"");
|
||||||
#line 15
|
#line 15
|
||||||
testRunner.And("I follow \"New Post\"");
|
testRunner.And("I follow \"New Post\" where class name has \"primaryAction\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
"name",
|
"name",
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
Feature: Lists
|
Feature: Lists
|
||||||
In order to add new lists to my site
|
In order to add new lists to my site
|
||||||
As an administrator
|
As an administrator
|
||||||
I want to create lists
|
I want to create lists
|
||||||
|
|
||||||
Scenario: I can create a new list
|
Scenario: I can create a new list
|
||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
When I go to "Admin/Contents/Create/List"
|
When I go to "Admin/Contents/Create/List"
|
||||||
And I fill in
|
And I fill in
|
||||||
| name | value |
|
| name | value |
|
||||||
| Routable.Title | MyList |
|
| Routable.Title | MyList |
|
||||||
@@ -13,25 +13,25 @@ Scenario: I can create a new list
|
|||||||
And I go to "Admin/Contents/List/List"
|
And I go to "Admin/Contents/List/List"
|
||||||
Then I should see "MyList"
|
Then I should see "MyList"
|
||||||
|
|
||||||
Scenario: I can add content items to a list
|
Scenario: I can add content items to a list
|
||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
And I have a containable content type "MyType"
|
And I have a containable content type "MyType"
|
||||||
When I go to "Admin/Contents/Create/List"
|
When I go to "Admin/Contents/Create/List"
|
||||||
And I fill in
|
And I fill in
|
||||||
| name | value |
|
| name | value |
|
||||||
| Routable.Title | MyList |
|
| Routable.Title | MyList |
|
||||||
And I hit "Save"
|
And I hit "Save"
|
||||||
And I go to "Admin/Contents/List/List"
|
And I go to "Admin/Contents/List/List"
|
||||||
Then I should see "MyList"
|
Then I should see "MyList"
|
||||||
When I follow "Contained Items"
|
When I follow "Contained Items"
|
||||||
Then I should see "The 'MyList' List has no content items."
|
Then I should see "The 'MyList' List has no content items."
|
||||||
When I follow "Create New Content" where href has "ReturnUrl"
|
When I follow "Create New Content" where href has "ReturnUrl"
|
||||||
Then I should see "MyType"
|
Then I should see "MyType"
|
||||||
When I follow "MyType" where href has "ReturnUrl"
|
When I follow "MyType" where href has "ReturnUrl"
|
||||||
And I fill in
|
And I fill in
|
||||||
| name | value |
|
| name | value |
|
||||||
| Routable.Title | MyContentItem |
|
| Routable.Title | MyContentItem |
|
||||||
And I hit "Save"
|
And I hit "Save"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
Then I should see "Manage Content for MyList"
|
Then I should see "Manage Content for MyList"
|
||||||
And I should see "MyContentItem"
|
And I should see "MyContentItem"
|
||||||
|
33
src/Orchard.Specs/Lists.feature.cs
generated
33
src/Orchard.Specs/Lists.feature.cs
generated
@@ -1,7 +1,7 @@
|
|||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||||
// SpecFlow Version:1.4.0.0
|
// SpecFlow Version:1.5.0.0
|
||||||
// Runtime Version:4.0.30319.1
|
// Runtime Version:4.0.30319.1
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
@@ -14,7 +14,7 @@ namespace Orchard.Specs
|
|||||||
using TechTalk.SpecFlow;
|
using TechTalk.SpecFlow;
|
||||||
|
|
||||||
|
|
||||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.5.0.0")]
|
||||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[NUnit.Framework.TestFixtureAttribute()]
|
[NUnit.Framework.TestFixtureAttribute()]
|
||||||
[NUnit.Framework.DescriptionAttribute("Lists")]
|
[NUnit.Framework.DescriptionAttribute("Lists")]
|
||||||
@@ -30,7 +30,8 @@ namespace Orchard.Specs
|
|||||||
public virtual void FeatureSetup()
|
public virtual void FeatureSetup()
|
||||||
{
|
{
|
||||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Lists", "In order to add new lists to my site\nAs an administrator\nI want to create lists", GenerationTargetLanguage.CSharp, ((string[])(null)));
|
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Lists", "In order to add new lists to my site\r\nAs an administrator\r\nI want to create lists" +
|
||||||
|
"", GenerationTargetLanguage.CSharp, ((string[])(null)));
|
||||||
testRunner.OnFeatureStart(featureInfo);
|
testRunner.OnFeatureStart(featureInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,9 +61,9 @@ namespace Orchard.Specs
|
|||||||
#line 6
|
#line 6
|
||||||
this.ScenarioSetup(scenarioInfo);
|
this.ScenarioSetup(scenarioInfo);
|
||||||
#line 7
|
#line 7
|
||||||
testRunner.Given("I have installed Orchard");
|
testRunner.Given("I have installed Orchard");
|
||||||
#line 8
|
#line 8
|
||||||
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
"name",
|
"name",
|
||||||
@@ -90,11 +91,11 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 16
|
#line 16
|
||||||
this.ScenarioSetup(scenarioInfo);
|
this.ScenarioSetup(scenarioInfo);
|
||||||
#line 17
|
#line 17
|
||||||
testRunner.Given("I have installed Orchard");
|
testRunner.Given("I have installed Orchard");
|
||||||
#line 18
|
#line 18
|
||||||
testRunner.And("I have a containable content type \"MyType\"");
|
testRunner.And("I have a containable content type \"MyType\"");
|
||||||
#line 19
|
#line 19
|
||||||
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
testRunner.When("I go to \"Admin/Contents/Create/List\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
"name",
|
"name",
|
||||||
@@ -111,15 +112,15 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 25
|
#line 25
|
||||||
testRunner.Then("I should see \"MyList\"");
|
testRunner.Then("I should see \"MyList\"");
|
||||||
#line 26
|
#line 26
|
||||||
testRunner.When("I follow \"Contained Items\"");
|
testRunner.When("I follow \"Contained Items\"");
|
||||||
#line 27
|
#line 27
|
||||||
testRunner.Then("I should see \"The \'MyList\' List has no content items.\"");
|
testRunner.Then("I should see \"The \'MyList\' List has no content items.\"");
|
||||||
#line 28
|
#line 28
|
||||||
testRunner.When("I follow \"Create New Content\" where href has \"ReturnUrl\"");
|
testRunner.When("I follow \"Create New Content\" where href has \"ReturnUrl\"");
|
||||||
#line 29
|
#line 29
|
||||||
testRunner.Then("I should see \"MyType\"");
|
testRunner.Then("I should see \"MyType\"");
|
||||||
#line 30
|
#line 30
|
||||||
testRunner.When("I follow \"MyType\" where href has \"ReturnUrl\"");
|
testRunner.When("I follow \"MyType\" where href has \"ReturnUrl\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
||||||
"name",
|
"name",
|
||||||
@@ -132,11 +133,11 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 34
|
#line 34
|
||||||
testRunner.And("I hit \"Save\"");
|
testRunner.And("I hit \"Save\"");
|
||||||
#line 35
|
#line 35
|
||||||
testRunner.And("I am redirected");
|
testRunner.And("I am redirected");
|
||||||
#line 36
|
#line 36
|
||||||
testRunner.Then("I should see \"Manage Content for MyList\"");
|
testRunner.Then("I should see \"Manage Content for MyList\"");
|
||||||
#line 37
|
#line 37
|
||||||
testRunner.And("I should see \"MyContentItem\"");
|
testRunner.And("I should see \"MyContentItem\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
testRunner.CollectScenarioErrors();
|
testRunner.CollectScenarioErrors();
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@ Scenario: Media admin is available
|
|||||||
Given I have installed Orchard
|
Given I have installed Orchard
|
||||||
And I have installed "Orchard.Media"
|
And I have installed "Orchard.Media"
|
||||||
When I go to "admin/media"
|
When I go to "admin/media"
|
||||||
Then I should see "Manage Media Folders"
|
Then I should see "Media"
|
||||||
And the status should be 200 "OK"
|
And the status should be 200 "OK"
|
||||||
|
|
||||||
Scenario: Creating a folder
|
Scenario: Creating a folder
|
||||||
@@ -19,7 +19,7 @@ Scenario: Creating a folder
|
|||||||
| Name | Hello World |
|
| Name | Hello World |
|
||||||
And I hit "Save"
|
And I hit "Save"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
Then I should see "Manage Media Folders"
|
Then I should see "Media"
|
||||||
And I should see "Hello World"
|
And I should see "Hello World"
|
||||||
And the status should be 200 "OK"
|
And the status should be 200 "OK"
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ Scenario: Limited access
|
|||||||
And I have installed "Orchard.Media"
|
And I have installed "Orchard.Media"
|
||||||
When I go to "admin/media/edit?name=..\..\bin&mediaPath=..\..\bin"
|
When I go to "admin/media/edit?name=..\..\bin&mediaPath=..\..\bin"
|
||||||
And I am redirected
|
And I am redirected
|
||||||
Then I should see "Manage Media Folders"
|
Then I should see "Media"
|
||||||
And I should see "Editing failed: Invalid path"
|
And I should see "Editing failed: Invalid path"
|
||||||
And the status should be 200 "OK"
|
And the status should be 200 "OK"
|
||||||
|
6
src/Orchard.Specs/Media.feature.cs
generated
6
src/Orchard.Specs/Media.feature.cs
generated
@@ -67,7 +67,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 9
|
#line 9
|
||||||
testRunner.When("I go to \"admin/media\"");
|
testRunner.When("I go to \"admin/media\"");
|
||||||
#line 10
|
#line 10
|
||||||
testRunner.Then("I should see \"Manage Media Folders\"");
|
testRunner.Then("I should see \"Media\"");
|
||||||
#line 11
|
#line 11
|
||||||
testRunner.And("the status should be 200 \"OK\"");
|
testRunner.And("the status should be 200 \"OK\"");
|
||||||
#line hidden
|
#line hidden
|
||||||
@@ -101,7 +101,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 21
|
#line 21
|
||||||
testRunner.And("I am redirected");
|
testRunner.And("I am redirected");
|
||||||
#line 22
|
#line 22
|
||||||
testRunner.Then("I should see \"Manage Media Folders\"");
|
testRunner.Then("I should see \"Media\"");
|
||||||
#line 23
|
#line 23
|
||||||
testRunner.And("I should see \"Hello World\"");
|
testRunner.And("I should see \"Hello World\"");
|
||||||
#line 24
|
#line 24
|
||||||
@@ -126,7 +126,7 @@ this.ScenarioSetup(scenarioInfo);
|
|||||||
#line 30
|
#line 30
|
||||||
testRunner.And("I am redirected");
|
testRunner.And("I am redirected");
|
||||||
#line 31
|
#line 31
|
||||||
testRunner.Then("I should see \"Manage Media Folders\"");
|
testRunner.Then("I should see \"Media\"");
|
||||||
#line 32
|
#line 32
|
||||||
testRunner.And("I should see \"Editing failed: Invalid path\"");
|
testRunner.And("I should see \"Editing failed: Invalid path\"");
|
||||||
#line 33
|
#line 33
|
||||||
|
Reference in New Issue
Block a user