forked from grommet/grommet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile-grommet-e2e.js
136 lines (114 loc) · 3.77 KB
/
gulpfile-grommet-e2e.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
var chug = require('gulp-chug');
var gls = require('gulp-live-server');
var runSequence = require('run-sequence');
var GrommetTestUtils = require('./src/utils/test/GrommetE2EUtils');
module.exports = function(gulp, options) {
gulp.task('dist:docs', function() {
return gulp.src('./docs/gulpfile.js', {
read: false
}).pipe(chug({
tasks: ['dist'],
args: ['--skipPreprocess']
}));
});
var server = gls('./server/server.js', {env: {SILENT_MODE: true}});
gulp.task('start:docs', ['dist:docs'], function() {
server.start();
});
gulp.task('stop:docs', function() {
server.stop();
});
var onError = function() {
server.stop();
};
/**
** Windows e2e matrix
**/
gulp.task('integration:windows:ie', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Windows 7',
browserName: 'internet explorer',
version: '11.0'
});
});
gulp.task('integration:windows:chrome', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Windows 7',
browserName: 'chrome',
version: '37.0'
});
});
gulp.task('integration:windows:firefox', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Windows 7',
browserName: 'firefox',
version: '32.0'
});
});
gulp.task('integration:windows', ['start:docs', 'selenium'], function(done) {
return runSequence('integration:windows:ie', 'integration:windows:chrome',
'integration:windows:firefox', 'integration:clean', 'stop:docs', done);
});
/**
** Linux e2e matrix
**/
gulp.task('integration:linux:firefox', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Linux',
browserName: 'firefox',
version: '32.0'
});
});
gulp.task('integration:linux:opera', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Linux',
browserName: 'opera',
version: '12.15'
});
});
gulp.task('integration:linux:chrome', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'Linux',
browserName: 'chrome',
version: '37.0'
});
});
gulp.task('integration:linux', ['start:docs', 'selenium'], function(done) {
return runSequence('integration:linux:firefox', 'integration:linux:opera',
'integration:linux:chrome', 'integration:clean', 'stop:docs', done);
});
/**
** OSX e2e matrix
**/
gulp.task('integration:osx:firefox', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'OS X 10.10',
browserName: 'firefox',
version: '32.0'
});
});
gulp.task('integration:osx:safari', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'OS X 10.10',
browserName: 'safari',
version: '8.0'
});
});
gulp.task('integration:osx:chrome', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError, {
platform: 'OS X 10.10',
browserName: 'chrome',
version: '37.0'
});
});
gulp.task('integration:osx', ['start:docs', 'selenium'], function(done) {
return runSequence('integration:osx:firefox', 'integration:osx:safari',
'integration:osx:chrome', 'integration:clean', 'stop:docs', done);
});
gulp.task('integration:phantomjs', function() {
return GrommetTestUtils.runIntegration(gulp, options.e2ePaths, onError);
});
gulp.task('integration:localhost', ['start:docs', 'selenium'], function(done) {
return runSequence('integration:phantomjs', 'integration:clean', 'stop:docs', done);
});
};