Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Jasmine runner back up and running

  • Loading branch information...
commit 1a8d0f86e4de7eb35e24fba197d2216973686fdc 1 parent 424c51a
@jmarnold jmarnold authored
View
2  src/FubuMVC.Core/FubuRegistry.DefaultServices.cs
@@ -135,7 +135,7 @@ private void setupServices(BehaviorGraph graph)
{
graph.Services.AddService<IConverterFamily, AspNetPassthroughConverter>();
- graph.Services.AddService<ICurrentHttpRequest, StandInCurrentHttpRequest>();
+ graph.Services.SetServiceIfNone<ICurrentHttpRequest, StandInCurrentHttpRequest>();
graph.Services.AddService<AggregateDictionary, AggregateDictionary>();
graph.Services.AddService<IModelBinder, FubuTupleBinder>();
View
10 src/FubuMVC.OwinHost/OwinAggregateDictionary.cs
@@ -20,7 +20,7 @@ public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
};
AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);
- AddLocator(RequestDataSource.Request.ToString(), key => valuesForRequest(body), () => valuesForRequest(body).Keys);
+ AddLocator(RequestDataSource.Request.ToString(), key => findRequestValue(key, body), () => valuesForRequest(body).Keys);
addDictionaryLocator("Query string", body.Querystring());
addDictionaryLocator("Form Post", body.FormData ?? new Dictionary<string, string>());
@@ -34,6 +34,14 @@ private void addDictionaryLocator(string name, IDictionary<string, string> dicti
AddLocator(name, locator, () => dictionary.Keys);
}
+ private static object findRequestValue(string key, OwinRequestBody body)
+ {
+ var values = valuesForRequest(body);
+ string found;
+ values.TryGetValue(key, out found);
+ return found;
+ }
+
private static IDictionary<string, string> valuesForRequest(OwinRequestBody body)
{
var dictionary = new Dictionary<string, string>();
View
5 src/Serenity/Jasmine/JasmineRunner.cs
@@ -84,6 +84,7 @@ public bool RunAllSpecs()
_driver.NavigateTo<JasminePages>(x => x.AllSpecs());
var browser = _applicationUnderTest.Driver;
+ Wait.Until(() => browser.FindElement(By.ClassName("finished-at")).Text.IsNotEmpty());
var failures = browser.FindElements(By.CssSelector("div.suite.failed"));
@@ -99,9 +100,9 @@ public bool RunAllSpecs()
Console.WriteLine(line);
writeTotals(browser);
- _kayak.Stop();
-
browser.Quit();
+ browser.SafeDispose();
+ _kayak.Stop();
});
View
3  src/Serenity/Jasmine/SerenityJasmineRegistry.cs
@@ -1,5 +1,7 @@
using FubuMVC.Core;
using FubuMVC.Core.Assets.Combination;
+using FubuMVC.Core.Http;
+using FubuMVC.OwinHost;
namespace Serenity.Jasmine
{
@@ -15,6 +17,7 @@ public SerenityJasmineRegistry()
Services(x =>
{
x.ReplaceService<ICombinationDeterminationService, NulloCombinationDeterminationService>();
+ x.ReplaceService<ICurrentHttpRequest, OwinCurrentHttpRequest>();
});
}
}
View
4 src/Serenity/Serenity.csproj
@@ -160,7 +160,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <None Include="packages.config" />
+ <None Include="packages.config">
+ <SubType>Designer</SubType>
+ </None>
<None Include="WebContent\jasmine.asset.config" />
</ItemGroup>
<ItemGroup>
View
8 src/SerenityRunner/SerenityRunner.csproj
@@ -60,8 +60,12 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <None Include="app.config" />
- <None Include="packages.config" />
+ <None Include="app.config">
+ <SubType>Designer</SubType>
+ </None>
+ <None Include="packages.config">
+ <SubType>Designer</SubType>
+ </None>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\lib\chromedriver.exe">
View
2  src/SerenityRunner/app.config
@@ -4,7 +4,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Please sign in to comment.
Something went wrong with that request. Please try again.