Skip to content

Commit

Permalink
Merge pull request #87 from aaronjrich/master
Browse files Browse the repository at this point in the history
Restored Background description and reflected in model
  • Loading branch information
dirkrombauts committed Dec 19, 2013
2 parents 7e961b8 + 49896cc commit 3026820
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

- - -

Background:
This is the *coolest* background

Given I have initialized the Sum-variable to 0
When I add 1 to the Sum-variable

Scenario: Sample Markdown Scenario Example

This is **important** text
Expand Down
2 changes: 1 addition & 1 deletion src/Pickles/Pickles.BaseDhtmlFiles/Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h1 data-bind="text: Name, click: $root.toggleDetails" class="canHighlight, clic
<div class="row-fluid" data-bind="if: Background">
<div class="scenario">
<h4>Background:</h4>
<div class="description" data-bind="html: renderMarkdownBlock(Description)"></div>
<div class="description" data-bind="html: renderMarkdownBlock(Background.Description)"></div>
<ul data-bind="template: { name: 'steps-template', foreach: Background.Steps }"></ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/Pickles/Pickles.BaseDhtmlFiles/js/featuresModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function Examples(data) {
}

function Background(data) {
this.Name = '';
this.Description = '';
this.Name = data.Name || '';
this.Description = data.Description || '';
this.Steps = $.map(data.Steps, function(step) { return new Step(step); }) || new Array();
this.Tags = data.Tags || null;
this.Result = data.Result == null ? null : new Result(data.Result);
Expand Down
21 changes: 21 additions & 0 deletions src/Pickles/Pickles.BaseDhtmlFiles/pickledFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,27 @@ jsonPWrapper ([
}
}
],
"Background": {
"Name": "",
"Description": "This is the *coolest* background",
"Steps": [
{
"Keyword": "Given",
"NativeKeyword": "Given ",
"Name": "I have initialized the Sum-variable to 0"
},
{
"Keyword": "When",
"NativeKeyword": "When ",
"Name": "I add 1 to the Sum-variable"
}
],
"Tags": [],
"Result": {
"WasExecuted": false,
"WasSuccessful": false
}
},
"Result": {
"WasExecuted": false,
"WasSuccessful": false
Expand Down
Binary file modified src/Pickles/Pickles/Resources/Pickles.BaseDhtmlFiles.zip
Binary file not shown.

0 comments on commit 3026820

Please sign in to comment.