mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
add UI tests guide in CONTRIBUTING.md
This commit is contained in:
parent
192eaca5dc
commit
af7e95ae98
@ -8,12 +8,32 @@ We follow the [Rust Official Code of Conduct](https://www.rust-lang.org/policies
|
|||||||
|
|
||||||
Create [an issue](https://github.com/ouch-org/ouch/issues) or go to [Ouch Discussions](https://github.com/ouch-org/ouch/discussions).
|
Create [an issue](https://github.com/ouch-org/ouch/issues) or go to [Ouch Discussions](https://github.com/ouch-org/ouch/discussions).
|
||||||
|
|
||||||
# Adding a new feature
|
# Adding a brand new feature
|
||||||
|
|
||||||
Before creating a PR with a new feature, please, open an issue to suggest your addition.
|
Before opening the PR, open an issue to discuss your addition, this increases the chance of your PR being accepted.
|
||||||
|
|
||||||
This allows us to discuss the problem and solution, increasing the chance of your PR to be accepted.
|
# PRs
|
||||||
|
|
||||||
# Don't forget to
|
- Pass all CI checks.
|
||||||
|
- After opening the PR, add a [CHANGELOG.md] entry.
|
||||||
|
|
||||||
- In your PR, add a CHANGELOG.md entry.
|
# Updating UI tests
|
||||||
|
|
||||||
|
In case you need to update the UI tests.
|
||||||
|
|
||||||
|
- Run tests with `insta` to create the new snapshots:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo insta review # or
|
||||||
|
cargo insta review -- ui # useful filter
|
||||||
|
```
|
||||||
|
|
||||||
|
- Now, review the diffs you just generated.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cargo insta review
|
||||||
|
```
|
||||||
|
|
||||||
|
- You can commit them now.
|
||||||
|
|
||||||
|
[CHANGELOG.md]: https://github.com/ouch-org/ouch
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
// Snapshot tests for Ouch's output.
|
/// Snapshot tests for Ouch's output.
|
||||||
|
///
|
||||||
|
/// See CONTRIBUTING.md for a brief guide on how to use [`insta`] for these tests.
|
||||||
|
/// [`insta`]: https://docs.rs/insta
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod utils;
|
mod utils;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user