Skip to content

[Feature]: Let bddgen export use JSDoc for improved step catalog #385

Description

@LarsFischer97

The Problem

When i run bddgen export i get all steps. But for my LLM Workflows or documentation i would need a bit more context then just the step names. For this we need maintanable comments to my steps.

Proposed Solution

The solution idea is as follows:
bddgen export does also look for JSDoc information above the Decorator.

     /**
     * Assert that the value of the given property on the queried track event is a valid UUID.
     *
     * @param property - The exact property name to check (as it appears in ClickHouse).
     */
    @Then("the value of property {string} is an UUID")
    async assertPropertyValueIsUUID(property: string) {
     ...
     }

Then it creates a markdown table (as an example) and matches the Steps to the JSDoc information.

Step Definition Description
Then the value of property {string} is an UUID Assert that the value of the given property on the queried track event is a valid UUID. @param property - The exact property name to check (as it appears in ClickHouse).

Now we can generate a step catalog that is always up to date. 👍

As a solution I prototyped and vibe prompted/coded a proof of concept straight into the node_modules of my installed playwright-bdd🗡️ 😆 - Although not really worth showing it did somewhat work though.

If I have time i will look into creating a propper MR. But wanted to share the idea first.

Additional Context

No response

Priority Level

Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions