fix: Make UI tests handle hyperlinks consistently

This commit is contained in:
Scott Schafer 2025-06-05 21:47:04 -06:00
parent 60400187f4
commit ccbe572a74
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View File

@ -1505,6 +1505,7 @@ impl CargoCommandExt for snapbox::cmd::Command {
Self::new(cargo_exe())
.with_assert(compare::assert_ui())
.env("CARGO_TERM_COLOR", "always")
.env("CARGO_TERM_HYPERLINKS", "true")
.test_env()
}
}

View File

@ -37,7 +37,7 @@
</tspan>
<tspan x="10px" y="154px"><tspan class="fg-green bold"> Checking</tspan><tspan> foo v0.0.1 ([ROOT]/foo)</tspan>
</tspan>
<tspan x="10px" y="172px"><tspan class="fg-green bold"> Finished</tspan><tspan> `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s</tspan>
<tspan x="10px" y="172px"><tspan class="fg-green bold"> Finished</tspan><tspan> </tspan><tspan><a href="https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles">`dev` profile [unoptimized + debuginfo]</a></tspan><tspan> target(s) in [ELAPSED]s</tspan>
</tspan>
<tspan x="10px" y="190px">
</tspan>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB