Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#2,821 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, playwright
Domain
testing-qa

Research direction

Reproduce the issue with the shown step in tests/ui-integration/step_definitions and the gherkin:snippets-generated definition, using the listed Playwright configuration. Trace how the Gherkin step runner handles the thrown error, then verify that the scenario status is failed rather than passed.

Written by the indexing model from the issue text.

Description

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.

# paste output here

Provide test source code if related

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

Dominant language
JavaScript
Stars
4.2k
Forks
756
Avg merge
2d 9h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codeceptjs/CodeceptJS

All issues in codeceptjs/CodeceptJS

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.