Skip to content

Commit 555354f

Browse files
committed
refact(tests): Place artifacts in a dedicated place
1 parent acd8128 commit 555354f

File tree

9 files changed

+16
-6
lines changed

9 files changed

+16
-6
lines changed

test/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.github-token
22
bin/visreg.config.ts
33
built/*
4-
screenshots
4+
artifacts/visregScreenshots
5+
artifacts/regressionScreenshots

test/artifacts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Test Artificats
2+
3+
This is where helix-ui's test suites generate two types of output:
4+
5+
0. [DOM Snapshots](https://github.com/rackerlabs/helix-ui/wiki/Testing#dom-snapshots).
6+
0. [Visual regression screenshot catalogs](https://github.com/rackerlabs/helix-ui/wiki/Testing#introduction).
7+
8+
For more information about these types of artifacts, and how they're used, follow the links above.
File renamed without changes.
File renamed without changes.

test/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
},
1818
"scripts": {
1919
"build": "tsc",
20-
"clean": "npm run clean:visreg && rm -rf built",
21-
"clean:visreg": "rm -rf visreg/screenshots",
20+
"clean": "npm run clean:visreg && npm run clean:regression && rm -rf built",
21+
"clean:visreg": "rm -rf artifacts/visregScreenshots",
22+
"clean:regression": "rm -rf artifacts/regressionScreenshots",
2223
"lint": "tslint -c tslint.json visreg/ functional/",
2324
"pretest": "npm run build",
2425
"test": "npm run test:func && npm run test:regression && npm run test:visreg",
@@ -33,7 +34,7 @@
3334
"webdriver:update": "scripts/webdriver-update"
3435
},
3536
"ava": {
36-
"snapshotDir": "snapshots",
37+
"snapshotDir": "artifacts/domSnapshots",
3738
"failWithoutAssertions": false
3839
}
3940
}

test/regression/generateRegressionTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ while (matched = componentExtractor.exec(taggedForRegression)) {
2323
test.before(async () => {
2424
const config: IConfig = {
2525
browser: "firefox",
26-
screenshotsDir: "regression/screenshots",
26+
screenshotsDir: "artifacts/regressionScreenshots",
2727
logException: [
2828
"MISMATCH",
2929
"NO_BASELINE",

test/visreg/visreg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function suite(browserName: string) {
1111
test.before(async () => {
1212
const config: IConfig = {
1313
browser: browserName,
14-
screenshotsDir: "visreg/screenshots",
14+
screenshotsDir: "artifacts/visregScreenshots",
1515
logException: [
1616
"MISMATCH",
1717
"NO_BASELINE",

0 commit comments

Comments
 (0)