Fixing widget layer editing and tidying up the widget management index template.

work item: 16837

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-11-24 23:31:49 -08:00
parent a7a6067497
commit 5e1a3cb3ac
6 changed files with 137 additions and 18 deletions

View File

@@ -170,8 +170,10 @@ namespace Orchard.Specs.Bindings {
[When(@"I follow ""(.*)""")]
public void WhenIFollow(string linkText) {
var link = _doc.DocumentNode
.SelectNodes("//a")
.Single(elt => elt.InnerText == linkText);
.SelectNodes("//a")
.SingleOrDefault(elt => elt.InnerText == linkText)
?? _doc.DocumentNode
.SelectSingleNode(string.Format("//a[@title='{0}']", linkText));
var urlPath = link.Attributes["href"].Value;