Skip to content

Commit 988404a

Browse files
committed
Release 2.6.0 (#324)
* 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
1 parent a887ebb commit 988404a

File tree

82 files changed

+1185
-225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1185
-225
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ packages/Chocolatey/
8787
!src/Pickles/packages/Fody*/build/*
8888
src/Pickles/.vs/config/applicationhost.config
8989
src/Pickles/Pickles/PortabilityAnalysis.html
90+
src/Pickles/.vs/config/applicationhost.config

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ Features in Experimental are subject to change and removal without being conside
1414

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

17+
## [2.6.0] - 2016-04-12
18+
19+
### Added
20+
21+
- Support for multiple tags in DHTML version ([#283](https://github.com/picklesdoc/pickles/issues/283)) (by [@aaronjrich](https://github.com/aaronjrich)).
22+
- Output commented lines ([#271](https://github.com/picklesdoc/pickles/issues/271)) (by [@ludwigjossieaux](https://github.com/ludwigjossieaux)).
23+
24+
### Changed
25+
26+
- Use version 4 of the Gherkin parser ([#322](https://github.com/picklesdoc/pickles/issues/322)) (by [@dirkrombauts](https://github.com/dirkrombauts)).
27+
- Use new logo as icon and in nuget packages ([#323](https://github.com/picklesdoc/pickles/issues/323)) (by [@dirkrombauts](https://github.com/dirkrombauts)).
28+
- Update external libraries ([#310](https://github.com/picklesdoc/pickles/issues/310)) (by [@dirkrombauts](https://github.com/dirkrombauts)).
29+
30+
### Fixed
31+
32+
- SpecFlow conformant name mapping in nUnit test result provider ([#315](https://github.com/picklesdoc/pickles/issues/315)) (by [@danielpullwitt](https://github.com/danielpullwitt)).
33+
- Prevent crash when no Description is provided ([#314](https://github.com/picklesdoc/pickles/issues/314)) (by [@danielpullwitt](https://github.com/danielpullwitt)).
34+
1735

1836
## [2.5.0] - 2016-03-21
1937

build.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
2-
set "picklesVersion=2.5.0"
2+
set "picklesVersion=2.6.0"
33

44
cls
55

chocolatey/pickles.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Optionally, *Pickles* can **integrate test results**, so that your stakeholders
3232
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
3333
<licenseUrl>http://apache.org/licenses/LICENSE-2.0.html</licenseUrl>
3434
<requireLicenseAcceptance>false</requireLicenseAcceptance>
35-
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
35+
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
3636
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
3737
</metadata>
3838
<files>

chocolatey/picklesui.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Optionally, *Pickles* can **integrate test results**, so that your stakeholders
3232
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
3333
<licenseUrl>http://apache.org/licenses/LICENSE-2.0.html</licenseUrl>
3434
<requireLicenseAcceptance>false</requireLicenseAcceptance>
35-
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
35+
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
3636
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
3737
</metadata>
3838
<files>

pickles.jpeg

-41.5 KB
Binary file not shown.

pickles.png

435 KB
Loading

src/Pickles/.vs/config/applicationhost.config

+9-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,15 @@
163163
</site>
164164
<site name="Pickles.BaseDhtmlFiles" id="2">
165165
<application path="/" applicationPool="Clr4IntegratedAppPool">
166-
<virtualDirectory path="/" physicalPath="C:\Dev\Code\GitHub\DirkRombauts\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
166+
<virtualDirectory path="/" physicalPath="C:\Dev\Code\GitHub\DirkRombauts\Pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
167+
</application>
168+
<bindings>
169+
<binding protocol="http" bindingInformation="*:52000:localhost" />
170+
</bindings>
171+
</site>
172+
<site name="Pickles.BaseDhtmlFiles(1)" id="3">
173+
<application path="/" applicationPool="Clr4IntegratedAppPool">
174+
<virtualDirectory path="/" physicalPath="C:\Dev\PasteAsGherkinTable\Code\GitHub\DirkRombauts\Pickles\pickles\src\Pickles\Pickles.BaseDhtmlFiles" />
167175
</application>
168176
<bindings>
169177
<binding protocol="http" bindingInformation="*:52000:localhost" />

src/Pickles/Pickles.BaseDhtmlFiles/Index.html

+16
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,27 @@
5050

5151
<script type="text/html" id="steps-template">
5252
<li class="step">
53+
<!-- ko if: StepComments != null && StepComments.length > 0 -->
54+
<span class="comment">
55+
<!-- ko foreach: StepComments -->
56+
<span data-bind="text: Text"></span>
57+
<br data-bind="visible : $index() != ($parent.length-1)" />
58+
<!-- /ko -->
59+
</span>
60+
<!-- /ko -->
5361
<span class="keyword" data-bind="text: NativeKeyword"></span><span data-bind="text: Name"></span>
5462
<div data-bind="if: DocStringArgument != ''">
5563
<div data-bind="text: DocStringArgument" class="pre"></div>
5664
</div>
5765
<div data-bind="template: { name: 'table-template', data: $data.TableArgument }"></div>
66+
<!-- ko if: AfterLastStepComments != null && AfterLastStepComments.length > 0 -->
67+
<span class="comment">
68+
<!-- ko foreach: AfterLastStepComments -->
69+
<span data-bind="text: Text"></span>
70+
<br data-bind="visible : $index() != ($parent.length-1)" />
71+
<!-- /ko -->
72+
</span>
73+
<!-- /ko -->
5874
</li>
5975
</script>
6076

src/Pickles/Pickles.BaseDhtmlFiles/css/styles.css

+5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ li.step {
7272
padding: 0;
7373
}
7474

75+
.comment {
76+
font-weight: bold;
77+
color: #0088CC;
78+
}
79+
7580
.keyword {
7681
font-weight: bold;
7782
color: #0000FF;

src/Pickles/Pickles.BaseDhtmlFiles/js/featureSearch.js

+29-16
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
function findFeatureByRelativeFolder(path, features) {
1818
var feature = _.find(features, function(featureTesting) {
19-
return featureTesting.RelativeFolder == path;
19+
return featureTesting.RelativeFolder == path;
2020
});
2121
return feature ? feature : null;
2222
}
@@ -27,13 +27,20 @@ function matchesFeatureName(searchString, feature) {
2727
}
2828

2929
function matchesFeatureTag(searchString, feature) {
30-
var foundMatch = false;
31-
$.each(feature.Feature.Tags, function (key, scenarioTag) {
32-
var lowerCasedTag = scenarioTag.toLowerCase();
33-
if (lowerCasedTag.indexOf(searchString) > -1) {
34-
foundMatch = true;
30+
var foundMatch = false;
31+
var tags = searchString.split(" ");
32+
$.each(tags, function (index, tag) {
33+
tag = tag.toLowerCase();
34+
if (tag.indexOf("@") > -1) {
35+
$.each(feature.Feature.Tags, function (key, scenarioTag) {
36+
var lowerCasedTag = scenarioTag.toLowerCase();
37+
if (lowerCasedTag.indexOf(tag) > -1) {
38+
foundMatch = true;
39+
}
40+
});
3541
}
3642
});
43+
3744
return foundMatch;
3845
}
3946

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

5057
function matchesScenarioTag(searchString, feature) {
51-
for (var i = 0; i < feature.Feature.FeatureElements.length; i++) {
52-
var foundMatch = false;
53-
$.each(feature.Feature.FeatureElements[i].Tags, function (key, scenarioTag) {
54-
var lowerCasedTag = scenarioTag.toLowerCase();
55-
if (lowerCasedTag.indexOf(searchString) > -1) {
56-
foundMatch = true;
58+
var foundMatch = false;
59+
var tags = searchString.split(" ");
60+
$.each(tags, function (index, tag) {
61+
tag = tag.toLowerCase();
62+
if (tag.indexOf("@") > -1) {
63+
for (var i = 0; i < feature.Feature.FeatureElements.length; i++) {
64+
$.each(feature.Feature.FeatureElements[i].Tags, function (key, scenarioTag) {
65+
var lowerCasedTag = scenarioTag.toLowerCase();
66+
if (lowerCasedTag.indexOf(tag) > -1) {
67+
foundMatch = true;
68+
}
69+
});
70+
if (foundMatch) { break; }
5771
}
58-
});
59-
if (foundMatch) return true;
60-
}
61-
return false;
72+
}
73+
});
74+
return foundMatch;
6275
}

src/Pickles/Pickles.BaseDhtmlFiles/js/featuresModel.js

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ function Step(data) {
2828
this.NativeKeyword = data.NativeKeyword || '';
2929
this.DocStringArgument = data.DocStringArgument || '';
3030
this.TableArgument = data.TableArgument == null ? null : new TableArgument(data.TableArgument.HeaderRow, data.TableArgument.DataRows);
31+
this.StepComments = data.StepComments == null ? null : $.map(data.StepComments, function (c) { return new Comment(c); });
32+
this.AfterLastStepComments = data.AfterLastStepComments == null ? null : $.map(data.AfterLastStepComments, function (c) { return new Comment(c); });
33+
}
34+
35+
function Comment(data) {
36+
this.Text = data.Text || '';
3137
}
3238

3339
function TableArgument(headerRow, dataRows) {

src/Pickles/Pickles.BaseDhtmlFiles/tests/tests.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,15 @@ test("Can search for tags and feature/scenarios names", function () {
494494
"Feature level level tag search - across multiple features");
495495
deepEqual(getFeaturesMatching('@doesnotexist', sampleJSONForSearch), [],
496496
"Neither a tag or feature in list.");
497+
deepEqual(getFeaturesMatching('@clearing @nestedFolder', sampleJSONForSearch), sampleJSONForSearch,
498+
"Can search using multiple tags - will or them");
497499

498500
});
499501

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

502504
deepEqual(findFeatureByRelativeFolder('Workflow\\ClearingScreen.feature', sampleJSONForSearch), sampleJSONForSearch[0],
503-
"Feature exists");
505+
"Feature exists");
504506
deepEqual(findFeatureByRelativeFolder('Workflow\\ClearingScreen2.feature', sampleJSONForSearch), null,
505507
"Feature does not exist");
506508

src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
</Reference>
5656
<Reference Include="System" />
5757
<Reference Include="System.Core" />
58-
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
59-
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
58+
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
59+
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
6060
<Private>True</Private>
6161
</Reference>
6262
<Reference Include="System.Xml.Linq" />

src/Pickles/Pickles.CommandLine/Pickles.CommandLine.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<summary>A documentation generator for features written in the Gherkin language</summary>
3434
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
3535
<tags>SpecificationByExample BDD SpecFlow Gherkin Cucumber SpecByEx LivingDocumentation Documentation</tags>
36-
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
36+
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
3737
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
3838
</metadata>
3939
<files>

src/Pickles/Pickles.CommandLine/packages.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
<package id="NLog" version="4.2.3" targetFramework="net45" />
66
<package id="NLog.Config" version="4.2.3" targetFramework="net45" />
77
<package id="NLog.Schema" version="4.2.3" targetFramework="net45" />
8-
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
8+
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
99
</packages>

src/Pickles/Pickles.MSBuild/Pickles.MSBuild.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<Reference Include="Microsoft.Build.Utilities.v3.5" />
4747
<Reference Include="System" />
4848
<Reference Include="System.Core" />
49-
<Reference Include="System.IO.Abstractions, Version=2.0.0.123, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
50-
<HintPath>..\packages\System.IO.Abstractions.2.0.0.123\lib\net40\System.IO.Abstractions.dll</HintPath>
49+
<Reference Include="System.IO.Abstractions, Version=2.0.0.124, Culture=neutral, PublicKeyToken=d480b5b72fb413da, processorArchitecture=MSIL">
50+
<HintPath>..\packages\System.IO.Abstractions.2.0.0.124\lib\net40\System.IO.Abstractions.dll</HintPath>
5151
<Private>True</Private>
5252
</Reference>
5353
<Reference Include="System.Xml.Linq" />

src/Pickles/Pickles.MSBuild/Pickles.MSBuild.nuspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<summary>A documentation generator for features written in the Gherkin language</summary>
3434
<copyright>Copyright © 2010-2012 Jeffrey Cameron, Copyright © 2013-present PicklesDoc and contributors</copyright>
3535
<tags>SpecificationByExample BDD SpecFlow Gherkin Cucumber SpecByEx LivingDocumentation Documentation</tags>
36-
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.jpeg</iconUrl>
36+
<iconUrl>https://cdn.rawgit.com/picklesdoc/pickles/master/pickles.png</iconUrl>
3737
<releaseNotes>https://github.com/picklesdoc/pickles/blob/master/CHANGELOG.md</releaseNotes>
3838
</metadata>
3939
<files>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Autofac" version="3.5.2" targetFramework="net45" />
4-
<package id="System.IO.Abstractions" version="2.0.0.123" targetFramework="net45" />
4+
<package id="System.IO.Abstractions" version="2.0.0.124" targetFramework="net45" />
55
</packages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright file="Table.cs" company="PicklesDoc">
3+
// Copyright 2011 Jeffrey Cameron
4+
// Copyright 2012-present PicklesDoc team and community contributors
5+
//
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
// </copyright>
19+
// --------------------------------------------------------------------------------------------------------------------
20+
21+
namespace PicklesDoc.Pickles.ObjectModel
22+
{
23+
public enum CommentType
24+
{
25+
Normal,
26+
StepComment,
27+
AfterLastStepComment
28+
}
29+
30+
public class Comment
31+
{
32+
public Comment()
33+
{
34+
// Set default
35+
this.Type = CommentType.Normal;
36+
}
37+
38+
public string Text { get; set; }
39+
40+
public Location Location { get; set; }
41+
42+
public CommentType Type { get; set; }
43+
}
44+
}

src/Pickles/Pickles.ObjectModel/ObjectModel/Feature.cs

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Feature
2727
public Feature()
2828
{
2929
this.FeatureElements = new List<IFeatureElement>();
30+
this.Comments = new List<Comment>();
3031
this.Tags = new List<string>();
3132
}
3233

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

3738
public List<IFeatureElement> FeatureElements { get; }
3839

40+
public List<Comment> Comments { get; }
41+
3942
public Scenario Background { get; private set; }
4043

4144
public TestResult Result { get; set; }

src/Pickles/Pickles.ObjectModel/ObjectModel/IFeatureElement.cs

+2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ public interface IFeatureElement
3535
List<string> Tags { get; set; }
3636

3737
TestResult Result { get; set; }
38+
39+
Location Location { get; set; }
3840
}
3941
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright file="Table.cs" company="PicklesDoc">
3+
// Copyright 2011 Jeffrey Cameron
4+
// Copyright 2012-present PicklesDoc team and community contributors
5+
//
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
// </copyright>
19+
// --------------------------------------------------------------------------------------------------------------------
20+
21+
namespace PicklesDoc.Pickles.ObjectModel
22+
{
23+
public class Location
24+
{
25+
public int Column { get; set; }
26+
27+
public int Line { get; set; }
28+
}
29+
}

src/Pickles/Pickles.ObjectModel/ObjectModel/Scenario.cs

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public Scenario()
3030
this.Tags = new List<string>();
3131
}
3232

33-
#region IFeatureElement Members
34-
3533
public string Name { get; set; }
3634

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

4543
public Feature Feature { get; set; }
4644

47-
#endregion
45+
public Location Location { get; set; }
4846
}
4947
}

src/Pickles/Pickles.ObjectModel/ObjectModel/ScenarioOutline.cs

+2
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@ public ScenarioOutline()
4343
public TestResult Result { get; set; }
4444

4545
public Feature Feature { get; set; }
46+
47+
public Location Location { get; set; }
4648
}
4749
}

0 commit comments

Comments
 (0)