can't run #1

Open
mvolkmann opened this Issue Oct 3, 2013 · 5 comments

Comments

Projects
None yet
5 participants
@mvolkmann

Here is my Gruntfile.js:

module.exports = function (grunt) {
  grunt.initConfig({
    protractor: {
      options: {
        configFile: 'protractor.conf.js'
      },
      all: {
      }
    }
  });
  grunt.loadNpmTasks('grunt-protractor-runner');
};

When I run "grunt protractor", I get this output and nothing else:

Running "protractor:all" (protractor) task

I tried adding a console.log call inside the task definition and that is not output.

@teerapap

This comment has been minimized.

Show comment
Hide comment
@teerapap

teerapap Oct 7, 2013

Owner

Please tell me your node, Gruntjs and protractor version. Which OS did you run on?

Owner

teerapap commented Oct 7, 2013

Please tell me your node, Gruntjs and protractor version. Which OS did you run on?

@pcorey

This comment has been minimized.

Show comment
Hide comment
@pcorey

pcorey Feb 22, 2014

Hi,

I was having this issue too.

% grunt --version
grunt-cli v0.1.13
grunt v0.4.2
% protractor --version
Version 0.19.0

I'm running Linux Mint.

Running "grunt protractor" would give me a "Done, without errors." message without actually running protractor.

"grunt protractor --verbose" gave interesting results:

...
...
+ protractor
Loading "Gruntfile.js" tasks...OK
>> No tasks were registered or unregistered.
...
...

It looks like the protractor task isn't being registered? In protractor_runner.js I switch the register signature from registerMultiTask to registerTask and dropped the special configFile block (configFile is pulled in by this.options()).

This fixed the problem for me.

Running "grunt protractor" ran protractor correctly with my specified config file.

I'm not sure if switching from a multi-task to a plain registerTask is the way to go, so I'm not submitting a pull request.

pcorey commented Feb 22, 2014

Hi,

I was having this issue too.

% grunt --version
grunt-cli v0.1.13
grunt v0.4.2
% protractor --version
Version 0.19.0

I'm running Linux Mint.

Running "grunt protractor" would give me a "Done, without errors." message without actually running protractor.

"grunt protractor --verbose" gave interesting results:

...
...
+ protractor
Loading "Gruntfile.js" tasks...OK
>> No tasks were registered or unregistered.
...
...

It looks like the protractor task isn't being registered? In protractor_runner.js I switch the register signature from registerMultiTask to registerTask and dropped the special configFile block (configFile is pulled in by this.options()).

This fixed the problem for me.

Running "grunt protractor" ran protractor correctly with my specified config file.

I'm not sure if switching from a multi-task to a plain registerTask is the way to go, so I'm not submitting a pull request.

@slucero

This comment has been minimized.

Show comment
Hide comment
@slucero

slucero Feb 24, 2014

I ran into this same issue and @pcorey's solution above got it up and running for me.

I'm not sure if switching from a multi-task to a plain registerTask is the way to go, so I'm not submitting a pull request.

I'm in the same boat on this, however, so I'd be interested to see a preferred resolution or alternative in place.

slucero commented Feb 24, 2014

I ran into this same issue and @pcorey's solution above got it up and running for me.

I'm not sure if switching from a multi-task to a plain registerTask is the way to go, so I'm not submitting a pull request.

I'm in the same boat on this, however, so I'd be interested to see a preferred resolution or alternative in place.

julrich added a commit to ruhmesmeile/grunt-protractor-runner that referenced this issue Feb 27, 2014

fix problem with non-running proctrator
Failed without an error before. These changes fix it, taken from:
teerapap#1

Awaiting response from the developer, and / or a proper fix.
@paulbakker

This comment has been minimized.

Show comment
Hide comment
@paulbakker

paulbakker Mar 3, 2014

Having the same issue. The fix by @julrich seems to fix the problem.

Having the same issue. The fix by @julrich seems to fix the problem.

@teerapap

This comment has been minimized.

Show comment
Hide comment
@teerapap

teerapap Mar 3, 2014

Owner

@pcorey Thanks! I cannot reproduce this issue so I cannot debug it. I think I have to keep registering the task with registerMultiTask because someone may be using the task with multi configuration. However, thank you very much for this clue.

and the block below is for backward compatibility with my mistake in the early version.

if (!grunt.util._.isUndefined(this.data.configFile)) {
   opts.configFile = this.data.configFile;
}
Owner

teerapap commented Mar 3, 2014

@pcorey Thanks! I cannot reproduce this issue so I cannot debug it. I think I have to keep registering the task with registerMultiTask because someone may be using the task with multi configuration. However, thank you very much for this clue.

and the block below is for backward compatibility with my mistake in the early version.

if (!grunt.util._.isUndefined(this.data.configFile)) {
   opts.configFile = this.data.configFile;
}

aruka-pragmatists added a commit to aruka-pragmatists/grunt-protractor-runner that referenced this issue Oct 15, 2014

Switched from registerMultiTask to registerTask and removed undefined…
… data.configFile reference from tasks/protractor_runner.js to fix a problem with the protractor task not being registered correctly with Grunt, see issue teerapap#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment