codeceptjs / codeceptjs/CodeceptJS

throw new Error('Not implemented yet') in BDD does not fail the test

Abierto
#2,821 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
4.2k
Forks
757
Merge medio
2 d 9 h
PR fusionados (30 d)
16

Descripción

#### What are you trying to achieve?
When test steps are auto generated with gherkin:snippets they do not set the test status to failed when the test is run with the steps implemented with throw new Error('Not implemented yet')

#### What do you get instead?
The test status is passed

> Provide console output if related. Use `--verbose` mode for more details.

```bash
# paste output here
```

> Provide test source code if related

```js
Given('I have no transactions in the last {int} months', () => {
// From "tests\ui-integration\features\Wrapper_Transactions.feature" {"line":45,"column":2}
throw new Error('Not implemented yet');
});
```

### Details

* CodeceptJS version: 3.0.4
* NodeJS Version:
* Operating System: Windows
* Playwright
* Configuration file:

```js
const server = require("./tests/ui-integration/id_server/id_server");

exports.config = {
name: "CodeceptJS_BDD",
output: "./tests/ui-integration/output",
helpers: {
Playwright: {
url: "https://localhost:44357",
show: true,
windowSize: "1920x1080",
waitForTimeout: 10000,
restart: false,
browser: "chromium",
keepCookies: true,
keepBrowserState: true,
waitForNavigation: "domcontentloaded",
chromium: {
args: ["--no-sandbox", "--start-maximized", "--disable-popup-blocking", "--disable-setuid-sandbox"]
}
},
MockHelper: {
require: "./tests/ui-integration/helpers/mockplaywright_helper.js"
},
Mochawesome: {
uniqueScreenshotNames: true
},
ResembleHelper: {
prepareBaseImage: false,
require: "codeceptjs-resemblehelper",
screenshotFolder: "./tests/ui-integration/screenshots/current/",
baseFolder: "./tests/ui-integration/screenshots/base/",
diffFolder: "./tests/ui-integration/screenshots/diff/",
},
AssertWrapper: {
require: "codeceptjs-assert"
}
},
include: {
I: "./tests/ui-integration/steps_file.js",
...require("./tests/ui-integration/pages")
},
mocha: {
reporterOptions: {
mochawesome: {
stdout: "./output/mochawesome_console.log",
uniqueScreenshotNames: "true",
options: {
reportDir: "./tests/ui-integration/output",
reportFilename: "investor-zone-report"
}
}
}
},
hooks: [],
gherkin: {
features: "./tests/ui-integration/features/*.feature",
steps: [
"./tests/ui-integration/step_definitions/common_steps.js",
"./tests/ui-integration/step_definitions/portfolio/portfolio_valuation_steps.js",
"./tests/ui-integration/step_definitions/portfolio/portfolio_summary_steps.js",
"./tests/ui-integration/step_definitions/documents/documents_steps.js",
"./tests/ui-integration/step_definitions/moneyinmoneyout/moneyin_moneyout_steps.js",
"./tests/ui-integration/step_definitions/wrapperstatements/wrapper_statements_steps.js",
"./tests/ui-integration/step_definitions/wrappertransactions/wrapper_transactions_steps.js"
]
},
async bootstrap() {
await server.start();
},
async teardown() {
await server.stop();
},
plugins: {
autoDelay: {
enabled: true
},
screenshotOnFail: {
enabled: true
},
retryFailedStep: {
enabled: false
},
customLocator: {
enabled: true,
strategy: "css",
attribute: "data-test-id"
}
}
};

```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.