feat(test): add legacy YAML migration command - #3087
Open
xiong35 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a migration command for converting legacy Midscene Web YAML suites into the new
@midscene/testproject format.What changed
migrateCLI command.midscene.config.tscases/*.yamlMIGRATION.mdai/aiAction/aiAct→aiActaiAssert→aiAssertsleep→waitrecordToReport/logScreenshot→recordToReportMIGRATION.md.Compatibility and limitations
The automatic path currently targets legacy Web YAML.
Unsupported or semantically different behavior fails closed and requires manual migration, including:
javascript, query/wait/input actions, or Gherkin stepssetup/servekeepWindowand unsafecontinueOnErrorcombinationsThese cases should be implemented with
defineProjectSetup, Playwright, or custom Test Runner Nodes after generating the supported portion.describe-nodesremains an optional documentation and configuration-inspection command; it does not affect test execution.Validation
pnpm run lintpnpm exec nx test @midscene/testpnpm --filter @midscene/test buildAdditional demo validation covered 45 migration scenarios:
Real Chromium validation also passed for environment-variable compatibility and manually migrated lifecycle/custom-node scenarios.