atrium icon indicating copy to clipboard operation
atrium copied to clipboard

Support of <Click to see difference> in Intellij

Open Nikita-Guchakov opened this issue 1 year ago • 2 comments

Hi, currently IDEs won't show <Click to show difference> if Atrium assertion fails

   expect(actual).toEqual(expected)
image

That makes test failures with large comparing objects annoying check.

To fix that that you can move to throwing AssertionFailedError from the https://github.com/ota4j-team/opentest4j JUnit initiative instead of AtriumError (or maybe just extend AtriumError from it, haven't check Atrium internals) like many other assertion libraries already do (junit, assertj, assertk, strikt, kotest, kotlintest, etc).

image

Nikita-Guchakov avatar Dec 21 '24 20:12 Nikita-Guchakov

Thanks for the report. TL;DR Atrium v1.3.0 will include it

Your feedback would be valuable here: https://github.com/robstoll/atrium-roadmap/issues/39#issuecomment-2540074550

I'll keep this one open so that others see it as well

robstoll avatar Dec 21 '24 20:12 robstoll

I have released v1.3.0-alpha-1 which includes a click to see difference link https://github.com/robstoll/atrium/releases/tag/v1.3.0-alpha-1

Please try it out and give feedback, especially if you should find bugs or if something seems odd in reporting. Thanks

robstoll avatar Dec 29 '24 17:12 robstoll