mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user