From d6ce4705b71f261fb143df839f686a92b5511390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 17 Mar 2016 11:35:06 +0100 Subject: [PATCH] Travis CI: Use Arial in all SVG tests and reduce tolerance. --- test/assets/clipping.svg | 8 ++++---- test/helpers.js | 2 +- test/tests/SvgImport.js | 16 ++++------------ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/test/assets/clipping.svg b/test/assets/clipping.svg index 79381bfc..df167aaf 100644 --- a/test/assets/clipping.svg +++ b/test/assets/clipping.svg @@ -1,6 +1,6 @@ - Clipping a path with a path: + Clipping a path with a path: stroke-miterlimit="10" cx="250" cy="198" r="103" /> - Clipping a compound path with a path: + Clipping a compound path with a path: /> - Clipping a path with a compound path: + Clipping a path with a compound path: stroke-width="10" stroke-miterlimit="10" width="113" height="113" /> - Clipping a group with a path: + Clipping a group with a path: diff --git a/test/helpers.js b/test/helpers.js index 0090bb25..f38c165e 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -490,7 +490,7 @@ var compareSVG = function(done, actual, expected, message, options) { function compare() { comparePixels(actual, expected, message, Base.set({ - tolerance: 1e-2, + tolerance: 1e-3, resolution: 72 }, options)); done(); diff --git a/test/tests/SvgImport.js b/test/tests/SvgImport.js index df86f021..d5626f88 100644 --- a/test/tests/SvgImport.js +++ b/test/tests/SvgImport.js @@ -157,20 +157,12 @@ function importSVG(assert, url, message, options) { if (!isNode) { // JSDom does not have SVG rendering, so we can't test there. - var svgFiles = { - 'butterfly': {}, - 'viewbox': {}, - 'clipping': {}, - 'arcs': { tolerance: 1e-3 }, - 'symbol': {}, - 'symbols': {}, - 'blendModes': {}, - 'gradients-1': {} - }; + var svgFiles = ['butterfly', 'viewbox', 'clipping', 'arcs', 'symbol', + 'symbols', 'blendModes', 'gradients-1']; // TODO: Investigate why Phantom struggles with this file: if (!isPhantom) - svgFiles['gradients-2'] = {}; - Base.each(svgFiles, function(options, name) { + svgFiles.push('gradients-2'); + svgFiles.forEach(function(name) { name += '.svg'; test('Import ' + name, function(assert) { importSVG(assert, 'assets/' + name, null, options);