Skip to content

Commit

Permalink
Release 2.6.0 (#324)
Browse files Browse the repository at this point in the history
* Fix failing tests by removing overspecification

* Untabify

* Ensure description of feature is never null, fixes crashes of word and excel generation

* Unit test

* SpecFlow conformant name mapping 

* Implement name mapping in nunit signature builder more conformant to SpecFlows name generation logic wrt. to special characters

* Unit tests for special character handling

* Basic comments handling (#311)

* basic comment handling

* add excel handling

* cleanup

* clean up

* fix tests

* handle comments after the last step of a scenario

* clean up

* codestyle clean up

* codestyle clean up

* add test for mapper on comments

* clean up

* adding mapper tests on comments and location
+ more clean up

* Update Nuget packages (and small fixes) (#310)

* Update-Package SpecFlow

* Update-Package Nunit

* ExpectedException is obsolete in nunit3

* Update-Package System.IO.Abstractions.*

* Refactor CurrentScenarioContext to be instance-based and to be injected

* Update-Package MahApps.Metro

* Update-Package AutoMapper

* Update-Package Newtonsoft.Json

* Remove IKVM assembly binding redirects

* Do not use ScenarioContext.Current

* tweak gitignore

* Update GhostDoc file

* Downgrade Automapper to last known good version

* Exclude test project from test coverage

* Edit applicationhost.config

* Added support for multiple tags when searching (issue #283) (#319)

* Use Gherkin 4 parser (#322)

* Update-Package Gherkin

* tweak applicationhost.config

* Factory creates a GherkinDocument now

* The parser now returns a GherkinDocument

* Map a GherkinDocument to a Feature

* Use new icon (#323)

* Use new icon

* Use a big png file with the new logo

* Use the new .png file in the .nuspec files

* Use visual studio 2015

* Version bump to 2.6.0

* Update change log
  • Loading branch information
dirkrombauts committed Apr 12, 2016
1 parent a887ebb commit 988404a
Show file tree
Hide file tree
Showing 82 changed files with 1,185 additions and 225 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ packages/Chocolatey/
!src/Pickles/packages/Fody*/build/*
src/Pickles/.vs/config/applicationhost.config
src/Pickles/Pickles/PortabilityAnalysis.html
src/Pickles/.vs/config/applicationhost.config
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ Features in Experimental are subject to change and removal without being conside

This document is formatted according to the principles of [Keep A CHANGELOG](http://keepachangelog.com).

## [2.6.0] - 2016-04-12

### Added

- Support for multiple tags in DHTML version ([#283](https://github.com/picklesdoc/pickles/issues/283)) (by [@aaronjrich](https://github.com/aaronjrich)).
- Output commented lines ([#271](https://github.com/picklesdoc/pickles/issues/271)) (by [@ludwigjossieaux](https://github.com/ludwigjossieaux)).

### Changed

- Use version 4 of the Gherkin parser ([#322](https://github.com/picklesdoc/pickles/issues/322)) (by [@dirkrombauts](https://github.com/dirkrombauts)).
- Use new logo as icon and in nuget packages ([#323](https://github.com/picklesdoc/pickles/issues/323)) (by [@dirkrombauts](https://github.com/dirkrombauts)).
- Update external libraries ([#310](https://github.com/picklesdoc/pickles/issues/310)) (by [@dirkrombauts](https://github.com/dirkrombauts)).

### Fixed

- SpecFlow conformant name mapping in nUnit test result provider ([#315](https://github.com/picklesdoc/pickles/issues/315)) (by [@danielpullwitt](https://github.com/danielpullwitt)).
- Prevent crash when no Description is provided ([#314](https://github.com/picklesdoc/pickles/issues/314)) (by [@danielpullwitt](https://github.com/danielpullwitt)).


## [2.5.0] - 2016-03-21

Expand Down
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set "picklesVersion=2.5.0"
set "picklesVersion=2.6.0"

cls

Expand Down
2 changes: 1 addition & 1 deletion chocolatey/pickles.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Optionally, *Pickles* can **integrate test results**, so that your stakeholders
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
<licenseUrl>http://apache.org/licenses/LICENSE-2.0.html</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion chocolatey/picklesui.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Optionally, *Pickles* can **integrate test results**, so that your stakeholders
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
<licenseUrl>http://apache.org/licenses/LICENSE-2.0.html</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
</metadata>
<files>
Expand Down
Binary file removed pickles.jpeg
Binary file not shown.
Binary file added pickles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion src/Pickles/.vs/config/applicationhost.config
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,15 @@
</site>
<site name="Pickles.BaseDhtmlFiles" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Dev\Code\GitHub\DirkRombauts\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
<virtualDirectory path="/" physicalPath="C:\Dev\Code\GitHub\DirkRombauts\Pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52000:localhost" />
</bindings>
</site>
<site name="Pickles.BaseDhtmlFiles(1)" id="3">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Dev\PasteAsGherkinTable\Code\GitHub\DirkRombauts\Pickles\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52000:localhost" />
Expand Down
16 changes: 16 additions & 0 deletions src/Pickles/Pickles.BaseDhtmlFiles/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,27 @@

<script type="text/html" id="steps-template">
<li class="step">
<!-- ko if: StepComments != null && StepComments.length > 0 -->
<span class="comment">
<!-- ko foreach: StepComments -->
<span data-bind="text: Text"></span>
<br data-bind="visible : $index() != ($parent.length-1)" />
<!-- /ko -->
</span>
<!-- /ko -->
<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>
<div data-bind="template: { name: 'table-template', data: $data.TableArgument }"></div>
<!-- ko if: AfterLastStepComments != null && AfterLastStepComments.length > 0 -->
<span class="comment">
<!-- ko foreach: AfterLastStepComments -->
<span data-bind="text: Text"></span>
<br data-bind="visible : $index() != ($parent.length-1)" />
<!-- /ko -->
</span>
<!-- /ko -->
</li>
</script>

Expand Down
5 changes: 5 additions & 0 deletions src/Pickles/Pickles.BaseDhtmlFiles/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ li.step {
padding: 0;
}

.comment {
font-weight: bold;
color: #0088CC;
}

.keyword {
font-weight: bold;
color: #0000FF;
Expand Down
45 changes: 29 additions & 16 deletions src/Pickles/Pickles.BaseDhtmlFiles/js/featureSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

function findFeatureByRelativeFolder(path, features) {
var feature = _.find(features, function(featureTesting) {
return featureTesting.RelativeFolder == path;
return featureTesting.RelativeFolder == path;
});
return feature ? feature : null;
}
Expand All @@ -27,13 +27,20 @@ function matchesFeatureName(searchString, feature) {
}

function matchesFeatureTag(searchString, feature) {
var foundMatch = false;
$.each(feature.Feature.Tags, function (key, scenarioTag) {
var lowerCasedTag = scenarioTag.toLowerCase();
if (lowerCasedTag.indexOf(searchString) > -1) {
foundMatch = true;
var foundMatch = false;
var tags = searchString.split(" ");
$.each(tags, function (index, tag) {
tag = tag.toLowerCase();
if (tag.indexOf("@") > -1) {
$.each(feature.Feature.Tags, function (key, scenarioTag) {
var lowerCasedTag = scenarioTag.toLowerCase();
if (lowerCasedTag.indexOf(tag) > -1) {
foundMatch = true;
}
});
}
});

return foundMatch;
}

Expand All @@ -48,15 +55,21 @@ function matchesScenarioName(searchString, feature) {
}

function matchesScenarioTag(searchString, feature) {
for (var i = 0; i < feature.Feature.FeatureElements.length; i++) {
var foundMatch = false;
$.each(feature.Feature.FeatureElements[i].Tags, function (key, scenarioTag) {
var lowerCasedTag = scenarioTag.toLowerCase();
if (lowerCasedTag.indexOf(searchString) > -1) {
foundMatch = true;
var foundMatch = false;
var tags = searchString.split(" ");
$.each(tags, function (index, tag) {
tag = tag.toLowerCase();
if (tag.indexOf("@") > -1) {
for (var i = 0; i < feature.Feature.FeatureElements.length; i++) {
$.each(feature.Feature.FeatureElements[i].Tags, function (key, scenarioTag) {
var lowerCasedTag = scenarioTag.toLowerCase();
if (lowerCasedTag.indexOf(tag) > -1) {
foundMatch = true;
}
});
if (foundMatch) { break; }
}
});
if (foundMatch) return true;
}
return false;
}
});
return foundMatch;
}
6 changes: 6 additions & 0 deletions src/Pickles/Pickles.BaseDhtmlFiles/js/featuresModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ function Step(data) {
this.NativeKeyword = data.NativeKeyword || '';
this.DocStringArgument = data.DocStringArgument || '';
this.TableArgument = data.TableArgument == null ? null : new TableArgument(data.TableArgument.HeaderRow, data.TableArgument.DataRows);
this.StepComments = data.StepComments == null ? null : $.map(data.StepComments, function (c) { return new Comment(c); });
this.AfterLastStepComments = data.AfterLastStepComments == null ? null : $.map(data.AfterLastStepComments, function (c) { return new Comment(c); });
}

function Comment(data) {
this.Text = data.Text || '';
}

function TableArgument(headerRow, dataRows) {
Expand Down
4 changes: 3 additions & 1 deletion src/Pickles/Pickles.BaseDhtmlFiles/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,15 @@ test("Can search for tags and feature/scenarios names", function () {
"Feature level level tag search - across multiple features");
deepEqual(getFeaturesMatching('@doesnotexist', sampleJSONForSearch), [],
"Neither a tag or feature in list.");
deepEqual(getFeaturesMatching('@clearing @nestedFolder', sampleJSONForSearch), sampleJSONForSearch,
"Can search using multiple tags - will or them");

});

test("Can find feature by RelativeFolder", function () {

deepEqual(findFeatureByRelativeFolder('Workflow\\ClearingScreen.feature', sampleJSONForSearch), sampleJSONForSearch[0],
"Feature exists");
"Feature exists");
deepEqual(findFeatureByRelativeFolder('Workflow\\ClearingScreen2.feature', sampleJSONForSearch), null,
"Feature does not exist");

Expand Down
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.CommandLine/Pickles.CommandLine.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<summary>A documentation generator for features written in the Gherkin language</summary>
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
<tags>SpecificationByExample BDD SpecFlow Gherkin Cucumber SpecByEx LivingDocumentation Documentation</tags>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.CommandLine/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<package id="NLog" version="4.2.3" targetFramework="net45" />
<package id="NLog.Config" version="4.2.3" targetFramework="net45" />
<package id="NLog.Schema" version="4.2.3" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.MSBuild/Pickles.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<Reference Include="Microsoft.Build.Utilities.v3.5" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.MSBuild/Pickles.MSBuild.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<summary>A documentation generator for features written in the Gherkin language</summary>
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
<tags>SpecificationByExample BDD SpecFlow Gherkin Cucumber SpecByEx LivingDocumentation Documentation</tags>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.MSBuild/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
</packages>
44 changes: 44 additions & 0 deletions src/Pickles/Pickles.ObjectModel/ObjectModel/Comment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Table.cs" company="PicklesDoc">
// Copyright 2011 Jeffrey Cameron
// Copyright 2012-present PicklesDoc team and community contributors
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace PicklesDoc.Pickles.ObjectModel
{
public enum CommentType
{
Normal,
StepComment,
AfterLastStepComment
}

public class Comment
{
public Comment()
{
// Set default
this.Type = CommentType.Normal;
}

public string Text { get; set; }

public Location Location { get; set; }

public CommentType Type { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Pickles/Pickles.ObjectModel/ObjectModel/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Feature
public Feature()
{
this.FeatureElements = new List<IFeatureElement>();
this.Comments = new List<Comment>();
this.Tags = new List<string>();
}

Expand All @@ -36,6 +37,8 @@ public Feature()

public List<IFeatureElement> FeatureElements { get; }

public List<Comment> Comments { get; }

public Scenario Background { get; private set; }

public TestResult Result { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ public interface IFeatureElement
List<string> Tags { get; set; }

TestResult Result { get; set; }

Location Location { get; set; }
}
}
29 changes: 29 additions & 0 deletions src/Pickles/Pickles.ObjectModel/ObjectModel/Location.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Table.cs" company="PicklesDoc">
// Copyright 2011 Jeffrey Cameron
// Copyright 2012-present PicklesDoc team and community contributors
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace PicklesDoc.Pickles.ObjectModel
{
public class Location
{
public int Column { get; set; }

public int Line { get; set; }
}
}
4 changes: 1 addition & 3 deletions src/Pickles/Pickles.ObjectModel/ObjectModel/Scenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public Scenario()
this.Tags = new List<string>();
}

#region IFeatureElement Members

public string Name { get; set; }

public string Description { get; set; }
Expand All @@ -44,6 +42,6 @@ public Scenario()

public Feature Feature { get; set; }

#endregion
public Location Location { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ public ScenarioOutline()
public TestResult Result { get; set; }

public Feature Feature { get; set; }

public Location Location { get; set; }
}
}
Loading

0 comments on commit 988404a

Please sign in to comment.