Skip to content

Commit

Permalink
Test coreTest option
Browse files Browse the repository at this point in the history
  • Loading branch information
varya committed Feb 18, 2016
1 parent 55cedc9 commit 2506425
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gulpfile.js
Expand Up @@ -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'
},
Expand All @@ -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'
},
Expand Down
31 changes: 31 additions & 0 deletions 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);
});
};

0 comments on commit 2506425

Please sign in to comment.