protractor-beautiful-reporter
protractor-beautiful-reporter copied to clipboard
Issues after upgrading to Protractor 6.0.0
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"```
Ok that is a thing could be fixed easily...
@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 Thanks I tested it. First issue is fixed. Now only second issue remains:
@britvik Is the started value only missing for skipped/excluded tests or for all tests?
@miller45 all tests
@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...
@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.
@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.
Second issue happens for me too, it would be great if it could be fixed soon.
I think i will release a prelease version soon that you can test.
@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 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)
so it seems okay on my side.
@OldShaterhan many thanks for comparing the results...I will release the version soon
@miller45 ok, please let me know, when new version will be released officially ;)
@miller45 , when we can expect release of the new version?
@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:
@miller45 , when we can expect PBR 1.3.6?
@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?
Second one - results are broken permanently.
Same issue as above, but only in Jenkins, if i open html file from report folder everything is good.
@harmatii I need the callstack from console. Else I cannot deduce anything from the screenshot.
@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?
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