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 May 28, 2014
2 parents cae8dc3 + 6d7e47c commit 778e2fe
Show file tree
Hide file tree
Showing 16 changed files with 570 additions and 389 deletions.
11 changes: 8 additions & 3 deletions src/Pickles/Pickles.BaseDhtmlFiles/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<body>

<script type="text/html" id="features-template">
<div class="feature" data-bind="click: $root.showFeature.bind(Path)"><a data-bind="text: Name, click: $root.showFeature.bind(Path), css: { selected: $root.isSelected(Path) }" href="#"></a></div>
<div class="feature" data-bind="click: $root.showFeature.bind(Path)"><a data-bind="text: Name, click: $root.showFeature.bind(Path), css: { selected: $root.isSelected(Path) }" href="#"></a><span data-bind="template: { name: 'testResults-template', data: Result }"></span></div>
</script>

<script type="text/html" id="featuresByFolder-template">
Expand Down Expand Up @@ -155,8 +155,13 @@ <h4 data-bind="text: Name, click: $root.toggleDetail" class="canHighlight, click
</div>
<!-- Enable to dump JSON to the screen -->
<!--<div class="row-fluid">
Current Features List JSON:
<pre data-bind="text: ko.toJSON($parent.featuresList())"></pre>
Current originalFeaturesList JSON:
<pre data-bind="text: ko.toJSON($parent.originalFeaturesList())"></pre>
</div>
<br /><br />
<div class="row-fluid">
Current featuresByFolder List JSON:
<pre data-bind="text: ko.toJSON($parent.featuresByFolder())"></pre>
</div>-->
</div>
<!--/span-->
Expand Down
10 changes: 8 additions & 2 deletions src/Pickles/Pickles.BaseDhtmlFiles/js/heirarchyBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
this.SubDirectories = new Array();
}

function NavigationFeature(name, path) {
function NavigationFeature(name, path, result) {
this.Name = name;
this.Path = path;
this.Result = result;
}

function Result(data) {
this.WasExecuted = data.WasExecuted || false;
this.WasSuccessful = data.WasSuccessful || false;
}

function getFeaturesFromScenariosList(scenarios) {
var features = new Array();

$.each(scenarios, function (key, val) {
features.push(new NavigationFeature(val.Feature.Name, val.RelativeFolder));
features.push(new NavigationFeature(val.Feature.Name, val.RelativeFolder, val.Feature.Result));
});

return features;
Expand Down
198 changes: 41 additions & 157 deletions src/Pickles/Pickles.BaseDhtmlFiles/pickledFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jsonPWrapper ([
"RelativeFolder": "14MarkdownExample\\MarkdownExamples.feature",
"Feature": {
"Name": "Sample Markdown Feature",
"Description": "Header 1\r\n========\r\n\r\nHeader 2\r\n--------\r\n\r\nThis is a *significant* word\r\n\r\n1. Ordered #1\r\n2. Ordered #2\r\n3. Ordered #3\r\n\r\n- Unordered #1 \r\n- Unordered #2\r\n- Unordered #3 \t\r\n\r\nHorizontal Rule: \r\n- - -\r\n\r\nTable example: \r\n| First Header | Second Header |\r\n| ------------- | ------------- |\r\n| Content Cell | Content Cell |\r\n| Content Cell | Content Cell | \r\n\r\n- - -",
"Description": "Header 1\r\n========\r\n\r\nHeader 2\r\n--------\r\n\r\nThis is a *significant* word\r\n\r\n1. Ordered #1\r\n2. Ordered #2\r\n3. Ordered #3\r\n\r\n- Unordered #1 \r\n- Unordered #2\r\n- Unordered #3 \t\r\n\r\nHorizontal Rule: \r\n- - -\r\n\r\nTable example: \r\n| First Header | Second Header |\r\n| ------------- | ------------- |\r\n| Content Cell | Content Cell |\r\n| Content Cell | Content Cell | \r\n\r\n- - -\r\n\r\nIncluding a picture: ![](./image.png)",
"FeatureElements": [
{
"Name": "Sample Markdown Scenario Example",
Expand Down Expand Up @@ -1742,168 +1742,52 @@ jsonPWrapper ([
{
"RelativeFolder": "02TagsAndHooks\\TagDemo.feature",
"Feature": {
"Name": "Tag demonstrator",
"Description": "In order to show the capabilities of tags in SpecFlow\r\nAs a SpecFlow evanglist\r\nI want to write scenarios that has tags and show their usage in code",
"Name": "TagDemo",
"Description": "In order to avoid silly mistakes\nAs a math idiot\nI want to be told the sum of two numbers",
"FeatureElements": [
{
"Name": "Ignored scenario",
"Name": "Add two numbers",
"Description": "",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "that my scenario has the @ignore tag"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I run the scenario"
},
{
"Keyword": "Then",
"NativeKeyword": "Then ",
"Name": "the scenario is ignored"
"Name": "I have entered 50 into the calculator"
},
{
"Keyword": "And",
"NativeKeyword": "And ",
"Name": "the missing step definitions are not reported"
}
],
"Tags": [
"@ignore"
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
}
},
{
"Name": "A scenario without tags",
"Description": "",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "that my scenario has 0 tags"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I run the scenario"
},
{
"Keyword": "Then",
"NativeKeyword": "Then ",
"Name": "before scenario hook with '' is run"
}
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
}
},
{
"Name": "A scenario with 1 tag",
"Description": "",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "that my scenario has 1 tags"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I run the scenario"
},
{
"Keyword": "Then",
"NativeKeyword": "Then ",
"Name": "before scenario hook with 'testTag1' is run"
}
],
"Tags": [
"@testTag1"
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
}
},
{
"Name": "A scenario with 3 tags",
"Description": "",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "that my scenario has 3 tags"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I run the scenario"
},
{
"Keyword": "Then",
"NativeKeyword": "Then ",
"Name": "before scenario hook with 'testTag1, testTag2, testTag3' is run"
}
],
"Tags": [
"@testTag1",
"@testTag2",
"@testTag3"
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
}
},
{
"Name": "A scenario with 2 tags",
"Description": "",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "that my scenario has 2 tags"
"Name": "I have entered 70 into the calculator"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I run the scenario"
"Name": "I press add"
},
{
"Keyword": "Then",
"NativeKeyword": "Then ",
"Name": "before scenario hook with 'testTag1, testTag3' is run"
"Name": "the result should be 120 on the screen"
}
],
"Tags": [
"@testTag1",
"@testTag3"
"@mytag"
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
}
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
},
"Tags": [
"@allAboutTags",
"@important"
]
"Tags": []
},
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand All @@ -1929,8 +1813,8 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand All @@ -1950,8 +1834,8 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand All @@ -1971,8 +1855,8 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand All @@ -1992,8 +1876,8 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand All @@ -2013,20 +1897,20 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
}
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
},
"Tags": []
},
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand Down Expand Up @@ -2057,20 +1941,20 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
}
],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
},
"Tags": []
},
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand Down Expand Up @@ -2101,8 +1985,8 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
"WasExecuted": true,
"WasSuccessful": true
}
},
{
Expand Down Expand Up @@ -2142,19 +2026,19 @@ jsonPWrapper ([
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasExecuted": true,
"WasSuccessful": false
}
}
],
"Result": {
"WasExecuted": false,
"WasExecuted": true,
"WasSuccessful": false
},
"Tags": []
},
"Result": {
"WasExecuted": false,
"WasExecuted": true,
"WasSuccessful": false
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/Pickles/Pickles.BaseDhtmlFiles/tests/Tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ <h2 id="qunit-userAgent"></h2>

<!-- custom scripts files with code that I'm testing -->
<script src="../js/stringFormatting.js"></script>
<script src="../js/featuresModel.js"></script>
<script src="../js/heirarchyBuilder.js"></script>
<script src="../js/typeaheadList.js"></script>
<script src="../js/featureSearch.js"></script
<script src="../js/featureSearch.js"></script>
<!-- end custom scripts -->

<script src="tests.js"></script>
Expand Down
Loading

0 comments on commit 778e2fe

Please sign in to comment.