-
Couldn't load subscription status.
- Fork 715
fix(cli): allow duplicate YAML files in config.yaml #1327
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
Conversation
✅ Deploy Preview for midscene ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Co-authored-by: quanru <11739753+quanru@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge it into 1.0
thanks for @yuyutaotao @quanruThe solution to this problem makes it easier for our company's automated testing projects to be conducted in the testing community. |
* Initial plan * fix(cli): allow duplicate YAML files in config.yaml Co-authored-by: quanru <11739753+quanru@users.noreply.github.com> * fix(cli): deep clone YAML script to prevent mutation issues * fix(yaml): prevent mutation of flowItem by creating a new object for processing --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: quanru <11739753+quanru@users.noreply.github.com> Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
Problem
When users specified the same YAML file multiple times in the
filesarray ofconfig.yaml, only one instance was executed. This prevented users from creating business process flows that require executing the same test file at different stages.For example, a user might want to:
Previously, this config would only execute login.yaml once:
Root Cause
The
expandFilePatternsfunction inpackages/cli/src/config-factory.tsused aSetto track seen files and skip duplicates. This deduplication logic prevented intentional duplicate file specifications from being executed.Solution
Removed the Set-based deduplication logic to allow all file entries to be preserved in the execution order. Each pattern in the
filesarray is now evaluated independently, and files can appear multiple times in the final execution list.Changes
packages/cli/src/config-factory.ts: RemovedseenFilesSet and simplified the file collection loop to preserve all matched filespackages/cli/tests/unit-test/config-factory.test.ts:Testing
Impact
This change enables users to define sequential test flows that reuse the same test files at different points in the execution sequence, which is essential for complex business process automation scenarios.
Fixes #[issue number]
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
googlechromelabs.github.iohttps://storage.googleapis.com/chrome-for-testing-public/133.0.6943.53/linux64/chrome-headless-shell-linux64.zipnode install.mjs(http block)https://storage.googleapis.com/chrome-for-testing-public/133.0.6943.53/linux64/chrome-linux64.zipnode install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #1326
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.