-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add visual tests and first baseline screenshots
- Loading branch information
Showing
8 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
rootUrl: ***REMOVED*** | ||
gridUrl: 'overidden by test script to point towards dockerized browser' | ||
screenshotsDir: './visual-tests/baseline-screenshots' | ||
browsers: | ||
firefox-small: | ||
windowSize: 479x10000 | ||
desiredCapabilities: | ||
browserName: firefox | ||
firefox-medium: | ||
windowSize: 767x10000 | ||
desiredCapabilities: | ||
browserName: firefox | ||
firefox-large: | ||
windowSize: 1023x10000 | ||
desiredCapabilities: | ||
browserName: firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
source node_modules/ffe-visual-tests-support/run_gemini_command.lib | ||
|
||
rm -rf gemini-report/ | ||
|
||
run_gemini_command test --reporter html --reporter flat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
npm install | ||
npm run examples | ||
|
||
source node_modules/ffe-visual-tests-support/run_gemini_command.lib | ||
|
||
run_gemini_command update |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var fs = require('fs'); | ||
|
||
|
||
|
||
var HTML_PATTERN = /\.html$/ | ||
|
||
fs.readdirSync('./examples') | ||
.filter(function(f) { return f.match(HTML_PATTERN) }) | ||
.forEach(function(f) { | ||
gemini.suite(f.replace(HTML_PATTERN, ""), function(suite) { | ||
suite.setUrl('/' + f) | ||
.setCaptureElements('body') | ||
.before(function(actions, find) { | ||
actions.executeJS(function(window) { | ||
Array.prototype.forEach.call(document.querySelectorAll(".ffe-loading-spinner, .ffe-action-button__label-spinner, .ffe-primary-button__label-spinner, .ffe-secondary-button__label-spinner"), function(el) { | ||
// Removes spinning/animation elements that impair test stability | ||
el && el.parentNode.removeChild(el); | ||
}); | ||
}) | ||
.wait(500); // for checkbox animations to reach steady state | ||
|
||
}) | ||
.capture('plain'); | ||
}) | ||
}); | ||
|