Skip to content

Commit

Permalink
canopy performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Sep 8, 2014
1 parent beb5523 commit 87f3e7a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Dojo/Canopy2048/Canopy2048.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="canopy">
<HintPath>packages\canopy.0.9.8\lib\canopy.dll</HintPath>
<HintPath>packages\canopy.0.9.14\lib\canopy.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="FSharp.Core, Version=$(TargetFSharpCoreVersion), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>packages\Newtonsoft.Json.5.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>packages\Newtonsoft.Json.6.0.5\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SizSelCsZzz">
<HintPath>packages\SizSelCsZzz.0.3.35.0\lib\SizSelCsZzz.dll</HintPath>
<HintPath>packages\SizSelCsZzz.0.3.36.0\lib\SizSelCsZzz.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Numerics" />
<Reference Include="WebDriver">
<HintPath>packages\Selenium.WebDriver.2.41.0\lib\net40\WebDriver.dll</HintPath>
<HintPath>packages\Selenium.WebDriver.2.42.0\lib\net40\WebDriver.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="WebDriver.Support">
<HintPath>packages\Selenium.Support.2.41.0\lib\net40\WebDriver.Support.dll</HintPath>
<HintPath>packages\Selenium.Support.2.42.0\lib\net40\WebDriver.Support.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
Expand Down
17 changes: 13 additions & 4 deletions Dojo/Canopy2048/Interactions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ open runner

module Interactions =

let lost () =
match someElement ".game-message.game-over" with
let lostSelector = css ".game-message.game-over"
let winSelector = css ".game-message.game-won"
let gameOverSelector = css ".game-message.game-won, .game-message.game-over"

let lost () =
match someElement <| lostSelector with
| None -> false
| Some(_) -> true

let won () =
match someElement <| winSelector with
| None -> false
| Some(_) -> true

let won () =
match someElement ".game-message.game-won" with
let gameEnded () =
match someElement <| gameOverSelector with
| None -> false
| Some(_) -> true

Expand Down
3 changes: 3 additions & 0 deletions Dojo/Canopy2048/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ open Interactions

module program =

canopy.configuration.optimizeBySkippingIFrameCheck <- true
canopy.configuration.optimizeByDisablingCoverageReport <- true

"starting a game of 2048" &&& fun _ ->

printfn "Game started."
Expand Down
10 changes: 5 additions & 5 deletions Dojo/Canopy2048/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="canopy" version="0.9.8" targetFramework="net40" />
<package id="Newtonsoft.Json" version="5.0.1" targetFramework="net40" />
<package id="Selenium.Support" version="2.41.0" targetFramework="net40" />
<package id="Selenium.WebDriver" version="2.41.0" targetFramework="net40" />
<package id="SizSelCsZzz" version="0.3.35.0" targetFramework="net40" />
<package id="canopy" version="0.9.14" targetFramework="net40" />
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net40" />
<package id="Selenium.Support" version="2.42.0" targetFramework="net40" />
<package id="Selenium.WebDriver" version="2.42.0" targetFramework="net40" />
<package id="SizSelCsZzz" version="0.3.36.0" targetFramework="net40" />
</packages>

0 comments on commit 87f3e7a

Please sign in to comment.