diff --git a/.travis.yml b/.travis.yml index f9d0394..72c8dc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,4 @@ sudo: false language: node_js -node_js: - - 6 -before_install: - - node --version - - npm --version +node_js: 6 +scripts: npm test diff --git a/test/visual/backstop.config.js b/backstop.conf.js similarity index 88% rename from test/visual/backstop.config.js rename to backstop.conf.js index 692b2ad..1852361 100644 --- a/test/visual/backstop.config.js +++ b/backstop.conf.js @@ -104,13 +104,14 @@ module.exports = { onBeforeScript: null }], paths: { - bitmaps_reference: '../../test/visual/reference', - bitmaps_test: '.tmp', - casper_scripts: null, - compare_data: '.tmp/compare.json' + bitmaps_reference: 'test/reference', + bitmaps_test: 'node_modules/backstopjs/.tmp/bitmaps_test', + casper_scripts: 'node_modules/backstopjs/.tmp/casper_scripts', + html_report: 'node_modules/backstopjs/.tmp/html_report', + ci_report: 'node_modules/backstopjs/.tmp/ci_report' }, engine: 'phantomjs', - report: ['browser', 'CLI'], + report: ['browser', 'CLI', 'CI'], casperFlags: [], debug: false, port: 3002 diff --git a/package.json b/package.json index a047129..d2af060 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "autoprefixer": "^6.3.6", - "backstopjs": "^1.3.5", + "backstopjs": "^2.0.6", "browser-sync": "^2.13.0", "node-sass": "^3.7.0", "npm-run-all": "^2.1.1", @@ -69,10 +69,10 @@ "lint": "sass-lint -c .sasslintrc 'src/*.sass' --verbose --no-exit", "build": "run-s lint sass autoprefixer banner", "watch": "onchange src -- npm run build", - "serve": "browser-sync start -s test --ss dist -f dist", + "serve": "browser-sync start --no-notify -s test --ss dist -f dist", "start": "run-p watch serve", - "reference": "cd node_modules/backstopjs && npm run reference -- --configPath=../../test/visual/backstop.config.js && cd ../../", - "compare": "cd node_modules/backstopjs && npm run test -- --configPath=../../test/visual/backstop.config.js && cd ../../", - "test": "run-s build" + "reference": "backstop reference --configPath=backstop.conf.js", + "compare": "backstop test --configPath=backstop.conf.js", + "test": "run-s build && run-p serve compare" } } diff --git a/test/index.html b/test/index.html index 6ce6561..4bc208f 100644 --- a/test/index.html +++ b/test/index.html @@ -6,18 +6,18 @@ Milligram | A minimalist CSS framework. - + - +
- Image + Image
diff --git a/test/visual/reference/1_0_blockquotes_0_phone.png b/test/reference/486021560_Blockquotes_0_blockquotes_0_phone.png similarity index 100% rename from test/visual/reference/1_0_blockquotes_0_phone.png rename to test/reference/486021560_Blockquotes_0_blockquotes_0_phone.png diff --git a/test/visual/reference/1_0_blockquotes_1_laptop.png b/test/reference/486021560_Blockquotes_0_blockquotes_1_laptop.png similarity index 100% rename from test/visual/reference/1_0_blockquotes_1_laptop.png rename to test/reference/486021560_Blockquotes_0_blockquotes_1_laptop.png diff --git a/test/visual/reference/2_0_buttons_0_phone.png b/test/reference/486021560_Buttons_0_buttons_0_phone.png similarity index 100% rename from test/visual/reference/2_0_buttons_0_phone.png rename to test/reference/486021560_Buttons_0_buttons_0_phone.png diff --git a/test/visual/reference/2_0_buttons_1_laptop.png b/test/reference/486021560_Buttons_0_buttons_1_laptop.png similarity index 100% rename from test/visual/reference/2_0_buttons_1_laptop.png rename to test/reference/486021560_Buttons_0_buttons_1_laptop.png diff --git a/test/visual/reference/7_0_codes_0_phone.png b/test/reference/486021560_Codes_0_codes_0_phone.png similarity index 100% rename from test/visual/reference/7_0_codes_0_phone.png rename to test/reference/486021560_Codes_0_codes_0_phone.png diff --git a/test/visual/reference/7_0_codes_1_laptop.png b/test/reference/486021560_Codes_0_codes_1_laptop.png similarity index 100% rename from test/visual/reference/7_0_codes_1_laptop.png rename to test/reference/486021560_Codes_0_codes_1_laptop.png diff --git a/test/visual/reference/4_0_forms_0_phone.png b/test/reference/486021560_Forms_0_forms_0_phone.png similarity index 100% rename from test/visual/reference/4_0_forms_0_phone.png rename to test/reference/486021560_Forms_0_forms_0_phone.png diff --git a/test/visual/reference/4_0_forms_1_laptop.png b/test/reference/486021560_Forms_0_forms_1_laptop.png similarity index 100% rename from test/visual/reference/4_0_forms_1_laptop.png rename to test/reference/486021560_Forms_0_forms_1_laptop.png diff --git a/test/visual/reference/6_0_grids_0_phone.png b/test/reference/486021560_Grids_0_grids_0_phone.png similarity index 100% rename from test/visual/reference/6_0_grids_0_phone.png rename to test/reference/486021560_Grids_0_grids_0_phone.png diff --git a/test/visual/reference/6_0_grids_1_laptop.png b/test/reference/486021560_Grids_0_grids_1_laptop.png similarity index 100% rename from test/visual/reference/6_0_grids_1_laptop.png rename to test/reference/486021560_Grids_0_grids_1_laptop.png diff --git a/test/visual/reference/3_0_lists_0_phone.png b/test/reference/486021560_Lists_0_lists_0_phone.png similarity index 100% rename from test/visual/reference/3_0_lists_0_phone.png rename to test/reference/486021560_Lists_0_lists_0_phone.png diff --git a/test/visual/reference/3_0_lists_1_laptop.png b/test/reference/486021560_Lists_0_lists_1_laptop.png similarity index 100% rename from test/visual/reference/3_0_lists_1_laptop.png rename to test/reference/486021560_Lists_0_lists_1_laptop.png diff --git a/test/visual/reference/5_0_tables_0_phone.png b/test/reference/486021560_Tables_0_tables_0_phone.png similarity index 100% rename from test/visual/reference/5_0_tables_0_phone.png rename to test/reference/486021560_Tables_0_tables_0_phone.png diff --git a/test/visual/reference/5_0_tables_1_laptop.png b/test/reference/486021560_Tables_0_tables_1_laptop.png similarity index 100% rename from test/visual/reference/5_0_tables_1_laptop.png rename to test/reference/486021560_Tables_0_tables_1_laptop.png diff --git a/test/visual/reference/0_0_typography_0_phone.png b/test/reference/486021560_Typography_0_typography_0_phone.png similarity index 100% rename from test/visual/reference/0_0_typography_0_phone.png rename to test/reference/486021560_Typography_0_typography_0_phone.png diff --git a/test/visual/reference/0_0_typography_1_laptop.png b/test/reference/486021560_Typography_0_typography_1_laptop.png similarity index 100% rename from test/visual/reference/0_0_typography_1_laptop.png rename to test/reference/486021560_Typography_0_typography_1_laptop.png diff --git a/test/visual/reference/8_0_utilities_0_phone.png b/test/reference/486021560_Utilities_0_utilities_0_phone.png similarity index 100% rename from test/visual/reference/8_0_utilities_0_phone.png rename to test/reference/486021560_Utilities_0_utilities_0_phone.png diff --git a/test/visual/reference/8_0_utilities_1_laptop.png b/test/reference/486021560_Utilities_0_utilities_1_laptop.png similarity index 100% rename from test/visual/reference/8_0_utilities_1_laptop.png rename to test/reference/486021560_Utilities_0_utilities_1_laptop.png