cucumber-html
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,3 +6,3 @@ { | ||
"description": "Cross platform HTML formatter for all implementations of Cucumber", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"homepage": "https://github.com/cucumber/cucumber-html", | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -113,4 +113,20 @@ var CucumberHTML = {}; | ||
currentStep.append('<pre class="embedded-text">' + text + '</pre>'); | ||
} | ||
}; | ||
this.before = function(before) { | ||
if(before.status != 'passed') { | ||
currentElement = featureElement({keyword: 'Before', name: '', description: ''}, 'before'); | ||
currentStepIndex = 1; | ||
populateStepError($('details', currentElement), before.error_message); | ||
} | ||
}; | ||
this.after = function(after) { | ||
if(after.status != 'passed') { | ||
currentElement = featureElement({keyword: 'After', name: '', description: ''}, 'after'); | ||
currentStepIndex++; | ||
populateStepError($('details', currentElement), after.error_message); | ||
} | ||
}; | ||
function featureElement(statement, itemtype) { | ||
@@ -117,0 +133,0 @@ var e = blockElement(currentFeature.children('details'), statement, itemtype); |
@@ -6,3 +6,3 @@ { | ||
"description": "Cross platform HTML formatter for all implementations of Cucumber", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"homepage": "https://github.com/cucumber/cucumber-html", | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -113,4 +113,20 @@ var CucumberHTML = {}; | ||
currentStep.append('<pre class="embedded-text">' + text + '</pre>'); | ||
} | ||
}; | ||
this.before = function(before) { | ||
if(before.status != 'passed') { | ||
currentElement = featureElement({keyword: 'Before', name: '', description: ''}, 'before'); | ||
currentStepIndex = 1; | ||
populateStepError($('details', currentElement), before.error_message); | ||
} | ||
}; | ||
this.after = function(after) { | ||
if(after.status != 'passed') { | ||
currentElement = featureElement({keyword: 'After', name: '', description: ''}, 'after'); | ||
currentStepIndex++; | ||
populateStepError($('details', currentElement), after.error_message); | ||
} | ||
}; | ||
function featureElement(statement, itemtype) { | ||
@@ -117,0 +133,0 @@ var e = blockElement(currentFeature.children('details'), statement, itemtype); |
@@ -113,4 +113,20 @@ var CucumberHTML = {}; | ||
currentStep.append('<pre class="embedded-text">' + text + '</pre>'); | ||
} | ||
}; | ||
this.before = function(before) { | ||
if(before.status != 'passed') { | ||
currentElement = featureElement({keyword: 'Before', name: '', description: ''}, 'before'); | ||
currentStepIndex = 1; | ||
populateStepError($('details', currentElement), before.error_message); | ||
} | ||
}; | ||
this.after = function(after) { | ||
if(after.status != 'passed') { | ||
currentElement = featureElement({keyword: 'After', name: '', description: ''}, 'after'); | ||
currentStepIndex++; | ||
populateStepError($('details', currentElement), after.error_message); | ||
} | ||
}; | ||
function featureElement(statement, itemtype) { | ||
@@ -117,0 +133,0 @@ var e = blockElement(currentFeature.children('details'), statement, itemtype); |
@@ -34,2 +34,3 @@ $(document).ready(function() { | ||
formatter.before({status: 'passed', duration: 668816288}); | ||
formatter.scenario({"tags":[{"name":"@foo","line":3},{"name":"@bar","line":4},{"name":"@doh","line":5}], keyword:'Scenario', name: 'Creating a simple report', line: 6}); | ||
@@ -52,2 +53,3 @@ formatter.step({keyword:'Given ', name:'I have a feature', line: 7, doc_string:{value: "A\ndoc string\non several lines", content_type:"text/plain", line:8}}); | ||
formatter.result({status:'skipped', duration: 0}); | ||
formatter.after({status: 'passed', duration: 668816288}); | ||
@@ -57,2 +59,3 @@ formatter.scenarioOutline({keyword:'Scenario Outline', name: 'Scenario with examples', description:'It should be good to format outlined arguments.', line: 16}); | ||
formatter.examples({description:'', name:'Some good examples', keyword:'Examples', line: 18, rows:[{cells:['name', 'price'], line:19}, {cells:['milk', '9'], line:20}, {cells:['bread', '7'], line:21}, {cells:['soap', '5'], line:22}]}) | ||
formatter.before({status: 'passed', duration: 668816288}); | ||
formatter.match({uri:'report.feature'}); | ||
@@ -64,2 +67,3 @@ formatter.result({status:'passed', duration: 0}); | ||
formatter.result({status:'failed', error_message:'I didn\'t do it.', duration: 0}); | ||
formatter.after({status: 'failed', duration: 668816288, "error_message": 'com.example.MyDodgyException: Widget underflow\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)\r\n\tat com.example.WidgetFurbicator.furbicateWidgets(WidgetFurbicator.java:678)'}); | ||
} | ||
@@ -66,0 +70,0 @@ console.log('Rendered %s features in %s ms', N, new Date().getTime() - start); |
@@ -113,4 +113,20 @@ var CucumberHTML = {}; | ||
currentStep.append('<pre class="embedded-text">' + text + '</pre>'); | ||
} | ||
}; | ||
this.before = function(before) { | ||
if(before.status != 'passed') { | ||
currentElement = featureElement({keyword: 'Before', name: '', description: ''}, 'before'); | ||
currentStepIndex = 1; | ||
populateStepError($('details', currentElement), before.error_message); | ||
} | ||
}; | ||
this.after = function(after) { | ||
if(after.status != 'passed') { | ||
currentElement = featureElement({keyword: 'After', name: '', description: ''}, 'after'); | ||
currentStepIndex++; | ||
populateStepError($('details', currentElement), after.error_message); | ||
} | ||
}; | ||
function featureElement(statement, itemtype) { | ||
@@ -117,0 +133,0 @@ var e = blockElement(currentFeature.children('details'), statement, itemtype); |
@@ -34,2 +34,3 @@ $(document).ready(function() { | ||
formatter.before({status: 'passed', duration: 668816288}); | ||
formatter.scenario({"tags":[{"name":"@foo","line":3},{"name":"@bar","line":4},{"name":"@doh","line":5}], keyword:'Scenario', name: 'Creating a simple report', line: 6}); | ||
@@ -52,2 +53,3 @@ formatter.step({keyword:'Given ', name:'I have a feature', line: 7, doc_string:{value: "A\ndoc string\non several lines", content_type:"text/plain", line:8}}); | ||
formatter.result({status:'skipped', duration: 0}); | ||
formatter.after({status: 'passed', duration: 668816288}); | ||
@@ -57,2 +59,3 @@ formatter.scenarioOutline({keyword:'Scenario Outline', name: 'Scenario with examples', description:'It should be good to format outlined arguments.', line: 16}); | ||
formatter.examples({description:'', name:'Some good examples', keyword:'Examples', line: 18, rows:[{cells:['name', 'price'], line:19}, {cells:['milk', '9'], line:20}, {cells:['bread', '7'], line:21}, {cells:['soap', '5'], line:22}]}) | ||
formatter.before({status: 'passed', duration: 668816288}); | ||
formatter.match({uri:'report.feature'}); | ||
@@ -64,2 +67,3 @@ formatter.result({status:'passed', duration: 0}); | ||
formatter.result({status:'failed', error_message:'I didn\'t do it.', duration: 0}); | ||
formatter.after({status: 'failed', duration: 668816288, "error_message": 'com.example.MyDodgyException: Widget underflow\r\n\tat org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)\r\n\tat com.example.WidgetFurbicator.furbicateWidgets(WidgetFurbicator.java:678)'}); | ||
} | ||
@@ -66,0 +70,0 @@ console.log('Rendered %s features in %s ms', N, new Date().getTime() - start); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
657631
1240
1