mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Visual diff tests seed-stabilized by default (#12965)
* Seed-stabilization by default * Hide right-column of topology viz route * Remove seedless run from thee test:* suite * Related evals paths render too late * Vis:Hidden another topo viz unstable item
This commit is contained in:
@@ -2,6 +2,11 @@ version: 1
|
||||
snapshot:
|
||||
# Hide high-variability data from Percy snapshots; helps make sure that randomized data doesn't cause a visual diff.
|
||||
percy-css: |
|
||||
table td {
|
||||
.topo-viz {
|
||||
display: none;
|
||||
}
|
||||
.related-evaluations path,
|
||||
.related-evaluations circle
|
||||
.dashboard-metric {
|
||||
visibility: hidden;
|
||||
}
|
||||
@@ -6,6 +6,12 @@ if (process.env.USE_MIRAGE) {
|
||||
USE_MIRAGE = process.env.USE_MIRAGE == 'true';
|
||||
}
|
||||
|
||||
let USE_PERCY = true;
|
||||
|
||||
if (process.env.USE_PERCY) {
|
||||
USE_PERCY = process.env.USE_PERCY == 'true';
|
||||
}
|
||||
|
||||
module.exports = function (environment) {
|
||||
let ENV = {
|
||||
modulePrefix: 'nomad-ui',
|
||||
@@ -31,6 +37,10 @@ module.exports = function (environment) {
|
||||
mirageWithRegions: true,
|
||||
showStorybookLink: process.env.STORYBOOK_LINK === 'true',
|
||||
},
|
||||
|
||||
percy: {
|
||||
enabled: USE_PERCY,
|
||||
},
|
||||
};
|
||||
|
||||
if (environment === 'development') {
|
||||
|
||||
@@ -3,7 +3,11 @@ import config from 'nomad-ui/config/environment';
|
||||
|
||||
const searchIncludesSeed = window.location.search.includes('faker-seed');
|
||||
|
||||
if (config.environment !== 'test' || searchIncludesSeed) {
|
||||
if (
|
||||
config.environment !== 'test' ||
|
||||
config.percy.enabled ||
|
||||
searchIncludesSeed
|
||||
) {
|
||||
if (searchIncludesSeed) {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const seed = parseInt(params.get('faker-seed'));
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"test": "npm-run-all lint test:*",
|
||||
"test:ember": "percy exec -- ember test",
|
||||
"local:qunitdom": "ember test --server --query=dockcontainer",
|
||||
"local:exam": "ember exam --server --load-balance --parallel=4"
|
||||
"local:exam": "ember exam --server --load-balance --parallel=4",
|
||||
"seedless-test": "USE_PERCY=false ember test"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
Reference in New Issue
Block a user