Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dots from default reporter still show up #8

Closed
zemirco opened this issue May 17, 2014 · 25 comments
Closed

Dots from default reporter still show up #8

zemirco opened this issue May 17, 2014 · 25 comments

Comments

@zemirco
Copy link

zemirco commented May 17, 2014

Thanks for building the plugin!

In my tests the dots from the default reporter still show up. Take a look at them at Travis nghellostyle#L742. They break the indentation for list items.

Here is my config. Is it something on my side or is it a bug?

@bcaudan
Copy link
Owner

bcaudan commented May 17, 2014

Actually, protractor's default jasmine reporter comes with the minijasminenode library and is not easy to deactivate for now.

I proposed a PR to add a silent option a couple of weeks ago but it is not merged yet.

@zemirco
Copy link
Author

zemirco commented May 17, 2014

cool, thanks again!

@bcaudan
Copy link
Owner

bcaudan commented Jun 7, 2014

I have just published a new version (0.3.1) with a hack to be able to remove dot reporter. You can give it a try if you want.

@AppDevIL
Copy link

AppDevIL commented Jun 8, 2014

Hi,

I got new version, but dots still present.

"jasmine-reporters" : "0.4.0",
"protractor" : "0.22.0",
"jasmine-spec-reporter" : "0.3.1"

@bcaudan
Copy link
Owner

bcaudan commented Jun 8, 2014

have you added the hack to your spec files ?

@AppDevIL
Copy link

AppDevIL commented Jun 8, 2014

ok, it works. I added wrong path to hack file.
looks great without dots.
Thanks.

@bcaudan
Copy link
Owner

bcaudan commented Aug 11, 2014

You could find a dedicated section on the Readme for the different ways to remove the dots.

@bcaudan bcaudan closed this as completed Aug 11, 2014
@teneightfive
Copy link

@bcaudan Hi. When using your jasmine-spec-reporter with multiCapabilities the dots still appear as the tests are running, but then it does output the tests in the correct spec style at the end. If you run only 1 browser you get each spec style output as each test is running.

Is there a way to turn off the dots entirely, even for multi capability tests?

@bcaudan
Copy link
Owner

bcaudan commented Oct 6, 2014

I opened a dedicated issue for it (#17).

@bcherny
Copy link

bcherny commented Aug 31, 2015

@bcaudan
Copy link
Owner

bcaudan commented Sep 1, 2015

This section has been moved to configuration > protractor

@ahmed-abdulmoniem
Copy link

ahmed-abdulmoniem commented Oct 1, 2016

Still not working for me even if I applied the workaround

exports.config = {
    seleniumServerJar: 'node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar',
    specs: ['tests/e2e/*.js'],
    multiCapabilities: [{
        browserName: 'chrome'
    }],
    jasmineNodeOpts:{
        print: function () {}
    },
    onPrepare: function () {
        var SpecReporter = require('jasmine-spec-reporter');
        // add jasmine spec reporter
        jasmine.getEnv().addReporter(new SpecReporter({
            displayStacktrace: 'all',      // display stacktrace for each failed assertion, values: (all|specs|summary|none)
            displaySuccessesSummary: true, // display summary of all successes after execution
            displayFailuresSummary: true,   // display summary of all failures after execution
            displayPendingSummary: true,    // display summary of all pending specs after execution
            displaySuccessfulSpec: true,    // display each successful spec
            displayFailedSpec: true,        // display each failed spec
            displayPendingSpec: true,      // display each pending spec
            displaySpecDuration: true,     // display each spec duration
            displaySuiteNumber: true,      // display each suite number (hierarchical)
            colors: {
                success: 'green',
                failure: 'red',
                pending: 'yellow'
            },
            prefixes: {
                success: '✓ ',
                failure: '✗ ',
                pending: '* '
            },
            customProcessors: []
        }));
    }
};

And this is the output:

.
  1 Login Page
    ✓ Should have correct title (3 secs)
.    ✓ Should open the same url (2 secs)
.    ✓ Should have initially an email text box with correct placeholder (3 secs)
.    ✓ Should have initially a password text box with correct placeholder (2 secs)

@disjunction
Copy link

@ahmed-abdulmoniem if you upgrade to jasmine 2.5.2, then you can use clearReporters() instead of the ugly workaround. Here's how i fixed it in my case: disjunction/jasme@8a06ee4

@ahmed-abdulmoniem
Copy link

@disjunction It can't be set in conf file? I should call it manually?

@disjunction
Copy link

@ahmed-abdulmoniem I saw a pull request about adding it to the options, but can't find it now. Anyway as far as I can see it not in the current code.

@valterkraemer
Copy link

This worked for me:

onPrepare: function() {
  var env = jasmine.getEnv();

  env.clearReporters();

  var SpecReporter = require('jasmine-spec-reporter');

  env.addReporter(new SpecReporter({
    displayStacktrace: true
  }));
}

@ahmed-abdulmoniem
Copy link

@valterkraemer This worked for me. Thanks.

@mrowles
Copy link

mrowles commented Oct 31, 2016

env.clearReporters is not a function for me!

@bcaudan
Copy link
Owner

bcaudan commented Oct 31, 2016

You need [email protected] to use env.clearReporters

@jeremyhewett
Copy link

jeremyhewett commented Jan 18, 2017

@disjunction, env.clearReporters works well for removing the dots but it breaks the exit code of the process because it removes the Jasmine CompletionReporter which handles this. Your process will now always exit with code 0 even when some tests fail.

http://stackoverflow.com/a/40973796

@disjunction
Copy link

@jeremyhewett I've just tested, and the exit code did work for me. Tested with [email protected]

@xkamil
Copy link

xkamil commented Feb 17, 2017

Hi. There is a simple solution described on https://github.com/bcaudan/jasmine-spec-reporter/blob/master/examples/protractor/README.md

And it looks like this:
jasmineNodeOpts: { // Disable dot reporter print: function () { } },

@demisx
Copy link

demisx commented Jun 19, 2019

The @xkamil suggestion doesn't seem to work in jasmine 3.4.0. :(

@bcaudan
Copy link
Owner

bcaudan commented Jun 19, 2019

@demisx I've just tested it with the protractor example of this repository with:

and it works fine on my machine.
Can you try to run this example?
If it is still not working, please open a new issue.

@bcaudan
Copy link
Owner

bcaudan commented Jun 19, 2019

The initial issue has been resolved by the hack described in the documentation. I'm locking the conversation to avoid spam in this old issue.
Feel free to open a new issue in case of regression.

Repository owner locked as spam and limited conversation to collaborators Jun 19, 2019
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