diff options
author | thuva4 <tharma.thuva@gmail.com> | 2017-12-30 09:29:03 +0530 |
---|---|---|
committer | thuva4 <tharma.thuva@gmail.com> | 2017-12-30 09:35:22 +0530 |
commit | c72bebf41dbd08facb7398fa94680d812ea38a62 (patch) | |
tree | 895711bc6168dc4d603c8a556ad4424b1e48c1f6 /testapi/opnfv_testapi/ui/Gruntfile.js | |
parent | 304b8eaad63eb7a610adb62f6c97c7a21a2b91fb (diff) |
Add the filter option in results page
apply multiple filter in results page.
Add e2e tests for results page.
Change-Id: Ia55407d921136756ab5f15507c92775f95a761dc
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
Diffstat (limited to 'testapi/opnfv_testapi/ui/Gruntfile.js')
-rw-r--r-- | testapi/opnfv_testapi/ui/Gruntfile.js | 303 |
1 files changed, 152 insertions, 151 deletions
diff --git a/testapi/opnfv_testapi/ui/Gruntfile.js b/testapi/opnfv_testapi/ui/Gruntfile.js index 56aaa6e..72a47e1 100644 --- a/testapi/opnfv_testapi/ui/Gruntfile.js +++ b/testapi/opnfv_testapi/ui/Gruntfile.js @@ -1,154 +1,155 @@ module.exports = function (grunt) { - require('load-grunt-tasks')(grunt); - require('grunt-protractor-coverage')(grunt); - grunt.loadNpmTasks('grunt-shell-spawn'); - grunt.loadNpmTasks('grunt-wait'); - grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.initConfig({ - connect: { - server: { - options: { - port: 8000, - base: './', - middleware: function(connect, options, middlewares) { - middlewares.unshift(function(req, res, next) { - if (req.method.toUpperCase() == 'POST' || req.method.toUpperCase() == "PUT" || - req.method.toUpperCase() == "DELETE") - { - req.method='GET'; - } - return next(); - }); - return middlewares; - } - } - } - }, - copy: { - assets: { - expand: true, - cwd: '../../3rd_party/static/testapi-ui/assets', - src: '**', - dest: 'testapi-ui/assets', - }, - components: { - expand: true, - cwd: 'components', - src: '**', - dest: 'testapi-ui/components', - }, - shared: { - expand: true, - cwd: 'shared', - src: '**', - dest: 'testapi-ui/shared', - }, - filesPng: { - expand: true, - src: '*.png', - dest: 'testapi-ui/', - }, - filesIco: { - expand: true, - src: '*.ico', - dest: 'testapi-ui/', - }, - filesJs: { - expand: true, - src: 'app.js', - dest: 'testapi-ui/', - }, - filesJson: { - expand: true, - src: 'config.json', - dest: 'testapi-ui/', - } - }, - wait: { - default: { - options: { - delay: 3000 - } - } - }, - shell: { - updateSelenium: { - command: 'node_modules/protractor/bin/webdriver-manager update', - options: { - async: false - } - }, - startSelenium: { - command: 'node_modules/protractor/bin/webdriver-manager start', - options: { - async: true - } - }, - deleteFiles: { - command: 'rm -r testapi-ui', - options: { - async: false - } - }, - options: { - stdout: false, - stderr: false - } - }, - instrument: { - files: ['components/**/*.js'], - options: { - lazy: false, - basePath: "./testapi-ui/" - } - }, - karma: { - unit: { - configFile: 'karma.conf.js' - } - }, - protractor_coverage: { - options: { - keepAlive: true, - noColor: false, - coverageDir: '../tests/UI/coverage', - args: { - specs: ['../tests/UI/e2e/testCasesControllerSpec.js'] - } - }, - local: { - options: { - configFile: '../tests/UI/protractor-conf.js' - } - } - }, - makeReport: { - src: '../tests/UI/coverage/*.json', - options: { - print: 'detail' - } - } - }); - grunt.registerTask('test', [ - 'karma:unit' - ]); - grunt.registerTask('e2e', [ - 'copy:assets', - 'copy:components', - 'copy:shared', - 'copy:filesPng', - 'copy:filesIco', - 'copy:filesJs', - 'copy:filesJson', - 'instrument', - 'connect', - 'shell:updateSelenium', - 'shell:startSelenium', - 'wait:default', - 'protractor_coverage', - 'makeReport', - 'shell:deleteFiles' - ]); + require('load-grunt-tasks')(grunt); + require('grunt-protractor-coverage')(grunt); + grunt.loadNpmTasks('grunt-shell-spawn'); + grunt.loadNpmTasks('grunt-wait'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.initConfig({ + connect: { + server: { + options: { + port: 8000, + base: './', + middleware: function(connect, options, middlewares) { + middlewares.unshift(function(req, res, next) { + if (req.method.toUpperCase() == 'POST' || req.method.toUpperCase() == "PUT" || + req.method.toUpperCase() == "DELETE") + { + req.method='GET'; + } + return next(); + }); + return middlewares; + } + } + } + }, + copy: { + assets: { + expand: true, + cwd: '../../3rd_party/static/testapi-ui/assets', + src: '**', + dest: 'testapi-ui/assets', + }, + components: { + expand: true, + cwd: 'components', + src: '**', + dest: 'testapi-ui/components', + }, + shared: { + expand: true, + cwd: 'shared', + src: '**', + dest: 'testapi-ui/shared', + }, + filesPng: { + expand: true, + src: '*.png', + dest: 'testapi-ui/', + }, + filesIco: { + expand: true, + src: '*.ico', + dest: 'testapi-ui/', + }, + filesJs: { + expand: true, + src: 'app.js', + dest: 'testapi-ui/', + }, + filesJson: { + expand: true, + src: 'config.json', + dest: 'testapi-ui/', + } + }, + wait: { + default: { + options: { + delay: 3000 + } + } + }, + shell: { + updateSelenium: { + command: 'node_modules/protractor/bin/webdriver-manager update', + options: { + async: false + } + }, + startSelenium: { + command: 'node_modules/protractor/bin/webdriver-manager start', + options: { + async: true + } + }, + deleteFiles: { + command: 'rm -r testapi-ui', + options: { + async: false + } + }, + options: { + stdout: false, + stderr: false + } + }, + instrument: { + files: ['components/**/*.js'], + options: { + lazy: false, + basePath: "./testapi-ui/" + } + }, + karma: { + unit: { + configFile: 'karma.conf.js' + } + }, + protractor_coverage: { + options: { + keepAlive: true, + noColor: false, + coverageDir: '../tests/UI/coverage', + args: { + specs: ['../tests/UI/e2e/testCasesControllerSpec.js', + '../tests/UI/e2e/resultsControllerSpec.js'] + } + }, + local: { + options: { + configFile: '../tests/UI/protractor-conf.js' + } + } + }, + makeReport: { + src: '../tests/UI/coverage/*.json', + options: { + print: 'detail' + } + } + }); + grunt.registerTask('test', [ + 'karma:unit' + ]); + grunt.registerTask('e2e', [ + 'copy:assets', + 'copy:components', + 'copy:shared', + 'copy:filesPng', + 'copy:filesIco', + 'copy:filesJs', + 'copy:filesJson', + 'instrument', + 'connect', + 'shell:updateSelenium', + 'shell:startSelenium', + 'wait:default', + 'protractor_coverage', + 'makeReport', + 'shell:deleteFiles' + ]); } |