feat(cli): add feature file runner#2706
Conversation
Deploying midscene with
|
| Latest commit: |
8202c27
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d38b0312.midscene.pages.dev |
| Branch Preview URL: | https://feat-cli-feature-runner-poc.midscene.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b857fa4e70
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| stdio?: 'inherit' | 'pipe'; | ||
| } | ||
|
|
||
| const DEFAULT_FEATURE_LOADER_PATH = join(__dirname, 'feature-loader.js'); |
There was a problem hiding this comment.
Point the default loader at the emitted framework entry
When the packaged CLI runs from the root bundle (dist/lib/index.js), this default resolves to dist/lib/feature-loader.js, but the new rslib entry is emitted as dist/lib/framework/feature-loader.js. In that install path, any .feature file run will fail during Rspack loading unless a test-only featureLoaderPath override is supplied; resolve this the same way as the framework entry or include the framework/ segment.
Useful? React with 👍 / 👎.
Summary
@midscene/clican run.featurefiles directly.@cucumber/gherkin, expanding Background, Rule, and Scenario Outline/Examples into per-scenario Midscene YAML execution configs.Relationship to core
runGherkinScenarioAgent.runGherkinScenario()from main is an inline core API for one scenario string..featureauthoring.Architecture
Test plan
npx nx test @midscene/core -- tests/unit-test/run-gherkin-scenario.test.ts tests/unit-test/yaml-doc-usage.test.tsnpx nx test @midscene/clinpx nx build @midscene/clipnpm run lintgit diff --check