diff options
16 files changed, 95 insertions, 16 deletions
diff --git a/INFO.yaml b/INFO.yaml new file mode 100644 index 0000000..86773db --- /dev/null +++ b/INFO.yaml @@ -0,0 +1,42 @@ +--- +subproject: 'Test Results Collecting and Analyzing (TestResults)' +project_category: 'Integration & Testing' +lifecycle_state: 'Incubation' +subproject_lead: &opnfv_testresults_ptl + name: 'SerenaFeng' + email: 'feng.xiaowei@zte.com.cn' + id: 'serenafeng' + company: 'ZTE' + timezone: 'China' +primary_contact: *opnfv_testresults_ptl +issue_tracking: + type: 'jira' + url: 'https://jira.opnfv.org/projects/RELENG' + key: 'RELENG' +mailing_list: + type: 'mailman2' + url: 'opnfv-tech-discuss@lists.opnfv.org' + tag: '[testresults]' +meetings: + - type: 'appearin' + url: 'https://appear.in/serenafeng' + repeats: 'weekly' + day: 'Thursday' + time: '13:30 UTC' +committers: + - <<: *opnfv_testresults_ptl + - name: 'Fatih Degirmenci' + company: 'Ericsson' + email: 'fatih.degirmenci@ericsson.com' + id: 'fdegir' + timezone: 'Europe/Stockholm' + - name: 'Morgan Richomme' + email: 'morgan.richomme@orange.com' + company: 'Orange' + id: 'mrichomme' + timezone: 'Europe/Paris' + - name: 'Jose Lausuch' + company: 'SUSE' + email: 'jalausuch@suse.com' + id: 'jose.lausuch' + timezone: 'Europe/Madrid' diff --git a/reporting/html/colorado.html b/reporting/3rd_party/html/colorado.html index 7a7326e..7a7326e 100644 --- a/reporting/html/colorado.html +++ b/reporting/3rd_party/html/colorado.html diff --git a/reporting/html/danube.html b/reporting/3rd_party/html/danube.html index ae8a3ac..ae8a3ac 100644 --- a/reporting/html/danube.html +++ b/reporting/3rd_party/html/danube.html diff --git a/reporting/html/elements.html b/reporting/3rd_party/html/elements.html index 7b9bb4d..7b9bb4d 100644 --- a/reporting/html/elements.html +++ b/reporting/3rd_party/html/elements.html diff --git a/reporting/html/euphrates.html b/reporting/3rd_party/html/euphrates.html index e357edc..e357edc 100644 --- a/reporting/html/euphrates.html +++ b/reporting/3rd_party/html/euphrates.html diff --git a/reporting/html/fraser.html b/reporting/3rd_party/html/fraser.html index 65b996c..65b996c 100644 --- a/reporting/html/fraser.html +++ b/reporting/3rd_party/html/fraser.html diff --git a/reporting/html/functest.html b/reporting/3rd_party/html/functest.html index d5f78c5..d5f78c5 100644 --- a/reporting/html/functest.html +++ b/reporting/3rd_party/html/functest.html diff --git a/reporting/html/generic.html b/reporting/3rd_party/html/generic.html index 39273da..39273da 100644 --- a/reporting/html/generic.html +++ b/reporting/3rd_party/html/generic.html diff --git a/reporting/html/index.html b/reporting/3rd_party/html/index.html index 858ac47..858ac47 100644 --- a/reporting/html/index.html +++ b/reporting/3rd_party/html/index.html diff --git a/reporting/html/master.html b/reporting/3rd_party/html/master.html index 5d4f916..5d4f916 100644 --- a/reporting/html/master.html +++ b/reporting/3rd_party/html/master.html diff --git a/reporting/docker/reporting.sh b/reporting/docker/reporting.sh index ee9dccf..8ca7eac 100755 --- a/reporting/docker/reporting.sh +++ b/reporting/docker/reporting.sh @@ -21,7 +21,7 @@ done # copy images, js, css, 3rd_party cp -Rf 3rd_party display cp -Rf css display -cp -Rf html/* display +cp -Rf 3rd_party/html/* display cp -Rf img display cp -Rf js display diff --git a/reporting/reporting/functest/reporting-status.py b/reporting/reporting/functest/reporting-status.py index 592f929..552080d 100755 --- a/reporting/reporting/functest/reporting-status.py +++ b/reporting/reporting/functest/reporting-status.py @@ -230,7 +230,7 @@ for version in versions: else: LOGGER.debug("No results found") - items[s] = testCases2BeDisplayed + items[s] = testCases2BeDisplayed except Exception: # pylint: disable=broad-except LOGGER.error("Error installer %s, version %s, scenario %s", installer, version, s) diff --git a/testapi/opnfv_testapi/tests/UI/e2e/podsControllerSpec.js b/testapi/opnfv_testapi/tests/UI/e2e/podsControllerSpec.js index 16b219d..ac1f954 100644 --- a/testapi/opnfv_testapi/tests/UI/e2e/podsControllerSpec.js +++ b/testapi/opnfv_testapi/tests/UI/e2e/podsControllerSpec.js @@ -78,7 +78,7 @@ describe('testing the Pods page for anonymous user', function () { it('Sort the results by mode', function () { browser.get(baseURL+'#/pods'); - var sortMode = element(by.xpath('//*[@id="ng-app"]/body/div/div[6]/div/table/thead/tr/th[4]/a[2]/span')) + var sortMode = element(by.xpath('//*[@id="ng-app"]/body/div/div[5]/div/table/thead/tr/th[4]/a[2]/span')) sortMode.click(); var row = element.all(by.repeater('(index, pod) in ctrl.data.pods')).first(); var cells = row.all(by.tagName('td')); @@ -87,7 +87,7 @@ describe('testing the Pods page for anonymous user', function () { it('Sort the results by role', function () { browser.get(baseURL+'#/pods'); - var sortRole = element(by.xpath('//*[@id="ng-app"]/body/div/div[6]/div/table/thead/tr/th[3]/a[2]/span')) + var sortRole = element(by.xpath('//*[@id="ng-app"]/body/div/div[5]/div/table/thead/tr/th[3]/a[2]/span')) sortRole.click(); var row = element.all(by.repeater('(index, pod) in ctrl.data.pods')).first(); var cells = row.all(by.tagName('td')); @@ -262,8 +262,11 @@ describe('testing the Pods page for authorized user', function () { .isDisplayed()).toBe(true); var buttonOK = element(by.buttonText('Ok')); buttonOK.click(); - expect(element(by.cssContainingText(".alert","Delete Success")) + browser.ignoreSynchronization = true; + expect(element(by.cssContainingText(".success.show","Delete Success")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); it('Delete the pods ', function () { @@ -272,8 +275,11 @@ describe('testing the Pods page for authorized user', function () { deleteOperation.click(); var buttonOK = element(by.buttonText('Ok')); buttonOK.click(); - expect(element(by.cssContainingText(".alert","Delete Success")) + browser.ignoreSynchronization = true; + expect(element(by.cssContainingText(".success.show","Delete Success")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); it('Create the pod', function () { @@ -286,8 +292,11 @@ describe('testing the Pods page for authorized user', function () { name.sendKeys('test1'); var buttonOK = element(by.buttonText('Ok')); buttonOK.click(); - expect(element(by.cssContainingText(".alert","Create Success")) + browser.ignoreSynchronization = true; + expect(element(by.cssContainingText(".success.show","Create Success")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); it('Showing error when creating with a empty name ', function () { @@ -299,8 +308,11 @@ describe('testing the Pods page for authorized user', function () { browser.wait(EC.visibilityOf(name), 5000); var buttonOK = element(by.buttonText('Ok')); buttonOK.click() - expect(element(by.cssContainingText(".alert","Name is missing.")) + browser.ignoreSynchronization = true; + expect(element(by.cssContainingText(".error.show","Name is missing.")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); it('cancel the delete confimation modal of the pod ', function () { @@ -356,8 +368,11 @@ describe('testing the Pods page for authorized user', function () { deleteOperation.click(); var buttonOK = element(by.buttonText('Ok')); buttonOK.click(); - expect(element(by.css(".alert.alert-danger")) + browser.ignoreSynchronization = true; + expect(element(by.css(".error.show")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); it('view the test case ', function () { @@ -394,8 +409,13 @@ describe('testing the Pods page for authorized user', function () { }, ]); browser.get(baseURL+"#/pods"); - expect(element(by.css(".alert.alert-danger")) + var EC = browser.ExpectedConditions; + browser.wait(EC.urlContains(baseURL+ '/#/pods'), 5000); + browser.ignoreSynchronization = true; + expect(element(by.css(".error.show")) .isDisplayed()).toBe(true); + browser.sleep(500); + browser.ignoreSynchronization = false; }); });
\ No newline at end of file diff --git a/testapi/opnfv_testapi/ui/Gruntfile.js b/testapi/opnfv_testapi/ui/Gruntfile.js index 805ad9f..ab59475 100644 --- a/testapi/opnfv_testapi/ui/Gruntfile.js +++ b/testapi/opnfv_testapi/ui/Gruntfile.js @@ -6,7 +6,22 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-wait'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-convert'); grunt.initConfig({ + convert: { + options: { + explicitArray: false, + }, + json2xml: { + options: { + xml: { + header: true + } + }, + src: ['../tests/UI/coverage/coverage.json'], + dest: '../tests/UI/coverage/coverage.xml' + } + }, connect: { server: { options: { @@ -159,6 +174,7 @@ module.exports = function (grunt) { 'wait:default', 'protractor_coverage', 'makeReport', + 'convert', 'shell:deleteFiles' ]); } diff --git a/testapi/opnfv_testapi/ui/components/pods/podsController.js b/testapi/opnfv_testapi/ui/components/pods/podsController.js index 3a94338..3b6ab97 100644 --- a/testapi/opnfv_testapi/ui/components/pods/podsController.js +++ b/testapi/opnfv_testapi/ui/components/pods/podsController.js @@ -94,17 +94,17 @@ role: pod.role, details: pod.details }; - ctrl.podsRequest = - $http.post(pods_url, body).success(function (data) { + ctrl.podsRequest = $http.post(pods_url, body) + + ctrl.podsRequest.success(function (data) { ctrl.success = "Create Success" ctrl.toastSuccess() ctrl.listPods(); - return true; }).catch(function (data) { ctrl.error = data.statusText; ctrl.toastError() - return false; }); + return ctrl.podsRequest } else{ ctrl.error = 'Name is missing.' @@ -262,9 +262,9 @@ */ function confirm() { if (angular.isDefined(ctrl.data.successHandler)) { - if(ctrl.data.successHandler(ctrl.pod)){ + ctrl.data.successHandler(ctrl.pod).success( function(data){ $uibModalInstance.close(); - } + }) } } diff --git a/testapi/opnfv_testapi/ui/package.json b/testapi/opnfv_testapi/ui/package.json index dc99239..2d4eb6e 100644 --- a/testapi/opnfv_testapi/ui/package.json +++ b/testapi/opnfv_testapi/ui/package.json @@ -3,6 +3,7 @@ "grunt": "~1.0.1", "grunt-contrib-connect": "^1.0.2", "grunt-contrib-copy": "^1.0.0", + "grunt-convert": "^0.1.12", "grunt-karma": "~2.0.0", "grunt-protractor-coverage": "^0.2.18", "grunt-protractor-runner": "~5.0.0", |