codeceptjs / codeceptjs/CodeceptJS

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

Đang mở
#2,821 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
4.2k
Fork
757
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
16

Mô tả

#### 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"
}
}
};

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.