protractor-beautiful-reporter icon indicating copy to clipboard operation
protractor-beautiful-reporter copied to clipboard

Issues after upgrading to Protractor 6.0.0

Open britvik opened this issue 5 years ago • 23 comments

Test breaks if it's run with 'fit' or 'fdescribe' on this line results.failedExpectations[0].message because result status can now be 'excluded' which is not handled in the code.

This condition: results.status === 'pending' || results.status === 'disabled'' should be changed into: results.status === 'pending' || results.status === 'disabled' || results.status === 'excluded' (2 places in jasmine2MetaDataBuilder function)

There is no duration time in the report (it's NaN), because there is no 'started' property in the result (only stopped).

this is how the new results object looks like:

deprecationWarnings: []
description: "should start session for E2E test"
duration: null
failedExpectations: []
fullName: "App should start session for E2E test"
id: "spec1"
passedExpectations: []
pendingReason: ""
status: "excluded"
stopped: "2019-04-15T09:58:59.394Z"```

britvik avatar Apr 15 '19 13:04 britvik

Ok that is a thing could be fixed easily...

miller45 avatar Apr 30 '19 12:04 miller45

@britvik I pushed an updated version to the master branch. But I dont want to publish it yet...can you please test the fix by installing directly from git? Use this command then npm install https://github.com/Evilweed/protractor-beautiful-reporter.git and and tell me if the fix resolves your problem...

miller45 avatar Apr 30 '19 14:04 miller45

@miller45 Thanks I tested it. First issue is fixed. Now only second issue remains: image

britvik avatar May 02 '19 08:05 britvik

@britvik Is the started value only missing for skipped/excluded tests or for all tests?

miller45 avatar May 03 '19 10:05 miller45

@miller45 all tests

britvik avatar May 03 '19 13:05 britvik

@britvik well the result object/parameter contains no information about the start time at all. The new jasmine/protractor version doest not deliver it any more... This requires some serious rework of the code...

miller45 avatar May 05 '19 16:05 miller45

@britvik I pushed an updated version to the master branch. But I dont want to publish it yet...can you please test the fix by installing directly from git? Use this command then npm install https://github.com/Evilweed/protractor-beautiful-reporter.git and and tell me if the fix resolves your problem...

How about publishing a version with the first fix? It is more serious than the second one.

esmiralha avatar Jun 04 '19 17:06 esmiralha

@britvik I published the first fix for 1). Currently I cannot get protractor 6 to run angularjs test...I fear protractor 6 requires a complete differnent development with the reporter.

miller45 avatar Jun 05 '19 22:06 miller45

Second issue happens for me too, it would be great if it could be fixed soon.

OldShaterhan avatar Sep 20 '19 09:09 OldShaterhan

I think i will release a prelease version soon that you can test.

miller45 avatar Sep 25 '19 08:09 miller45

@britvik @OldShaterhan I published a alpha version for testing. You can install it with npm install [email protected] --save-dev. Please tell me if that works consistently (the times are not NaN now, but are they correct?). It looks good in my test examples, but have no "real life experience" with protractor 6.0.0 because we use 5.42 in our company.

miller45 avatar Sep 25 '19 14:09 miller45

@miller45 compare of results from v.5.4.2 vs. v.6.0.0 v.5.4.2 (1.3.3) ...........v.6.0.0. (1.3.6.alpha1) image image so it seems okay on my side.

OldShaterhan avatar Sep 26 '19 10:09 OldShaterhan

@OldShaterhan many thanks for comparing the results...I will release the version soon

miller45 avatar Sep 28 '19 13:09 miller45

@miller45 ok, please let me know, when new version will be released officially ;)

OldShaterhan avatar Sep 30 '19 09:09 OldShaterhan

@miller45 , when we can expect release of the new version?

OldShaterhan avatar Oct 15 '19 06:10 OldShaterhan

@miller45 I found one problem, I'm not sure if it is caused by Protractor 6.0.0, but sometimes it happens that page couldn't load and we have such error in console: angular.min.js:7 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.7.2/$injector/modulerr?p0=reportingApp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.7.2%2F%24injector%2Fnomod%3Fp0%3DreportingApp%0A%20%20%20%20at%20http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A7%3A168%0A%20%20%20%20at%20http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A26%3A453%0A%20%20%20%20at%20b%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A25%3A477)%0A%20%20%20%20at%20http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A26%3A227%0A%20%20%20%20at%20http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A42%3A460%0A%20%20%20%20at%20q%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A8%3A76)%0A%20%20%20%20at%20g%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A42%3A308)%0A%20%20%20%20at%20hb%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A46%3A401)%0A%20%20%20%20at%20c%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A22%3A57)%0A%20%20%20%20at%20Vc%20(http%3A%2F%2F<--RESULT URL-->%2Fassets%2Fangular.min.js%3A22%3A370) at angular.min.js:7 at angular.min.js:43 at q (angular.min.js:8) at g (angular.min.js:42) at hb (angular.min.js:46) at c (angular.min.js:22) at Vc (angular.min.js:22) at ye (angular.min.js:21) at angular.min.js:340 at HTMLDocument.b (angular.min.js:38)

and the page looking like that: image

OldShaterhan avatar Oct 22 '19 08:10 OldShaterhan

@miller45 , when we can expect PBR 1.3.6?

OldShaterhan avatar Nov 08 '19 13:11 OldShaterhan

@OldShaterhan Ok I just published version 1.3.6..
For that issue with angular.min.js:7 Uncaught Error: [$injector:modulerr]... When you say

but sometimes it happens that page couldn't load

does it mean the page works when you press the refresh button of the browser or is that the report from that session is broken permanently?

miller45 avatar Nov 11 '19 14:11 miller45

Second one - results are broken permanently.

OldShaterhan avatar Nov 12 '19 11:11 OldShaterhan

Same issue as above, but only in Jenkins, if i open html file from report folder everything is good. Capture

harmatii avatar Dec 03 '19 00:12 harmatii

@harmatii I need the callstack from console. Else I cannot deduce anything from the screenshot.

miller45 avatar Dec 05 '19 18:12 miller45

@OldShaterhan I have hard time to reproduce it. If look into the app.js and search for " var results". Do you see a proper array of test results?

miller45 avatar Dec 05 '19 18:12 miller45

Sorry for late response. I'm not sure if I understand it correctly, but this file is completely empty. Jasmine is in v. 3.5.0

OldShaterhan avatar Feb 26 '20 19:02 OldShaterhan