diff --git a/gulpfile.js b/gulpfile.js index 6d82fd9..8dffc6c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -46,6 +46,7 @@ gulp.task("test:visual:update", function() { gridScreenshotsDir: testDirPath + '/grid-screenshots', rootUrl: 'http://localhost:3000/', sections: options.section, + coreTest: '../../custom-tests/core-test.js', customTests: { '2.1': '../../custom-tests/custom-test.js' }, @@ -69,6 +70,7 @@ gulp.task("test:visual", function(done){ gridScreenshotsDir: testDirPath + '/grid-screenshots', rootUrl: 'http://localhost:3000/', sections: options.section, + coreTest: '../../custom-tests/core-test.js', customTests: { '2.1': '../../custom-tests/custom-test.js' }, diff --git a/tests/custom-tests/core-test.js b/tests/custom-tests/core-test.js new file mode 100644 index 0000000..d044e96 --- /dev/null +++ b/tests/custom-tests/core-test.js @@ -0,0 +1,31 @@ +'use strict'; + +var gemini = require('gemini'); + +module.exports = function (page) { + gemini.suite(page.name, function (suite) { + if (page.name === 'index') { + suite.skip(); + } + suite.setUrl(page.url).setCaptureElements('body').capture('plain', function (actions, find) { + + actions.waitForElementToShow('shadow-dom', 7000); + actions.wait(2000); + }); + + // Do not consider navigation arrows + // Change to arrows when this is fixed https://github.com/gemini-testing/gemini/issues/192 + + var selectors = [ + // List selectors to ignore here, like '.class' + ]; + // Insert additions + try { + var options = require('./gemini-test_' + page.name); + if (options.selectorsToIgnore) { + selectors = selectors.concat(options.selectorsToIgnore); + } + } catch (ex) {} + suite.ignoreElements.apply(gemini, selectors); + }); +};