1

I'm trying to run a very basic Cucumber/CodeceptJs feature file but am getting this Error running Scenario please specify package correctly: "../null" file not found message and not sure what to do as very new to this tool. If I can have any help to know what I'm missing please.

basic.feature

Feature: Business rules
 In order to achieve my goals
 As a persona
 I want to be able to interact with a system

Scenario: do something
  Given I have a defined step

steps.js

const { I } = inject();

Given('I have a defined step', () => {
    I.amOnPage('/my-page/ui');
});

enter image description here

enter image description here

enter image description here

Thank you very much.

Francislainy Campos
  • 3,462
  • 4
  • 33
  • 81
  • I just have the same problem and it's strange because the version '7.0.0-rc.0' is displayed, indicating the lib is found. Maybe the version is too new. – Slim Oct 09 '20 at 13:59
  • I confirm, when using cucumber 5.1.0, it's ok – Slim Oct 09 '20 at 14:09
  • Thanks. Just tried that now but it didn't work unfortunately. ```{ "name": "codeceptjs_webdriver", "version": "1.0.0", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "codeceptjs": "^3.0.0", "cucumber": "^6.0.5" }, "dependencies": { "@codeceptjs/configure": "^0.6.0" }, "description": "" } ``` – Francislainy Campos Oct 09 '20 at 14:15
  • I must add, I use ultimate 2019.2. But the update process to the last intellij version indicates the cucumber.js plugin is incompatible with this last version :( – Slim Oct 09 '20 at 14:17
  • TypeError: formatter.eventDataCollector.getTestCaseData is not a function at logTestCaseStarted (/Users/camposf/Library/Application Support/JetBrains/IntelliJIdea2020.2/plugins/CucumberJavaScript/lib/cucumberjs_formatter_v3.js:89:47) at EventEmitter.emit (events.js:326:22) – Francislainy Campos Oct 09 '20 at 14:25
  • I get this now with this new version. IntelliJ is 2020.2 ultimate. – Francislainy Campos Oct 09 '20 at 14:26
  • Yes this comes from intellij expect a certain function to exist in the cucumber lib but it not. This is typical to a mismatch of versions. You are using cucumber 7.0.0-rc0 right? – Slim Oct 09 '20 at 14:45
  • No, this is for the 6.0.5 version. I still get the null error with the 7.0.0 one. – Francislainy Campos Oct 09 '20 at 14:50
  • Ok, I think intellij is compatible with cucumber 5.0.1 only. https://www.jetbrains.com/help/idea/running-cucumber-js-unit-tests.html – Slim Oct 09 '20 at 15:01
  • Thanks a lot. Yeah, that solved the original issue. If you'd like to have this as an answer I can upvote and accept. It may be that Intellij is not the best IDE for this as now it says my step is undefined even though I have it there as per what I've pasted here. It's actually my first day trying to work with the codeceptjs tool and I'll see if can figure this new issue out. Thanks again. – Francislainy Campos Oct 09 '20 at 15:16

1 Answers1

1

It seems Intellij 2020.2 is compatible only with cucumber 5.0.1

Using cucumber 6.0.5 and 7.0.0-rc0 will fail because cucumber broke its API.

We have to ask to Jetbrain to update his code :)

Slim
  • 1,256
  • 1
  • 13
  • 25