2 module.exports = function (grunt) {
3 require('load-grunt-tasks')(grunt);
4 require('grunt-protractor-coverage')(grunt);
5 grunt.loadNpmTasks('grunt-shell-spawn');
6 grunt.loadNpmTasks('grunt-wait');
7 grunt.loadNpmTasks('grunt-contrib-copy');
8 grunt.loadNpmTasks('grunt-contrib-connect');
15 middleware: function(connect, options, middlewares) {
16 middlewares.unshift(function(req, res, next) {
17 if (req.method.toUpperCase() == 'POST') req.method='GET';
30 dest: 'testapi-ui/assets',
36 dest: 'testapi-ui/components',
42 dest: 'testapi-ui/shared',
74 command: 'node_modules/protractor/bin/webdriver-manager update',
80 command: 'node_modules/protractor/bin/webdriver-manager start',
91 files: ['components/**/*.js'],
94 basePath: "./testapi-ui/"
99 configFile: '../../../opnfv_testapi/tests/UI/karma.conf.js'
102 protractor_coverage: {
106 coverageDir: '../../../opnfv_testapi/tests/UI/coverage',
108 specs: ['../../../opnfv_testapi/tests/UI/e2e/podsControllerSpec.js']
113 configFile: '../../../opnfv_testapi/tests/UI/protractor-conf.js'
118 src: '../../../opnfv_testapi/tests/UI/coverage/*.json',
127 specs: ['../../../opnfv_testapi/tests/UI/e2e/podsControllerSpec.js']
129 configFile: '../../../opnfv_testapi/tests/UI/protractor-conf.js',
135 grunt.registerTask('test', [
138 grunt.registerTask('e2e', [
148 'shell:updateSelenium',
149 'shell:startSelenium',
151 'protractor_coverage',