Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Rombauts committed Jul 28, 2015
2 parents 0b37b06 + c5ef651 commit 8173d28
Show file tree
Hide file tree
Showing 494 changed files with 207,109 additions and 134 deletions.
11 changes: 11 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Pickles Release Notes

## v1.2.0 - 2015-07-28

### New Feature

- In the DHtml version, there are now links to hide/show the navigation, and to collapse/expand all nodes in the navigation ([#204](https://github.com/picklesdoc/pickles/issues/204))

### Bugs Fixed

- The command line version no longer silently fails when an error occurs. You will need to adapt the configuration in order to get more information from the error ([#202]((https://github.com/picklesdoc/pickles/issues/202))
- The issue of failing silently in case the full filename is too long has been fixed ([#199](https://github.com/picklesdoc/pickles/issues/199))

## v1.1.0 - 2015-05-12

### New Feature
Expand Down
17 changes: 5 additions & 12 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
@echo off
set "picklesVersion=1.1.0"
set "picklesVersion=1.2.0"
set "fakeVersion=3.36.0"

cls


cd ".\src\Pickles\packages\NuGet.CommandLine.*\tools\"

".\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "..\..\..\..\..\packages" "-ExcludeVersion"

cd ..\..\..\..\..


"packages\FAKE\tools\Fake.exe" build.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion%
"packages\FAKE\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion%
"src\Pickles\packages\FAKE.%fakeVersion%\tools\Fake.exe" build.fsx --envvar version %picklesVersion%
"src\Pickles\packages\FAKE.%fakeVersion%\tools\Fake.exe" nuget.fsx --envvar version %picklesVersion%
"src\Pickles\packages\FAKE.%fakeVersion%\tools\Fake.exe" chocolatey.fsx --envvar version %picklesVersion%

call unzip.cmd %picklesVersion%

Expand Down
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
#r @"src\Pickles\packages\FAKE.3.36.0\tools\FakeLib.dll"
open Fake
open Fake.AssemblyInfoFile

Expand Down
2 changes: 1 addition & 1 deletion chocolatey.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
#r @"src\Pickles\packages\FAKE.3.36.0\tools\FakeLib.dll"
open Fake

// Properties
Expand Down
2 changes: 1 addition & 1 deletion nuget.fsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
#r @"src\Pickles\packages\FAKE.3.36.0\tools\FakeLib.dll"
open Fake

// Properties
Expand Down
1,038 changes: 1,038 additions & 0 deletions src/Pickles/.vs/config/applicationhost.config

Large diffs are not rendered by default.

59 changes: 33 additions & 26 deletions src/Pickles/Pickles.BaseDhtmlFiles/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<title>Features</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Le styles -->
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
Expand All @@ -26,11 +26,11 @@

<script type="text/html" id="featuresByFolder-template">
<div class="features-folder">
<div class="feature-folder-header" data-bind="click: toggleShowingFolderFeatures">
<span class="icon-chevron-down"></span>
<div class="feature-folder-header" data-bind="click: $root.toggleShowingFolderFeatures">
<span data-bind="css: { 'icon-chevron-down': IsExpanded() == true, 'icon-chevron-right': IsExpanded() == false }"></span>
<span data-bind="text: Name" style="padding: 5px"></span>
</div>
<div class="feature-folder-contents" style="margin-left: 15px;display:none">
<div class="feature-folder-contents" data-bind="visible: IsExpanded">
<div data-bind="template: { name: 'features-template', foreach: features }"></div>
<div data-bind="template: { name: 'featuresByFolder-template', foreach: SubDirectories }"></div>
</div>
Expand All @@ -49,7 +49,7 @@

<script type="text/html" id="steps-template">
<li class="step">
<span class="keyword" data-bind="text: NativeKeyword"></span><span data-bind=" text: Name"></span>
<span class="keyword" data-bind="text: NativeKeyword"></span><span data-bind="text: Name"></span>
<div data-bind="if: DocStringArgument != ''">
<div data-bind="text: DocStringArgument" class="pre"></div>
</div>
Expand Down Expand Up @@ -90,13 +90,16 @@
</div>
</div>
</div>
<div class="navbar-below">
<div data-bind="click: $root.hideShowNavigation"><i class="icon-white" data-bind="css: { 'icon-minus-sign': $root.navIsShown(), 'icon-plus-sign': !$root.navIsShown() }"></i> Navigation</div>
<div data-bind="click: $root.hideShowNavigationTree"><i class="icon-white" data-bind="css: { 'icon-minus-sign': $root.ShowAllLinks(), 'icon-plus-sign': !$root.ShowAllLinks() }"></i> Links</div>
</div>
</div>

<div class="container-fluid" id="MainContainer">
<div class="row-fluid">
<div class="span12">
<div class="span3" id="FolderNav" data-bind="visible: navIsShown, css: { span3 : navIsShown(), span0 : !navIsShown() }">
<div id="HideIt" data-bind="click: hideNav"><i class="icon-chevron-left"></i></div>
<div id="InnerNav">
<div data-bind="template: { name: 'features-template', foreach: featuresByFolder().features }"></div>
<div data-bind="template: { name: 'featuresByFolder-template', foreach: featuresByFolder().SubDirectories }"></div>
Expand All @@ -109,7 +112,6 @@
</div>

<div id="Content" data-bind="with: currentFeature, css: { span12 : navIsHidden(), span9 : !navIsHidden() }">
<div id="ShowIt" data-bind="visible: $root.navIsHidden, click: $root.showNav"><i class="icon-chevron-right"></i></div>
<div data-bind="with: Feature" id="featureDetails">
<div data-bind="template: { name: 'testResults-template', data: Result }"></div>
<div data-bind="if: Tags.length > 0" class="canHighlight inline">
Expand All @@ -118,7 +120,7 @@
<span data-bind="text: $data" class="inline"></span>
<!-- /ko -->
</div>
<h1 data-bind="text: Name, click: $root.toggleDetails" class="canHighlight, clickable"></h1>
<h1 data-bind="text: Name, click: $root.toggleDetails" class="canHighlight clickable"></h1>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
</div>

Expand Down Expand Up @@ -182,11 +184,11 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
</div>
<!--/row-->

<hr>
<!--<hr>
<footer>
<p></p>
</footer>
</footer>-->

</div>
<!--/.fluid-container-->
Expand All @@ -211,13 +213,14 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
function ViewModel(features, configuration) {
var self = this;

features = $.map(features, function(el, i) { return new FeatureParent(el); });
features = $.map(features, function (el, i) { return new FeatureParent(el); });

self.originalFeaturesList = ko.observableArray(features);
self.featuresByFolder = ko.observable(buildFullHierarchy(getFeaturesFromScenariosList(features)));
self.currentFeature = ko.observable();
self.configuration = ko.observable(configuration);

self.ShowAllLinks = ko.observable(false);

self.setCurrentFeature = function () {
if (window.location.hash != '') {
var featureFromHashLocation = findFeatureByRelativeFolder(removeBeginningHash(window.location.hash), features);
Expand Down Expand Up @@ -275,6 +278,24 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
self.isSelected = function (path) {
return self.currentFeature().RelativeFolder == path;
};
self.toggleShowingFolderFeatures = function (dir) {
dir.IsExpanded(!dir.IsExpanded());
};
self.hideShowNavigation = function () {
self.navIsShown(!self.navIsShown());
self.navIsHidden(!self.navIsHidden());
};
self.hideShowNavigationTree = function () {
self.ShowAllLinks(!self.ShowAllLinks());
expandContractDirectoryLinks(self.featuresByFolder().SubDirectories);
};

function expandContractDirectoryLinks(subDirs) {
$.each(subDirs, function (key, value) {
value.IsExpanded(self.ShowAllLinks());
expandContractDirectoryLinks(value.SubDirectories);
});
};

// Hide / show detailed areas
self.toggleDetail = function (element) {
Expand Down Expand Up @@ -335,20 +356,6 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click

setupSubmitSearchWhenEnterKeyPressed();
});

function toggleShowingFolderFeatures(element, event) {
var icon = $($(event.target).parent().children('span')[0]);
var folderContents = $($(event.target).parent().next('div'));
if (icon.hasClass("icon-chevron-right")) {
icon.removeClass("icon-chevron-right");
icon.addClass("icon-chevron-down");
folderContents.hide();
} else {
icon.addClass("icon-chevron-right");
icon.removeClass("icon-chevron-down");
folderContents.show();
}
};
</script>
</body>
</html>
62 changes: 45 additions & 17 deletions src/Pickles/Pickles.BaseDhtmlFiles/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,34 @@
margin-top: 5px;
}

.feature-folder-header span {
cursor: pointer;
}

.feature-folder-contents {
margin-left: 15px;
}

.navbar-below {
margin-top: -1px;
margin-left: 10px;
border-top: 0;
-ms-border-bottom-left-radius: 10px;
border-bottom-left-radius: 10px;
-ms-border-bottom-right-radius: 10px;
border-bottom-right-radius: 10px;
width: 180px;
background-color: black;
color: rgb(173, 173, 173);
}

.navbar-below div {
display: inline-block;
padding-left: 8px;
padding-right: 8px;
cursor: pointer;
}

#scenarios, .steps {
list-style-type: none;
margin: 0;
Expand Down Expand Up @@ -49,13 +77,13 @@ li.step {
margin-bottom: 0px;
}

.steps table td {
color: #B21515;
}
.steps table td {
color: #B21515;
}

.steps table th {
font-style: italic;
}
.steps table th {
font-style: italic;
}

#SearchButton {
margin-top: 0;
Expand All @@ -70,21 +98,21 @@ li.step {
border-right: 1px lightgrey solid;
}

#FolderNav a:hover {
background-color: #EEEEEE;
color: #1A668C;
text-decoration: none;
}
#FolderNav a:hover {
background-color: #EEEEEE;
color: #1A668C;
text-decoration: none;
}

.feature {
padding: 5px;
}

.feature:hover {
background-color: #EEEEEE;
cursor: pointer;
color: #1A668C;
}
.feature:hover {
background-color: #EEEEEE;
cursor: pointer;
color: #1A668C;
}

.canHighlight {
}
Expand Down Expand Up @@ -147,4 +175,4 @@ li.step {
.table-condensed th,
.table-condensed td {
padding: 5px 8px;
}
}
1 change: 1 addition & 0 deletions src/Pickles/Pickles.BaseDhtmlFiles/js/heirarchyBuilder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function Directory(name) {
this.Name = name;
this.IsExpanded = ko.observable(false);
this.features = new Array();
this.SubDirectories = new Array();
}
Expand Down
7 changes: 6 additions & 1 deletion src/Pickles/Pickles.CommandLine/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ private static int Main(string[] args)
log.Info("Pickles completed successfully");
}
}
catch
catch (Exception ex)
{
if (log.IsFatalEnabled)
{
log.FatalException("Pickles did not complete successfully", ex);
}

return 1;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/Pickles/Pickles.Test/Pickles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="TestFrameworks\WhenParsingxUnit2ResultsFile.cs" />
<Compile Include="TestResultExtensionsTests.cs" />
<Compile Include="TestFrameworks\WhenParsingCucumberJsonResultsFile.cs" />
<Compile Include="TestFrameworks\WhenParsingMsTestResultsFile.cs" />
Expand Down Expand Up @@ -275,6 +276,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TestFrameworks\results-example-xunit2.xml" />
<EmbeddedResource Include="TestFrameworks\results-example-nunit - Run 1.xml" />
<EmbeddedResource Include="TestFrameworks\results-example-nunit - Run 2.xml" />
<EmbeddedResource Include="TestFrameworks\results-example-specrun.html" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;

using NUnit.Framework;

using PicklesDoc.Pickles.ObjectModel;
using PicklesDoc.Pickles.TestFrameworks;

using NFluent;

namespace PicklesDoc.Pickles.Test.TestFrameworks
{
[TestFixture]
public class WhenParsingxUnit2ResultsFile : WhenParsingTestResultFiles<XUnitResults>
{
public WhenParsingxUnit2ResultsFile()
: base("results-example-xunit2.xml")
{
}

[Test]
public void ThenCannotReadFeatureResult()
{
// Write out the embedded test results file
var results = ParseResultsFile();

var feature = new Feature { Name = "Addition" };

Check.ThatCode(() => results.GetFeatureResult(feature)).Throws<Exception>();
}
}
}
Loading

0 comments on commit 8173d28

Please sign in to comment.