Permalink
Browse files

Update built files (CSV support)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information...
1 parent 61363b0 commit 481c27ac62ecedac4231efc24b6d6b181be3d349 @rwaldron rwaldron committed Aug 9, 2012
Showing with 63 additions and 16 deletions.
  1. +1 −1 dev/load.min.js
  2. +54 −7 dist/application.js
  3. +2 −2 dist/application.min.js
  4. +1 −1 dist/h.js
  5. +1 −1 dist/h.min.js
  6. +1 −1 dist/performance.min.js
  7. +1 −1 dist/ringmark.js
  8. +1 −1 dist/ringmark.min.js
  9. +1 −1 dist/rings.min.js
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -13434,7 +13434,7 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
},
dump: function() {
- var data, prefix, type, encodetype;
+ var data, prepare, finalized, prefix, type, encodetype, records;
// Localize the output type
type = Rng.params.output;
@@ -13462,32 +13462,79 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
// object, remove the markup strings by known property names.
// Base64 Encode the resulting string
if ( type === "json" ) {
- data = window.btoa(
+ finalized = window.btoa(
JSON.stringify( storage, function( key, val ) {
if ( key === "assertion" || key === "rendered" ) {
return undefined;
}
-
return val;
})
);
}
if ( type === "csv" ) {
- data = JSON.parse(JSON.stringify( storage, function( key, val ) {
+ // Will hold all line items
+ records = [];
+
+ // Filter and prepare data props
+ data = JSON.parse(
+ JSON.stringify( storage, function( key, val ) {
if ( key === "assertion" || key === "rendered" ) {
return undefined;
}
-
return val;
})
);
- console.log( data );
+
+ // Columns:
+ // title, feature, ring, assertion, result
+ //
+ // Map to:
+ // results.title, results.name,
+ // results.ring, assertion.message, assertion.result
+ //
+ Object.keys( data ).forEach(function( feature ) {
+ var assertions, results;
+
+ results = data[ feature ].results;
+
+ if ( results.assertions.length ) {
+ assertions = results.assertions.map(function( assertion ) {
+ return [
+
+ results.title,
+ results.name,
+ results.ring,
+ assertion.message,
+ assertion.result
+
+ ].map(function( v ) {
+ // Wrap strings in double quotes
+ if ( isNaN(+v) ) {
+ return '"' + v + '"';
+ }
+ // Booleans and numbers can go bare
+ return v;
+ }).join(",");
+ });
+ }
+
+ // Add assertions set to running records tally
+ records.push( assertions );
+ });
+
+ // Prepare joined records entries with header
+ prepare = "title,test,ring,assertion,result\n";
+ prepare += records.join("\n");
+
+ // Encode for output
+ finalized = window.btoa( prepare );
}
+
// Concatenate the data-url prefix and encoded data
// forward the browser to this new url to display
// test results with correct header
- window.location.href = prefix + data;
+ window.location.href = prefix + finalized;
},
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/*! Ringmark - v1.4.0pre - 8/8/2012
+/*! Ringmark - v1.4.0pre - 8/9/2012
* Copyright ( c ) 2012 Facebook Licensed W3C 3-clause BSD License, W3C Test Suite License */
(function( exports ) {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1820,7 +1820,7 @@ QUnit.diff = (function() {
}( this ));
-/*! Ringmark - v1.4.0pre - 8/8/2012
+/*! Ringmark - v1.4.0pre - 8/9/2012
* Copyright ( c ) 2012 Facebook Licensed W3C 3-clause BSD License, W3C Test Suite License */
(function( exports ) {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 481c27a

Please sign in to comment.