Improved specflow I Follow href filter test to use quotes like others

--HG--
branch : dev
This commit is contained in:
Dave Reed
2011-03-18 11:49:18 -07:00
parent 4b223d2da2
commit c1be9e8735
3 changed files with 6 additions and 6 deletions

View File

@@ -191,7 +191,7 @@ namespace Orchard.Specs.Bindings {
_doc.Load(new StringReader(Details.ResponseText)); _doc.Load(new StringReader(Details.ResponseText));
} }
[When(@"I follow ""(.*)""")] [When(@"I follow ""([^""]*)""")]
public void WhenIFollow(string linkText) { public void WhenIFollow(string linkText) {
var link = _doc.DocumentNode var link = _doc.DocumentNode
.SelectNodes("//a") .SelectNodes("//a")
@@ -204,7 +204,7 @@ namespace Orchard.Specs.Bindings {
WhenIGoTo(urlPath); WhenIGoTo(urlPath);
} }
[When(@"I follow ""(.*)"" where href has (.+)$")] [When(@"I follow ""([^""]+)"" where href has ""([^""]+)""")]
public void WhenIFollow(string linkText, string hrefFilter) { public void WhenIFollow(string linkText, string hrefFilter) {
var link = _doc.DocumentNode var link = _doc.DocumentNode
.SelectNodes("//a[@href]").Where(elt => .SelectNodes("//a[@href]").Where(elt =>

View File

@@ -25,9 +25,9 @@ Scenario: I can add content items to a 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 |

View File

@@ -115,11 +115,11 @@ this.ScenarioSetup(scenarioInfo);
#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",