forked from Automattic/wp-e2e-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
86 lines (82 loc) · 2.9 KB
/
Gruntfile.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
module.exports = function( grunt ) {
// configure tasks
grunt.initConfig( {
shell: {
runTests: {
command: function( browserSize, sauceConfig ) {
return './run.sh -R -c -f -v -l ' + sauceConfig + ' -s ' + browserSize
}
}
},
concurrent: {
all: {
tasks: [ 'run_mobile_osx-firefox', 'run_desktop_osx-firefox', 'run_tablet_osx-firefox',
'run_mobile_osx-chrome', 'run_desktop_osx-chrome', 'run_tablet_osx-chrome',
'run_mobile_osx-safari', 'run_desktop_osx-safari', 'run_tablet_osx-safari',
'run_desktop_win-ie11' ],
options: {
limit: 3,
logConcurrentOutput: true
}
},
notChrome: {
tasks: [ 'run_mobile_osx-firefox', 'run_desktop_osx-firefox', 'run_tablet_osx-firefox',
'run_mobile_osx-safari', 'run_desktop_osx-safari', 'run_tablet_osx-safari',
'run_desktop_win-ie11' ],
options: {
limit: 3,
logConcurrentOutput: true
}
},
firefox: {
tasks: [ 'run_mobile_osx-firefox', 'run_desktop_osx-firefox', 'run_tablet_osx-firefox' ],
options: {
limit: 3,
logConcurrentOutput: true
}
},
chrome: {
tasks: [ 'run_mobile_osx-chrome', 'run_desktop_osx-chrome', 'run_tablet_osx-chrome' ],
options: {
limit: 3,
logConcurrentOutput: true
}
},
safari: {
tasks: [ 'run_mobile_osx-safari', 'run_desktop_osx-safari', 'run_tablet_osx-safari' ],
options: {
limit: 3,
logConcurrentOutput: true
}
},
ie11: {
tasks: [ 'run_desktop_win-ie11' ],
options: {
limit: 3,
logConcurrentOutput: true
}
}
}
} );
// load tasks
grunt.loadNpmTasks( 'grunt-concurrent' );
grunt.loadNpmTasks( 'grunt-shell' );
// register tasks
grunt.registerTask( 'default', ['concurrent:all'] );
grunt.registerTask( 'all', ['concurrent:all'] );
grunt.registerTask( 'notChrome', ['concurrent:notChrome'] );
grunt.registerTask( 'firefox', ['concurrent:firefox'] );
grunt.registerTask( 'chrome', ['concurrent:chrome'] );
grunt.registerTask( 'safari', ['concurrent:safari'] );
grunt.registerTask( 'ie11', ['concurrent:ie11'] );
grunt.registerTask( 'run_mobile_osx-chrome', ['shell:runTests:mobile:osx-chrome'] );
grunt.registerTask( 'run_desktop_osx-chrome', ['shell:runTests:desktop:osx-chrome'] );
grunt.registerTask( 'run_tablet_osx-chrome', ['shell:runTests:tablet:osx-chrome'] );
grunt.registerTask( 'run_mobile_osx-firefox', ['shell:runTests:mobile:osx-firefox'] );
grunt.registerTask( 'run_desktop_osx-firefox', ['shell:runTests:desktop:osx-firefox'] );
grunt.registerTask( 'run_tablet_osx-firefox', ['shell:runTests:tablet:osx-firefox'] );
grunt.registerTask( 'run_mobile_osx-safari', ['shell:runTests:mobile:osx-safari'] );
grunt.registerTask( 'run_desktop_osx-safari', ['shell:runTests:desktop:osx-safari'] );
grunt.registerTask( 'run_tablet_osx-safari', ['shell:runTests:tablet:osx-safari'] );
grunt.registerTask( 'run_desktop_win-ie11', ['shell:runTests:desktop:win-ie11'] );
};