Skip to content

Commit

Permalink
add UI tests guide in CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19 committed Sep 16, 2023
1 parent dc25ede commit b45cc1e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
30 changes: 25 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

# 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
5 changes: 4 additions & 1 deletion tests/ui.rs
Original file line number Diff line number Diff line change
@@ -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]
mod utils;
Expand Down

0 comments on commit b45cc1e

Please sign in to comment.