Skip to content

Commit aab6aee

Browse files
tinayuangaommalerba
authored andcommitted
test(e2e): Use current directory so e2e test won't complain about directory not exists (#2693)
* Use current directory so e2e test wont complain about directory not exists * change .gitignore * Only take screenshot when run on travis * remove log
1 parent e9ec8ab commit aab6aee

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/dist
55
/tmp
66
/deploy
7+
/screenshots
78

89
# dependencies
910
/node_modules

e2e/screenshot.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as gulp from 'gulp';
33
import * as path from 'path';
44
import {browser} from 'protractor';
55

6-
const OUTPUT_DIR = '/tmp/angular-material2-build/screenshots/';
6+
const OUTPUT_DIR = './screenshots/';
77

88
let currentJasmineSpecName = '';
99

@@ -53,5 +53,7 @@ export class Screenshot {
5353
}
5454

5555
export function screenshot(id: string) {
56-
return new Screenshot(id);
56+
if (process.env['TRAVIS']) {
57+
return new Screenshot(id);
58+
}
5759
}

0 commit comments

Comments
 (0)