Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Console logs are not working correctly #3609

Closed
shanep2300 opened this issue Sep 29, 2016 · 7 comments
Closed

Console logs are not working correctly #3609

shanep2300 opened this issue Sep 29, 2016 · 7 comments

Comments

@shanep2300
Copy link

shanep2300 commented Sep 29, 2016

Hello,

  • Node Version: 6.2.1
  • Protractor Version: 4.0.9

I have these blocks set up in my config file:

jasmineNodeOpts: {    
    showColors: true, // If true, print colors to the terminal.      
    print: function() {} // Remove protractor dot reporter.
},

onPrepare: function() {
    var SpecReporter = require('jasmine-spec-reporter');
       jasmine.getEnv().addReporter(new SpecReporter({
       displayStacktrace: 'none',
       displayFailuresSummary: false
    }));
}

This was working on 3.2.2 before I updated to 4.0.9. I'm using jasmine-spec-reporter and both jsp and protractor's console logs are showing. I've tried the different NodeOpts to remove the failure summary and the dot reporter is showing next to the jsp steps. It seems to be ignoring the config.

See attachment for what the console log now looks like.

Regards,
Shane

ss_000043

@cnishina cnishina self-assigned this Sep 30, 2016
@cnishina
Copy link
Member

This has something to do when we migrated to the new logger. My initial guess would be to to remove all the logs by setting the static value of the Logger class:

var Logger = require('protractor/built/logger').Logger;
var WriteTo = require('protractor/built/logger').WriteTo;

Logger.writeTo = WriteTo.NONE;

@shanep2300
Copy link
Author

For some reason I didn't receive an email or notification when you replied... sorry for the long delay in response. Also, added the JSP block to the OP, as I previously forgot to show that.

I added what you mentioned and now I didn't get any report but the dot report.
image

This might also be a JSP issue and not necessarily Protractor. Should I transfer the issue JSP?

@cnishina
Copy link
Member

Investigating this in more detail: it appears that we introduced Jasmine 2.5.2 in September. The version upgrade caused the issue. The versions that have been affected by this include Protractor 4.0.9 and 4.0.10.

@cnishina
Copy link
Member

The commit that broke this feature is: jasmine/jasmine-npm@5989948

There is an issue already open for this: jasmine/jasmine-npm#95

Plan to put a PR to fix this.

@cnishina
Copy link
Member

Pull request jasmine/jasmine-npm#98

@heathkit
Copy link
Contributor

heathkit commented Nov 9, 2016

This should be fixed in 4.0.11 - we're downgrading the version of Jasmine we use until they fix the problem on their end.

@cnishina
Copy link
Member

cnishina commented Dec 5, 2016

Closed with jasmine/jasmine-npm#98

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants