Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario Outline #1

Open
alandotic opened this issue Apr 5, 2021 · 0 comments
Open

Scenario Outline #1

alandotic opened this issue Apr 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@alandotic
Copy link

Is your feature request related to a problem? Please describe.
cannot use scenario outline

Describe the solution you'd like
able to use scenario outline

Describe alternatives you've considered
i've make some change in TestingApp.ts but i couldn't create PR for that

    feature.scenarioOutlines.forEach((scenarioOutline) => {
      scenarioOutline.scenarios.forEach((scenario) => {
        const testFn = scenario.tags.includes("@skip")
            ? test.skip
            : scenario.tags.includes("@only")
                ? test.only
                : test;
        testFn(scenario.title, (keywords) => {
            const context = createContext(this, feature);
            scenario.steps.forEach((step) => {
                const keyword = keywords[step.keyword];
                keyword(step.stepText, () => {
                    // istanbul ignore if
                    if (this._container == null) {
                        throw new Error("TestingApp not initialized. Make sure you call start() method in beforeAll() hook.");
                    }
                    const [re, fn] = this._container
                        .get(MatcherRegistry)
                        .getMatcherFor(step.stepText);
                    if (typeof re === "string") {
                        return fn(context);
                    }
                    else {
                        const args = re.exec(step.stepText); // eslint-disable-line @typescript-eslint/no-non-null-assertion
                        return fn(context, ...args.slice(1), args[0], step, scenario, feature);
                    }
                });
            });
        });
    });
    });

Additional context

@znck znck added the enhancement New feature or request label May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants