Working SpecFlow POST support

Step named: When I hit "x"
locates input type submit with value "x"
locates the form surrounding that input
and sends a POST request to the embedded web host with all of the input values of that form element
Also added step: Given I have a clean site with
as a large-grained copier of extensions

--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-04-20 14:27:43 -07:00
parent 5b3c213de4
commit 299a4ba74d
3 changed files with 203 additions and 6 deletions

View File

@@ -57,6 +57,27 @@ namespace Orchard.Specs.Bindings {
_webHost.CopyExtension("Core", moduleName);
}
[Given(@"I have a clean site with")]
public void GivenIHaveACleanSiteWith(Table table) {
GivenIHaveACleanSite();
foreach (var row in table.Rows) {
switch (row["extension"]) {
case "core":
GivenIHaveCore(row["name"]);
break;
case "module":
GivenIHaveModule(row["name"]);
break;
case "theme":
GivenIHaveTheme(row["name"]);
break;
default:
Assert.Fail("Unknown extension type {0}", row["extension"]);
break;
}
}
}
[Given(@"I am on ""(.*)""")]
public void GivenIAmOn(string urlPath) {
WhenIGoTo(urlPath);