Skip to content

Commit d2db24a

Browse files
authored
Merge pull request #86 from rackerlabs/misc-test-fixes
Misc test fixes
2 parents b431843 + 555354f commit d2db24a

File tree

14 files changed

+270
-212
lines changed

14 files changed

+270
-212
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Developer Setup
44

55
0. [install yarn](https://yarnpkg.com/en/docs/install)
6+
0. [install test dependencies](https://github.com/rackerlabs/helix-ui/wiki/Testing#system-requirements)
67
0. `yarn install` to install project dependencies
78
0. `yarn start` to begin working
89

bin/start.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ browserSync.init({
4141
* synchronous build events to complete so that browserSync can finish
4242
* and reload the page (and therefore, allow selenium to connnect).
4343
*/
44-
const tests = exec('yarn run test:regression -- -u', { cwd: CONFIG.testDir });
44+
const tests = exec('yarn run test:regression -u', { cwd: CONFIG.testDir });
4545
// this *is* asynchronous, see comment above
4646
tests.stdout.pipe(process.stdout);
4747
tests.stderr.pipe(process.stderr);
@@ -52,7 +52,8 @@ browserSync.init({
5252
{
5353
match: [
5454
`${CONFIG.testDir}/**/*.ts`,
55-
`!${CONFIG.testDir}/built/**/*`
55+
`!${CONFIG.testDir}/node_modules/**`,
56+
`!${CONFIG.testDir}/built/**/*`,
5657
],
5758
fn: () => {
5859
const tsc = exec('yarn run build', { cwd: CONFIG.testDir });

test/.gitignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
.github-token
22
bin/visreg.config.ts
33
built/*
4-
!built/{functional,regression}/
5-
built/{functional,regression}/*
6-
!built/{functional,regression}/*.js.snap
7-
!built/{functional,regression}/*.js.md
8-
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
},
1818
"scripts": {
1919
"build": "tsc",
20-
"clean": "npm run clean:visreg && npm run clean:func",
21-
"clean:func": "scripts/deleteEverythingButSnapshots.sh functional",
22-
"clean:regression": "scripts/deleteEverythingButSnapshots.sh regression",
23-
"clean:visreg": "rm -rf visreg/screenshots built/visreg",
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",
2423
"lint": "tslint -c tslint.json visreg/ functional/",
2524
"pretest": "npm run build",
2625
"test": "npm run test:func && npm run test:regression && npm run test:visreg",
@@ -35,7 +34,7 @@
3534
"webdriver:update": "scripts/webdriver-update"
3635
},
3736
"ava": {
38-
"snapshotLocation": "test/snapshots",
37+
"snapshotDir": "artifacts/domSnapshots",
3938
"failWithoutAssertions": false
4039
}
4140
}

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",

0 commit comments

Comments
 (0)