Skip to content

Instantly share code, notes, and snippets.

@dev-pmartins
Created April 29, 2016 19:21
Show Gist options
  • Save dev-pmartins/bd3a74ece39e01093026a30a90cb6d85 to your computer and use it in GitHub Desktop.
Save dev-pmartins/bd3a74ece39e01093026a30a90cb6d85 to your computer and use it in GitHub Desktop.
var features = [];
$.each($('#feature-overview .feature'), function(i){
scenarios = [];
$.each($($('#scenario-overview .feature')[i]).find('.panel-group .panel'), function(){
scenarios = $.merge(scenarios, [
{
name: $(this).find($('.panel-title a')).text(),
status: $(this).hasClass('passed') && 'passed' || 'failed'
}
]);
});
features = $.merge(features, [
{
name: $(this).find($('.card .header h2')).text(),
status: $(this).find('.card').hasClass('passed') && 'passed' || 'failed',
scenarios: scenarios
}
]);
});
console.log(features[0].status);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment