-
Notifications
You must be signed in to change notification settings - Fork 73
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
test: e2e test for parsing config.toml and modifying #2705
Conversation
Your org requires the Graphite merge queue for merging into mainAdd the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ironAiken2 and the rest of your teammates on Graphite |
e4e7303
to
da6d698
Compare
config.toml
and modifying
config.toml
and modifyingda6d698
to
6e9d0e1
Compare
6e9d0e1
to
bfb2575
Compare
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.
please update package.json file and could we use "https://www.npmjs.com/package/smol-toml" instead of iarna/toml package?
The last update is about 4 years ago, so I think it's better to use the package with active updates.
For the toml parser library, I chose the library with the highest weekly downloads because I think it's a library that won't need frequent modifications once the code is established. |
Okay, Let's apply this library for now. |
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.
LGTM.
Merge activity
|
### TL;DR Updated e2e tests for config.toml and added TOML parsing functionality. ### What changed? - Removed `config-test.toml` file - Updated `config.test.ts` to include new tests for blocklist and showNonInstalledImages - Modified `test-util.ts` to include a new `modifyConfigToml` function - Added `@iarna/toml` dependency to `package.json` and `pnpm-lock.yaml` The toml parser currently used by webui has a lot of [issues](#2382), so I used a different library, [`@iarna/toml`](https://github.com/iarna/iarna-toml). ### How to test? 1. Run the e2e tests for the config.toml file: - Test the blocklist functionality by checking if specified menu items are hidden and their pages are inaccessible - Test the showNonInstalledImages setting by verifying the visibility of non-installed images 2. Verify that the `modifyConfigToml` function works correctly by running the tests and checking if the config.toml file is modified as expected ### Why make this change? This change improves the e2e testing capabilities for the config.toml file, allowing for more dynamic and comprehensive testing of configuration options. The addition of TOML parsing functionality enables easier manipulation of the config file during tests, providing a more flexible and maintainable testing approach. --- <!-- Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes, and how it affects the users and other developers. --> **Checklist:** (if applicable) - [ ] Mention to the original issue - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
bfb2575
to
406b5ac
Compare
TL;DR
Updated e2e tests for config.toml and added TOML parsing functionality.
What changed?
config-test.toml
fileconfig.test.ts
to include new tests for blocklist and showNonInstalledImagestest-util.ts
to include a newmodifyConfigToml
function@iarna/toml
dependency topackage.json
andpnpm-lock.yaml
The toml parser currently used by webui has a lot of issues, so I used a different library,
@iarna/toml
.How to test?
Run the e2e tests for the config.toml file:
Verify that the
modifyConfigToml
function works correctly by running the tests and checking if the config.toml file is modified as expectedWhy make this change?
This change improves the e2e testing capabilities for the config.toml file, allowing for more dynamic and comprehensive testing of configuration options. The addition of TOML parsing functionality enables easier manipulation of the config file during tests, providing a more flexible and maintainable testing approach.
Checklist: (if applicable)