From 44159ff926c94c25490656a8d67eec6b978dad91 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 27 Jul 2025 15:59:31 +0200 Subject: [PATCH] Add tests for tag information rendering These should have been added when we started rendering this information in e5b09f34e0; apparently I was too lazy back then. Adding them now to guard against breaking it in the next commit. I'm adding these to the CRUD tests, it doesn't seem worth adding separate tests just for these assertions. --- pkg/integration/tests/tag/crud_annotated.go | 12 ++++++++++++ pkg/integration/tests/tag/crud_lightweight.go | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/pkg/integration/tests/tag/crud_annotated.go b/pkg/integration/tests/tag/crud_annotated.go index 12fa16645..d2c3b98c0 100644 --- a/pkg/integration/tests/tag/crud_annotated.go +++ b/pkg/integration/tests/tag/crud_annotated.go @@ -32,6 +32,18 @@ var CrudAnnotated = NewIntegrationTest(NewIntegrationTestArgs{ Lines( MatchesRegexp(`new-tag.*message`).IsSelected(), ). + Tap(func() { + t.Views().Main().ContainsLines( + Equals("Annotated tag: new-tag"), + Equals(""), + Contains("Tagger:"), + Contains("TaggerDate:"), + Equals(""), + Equals("message"), + Equals(""), + Equals("---"), + ) + }). Press(keys.Universal.Push). Tap(func() { t.ExpectPopup().Prompt(). diff --git a/pkg/integration/tests/tag/crud_lightweight.go b/pkg/integration/tests/tag/crud_lightweight.go index dd6614683..736205ecd 100644 --- a/pkg/integration/tests/tag/crud_lightweight.go +++ b/pkg/integration/tests/tag/crud_lightweight.go @@ -28,6 +28,13 @@ var CrudLightweight = NewIntegrationTest(NewIntegrationTestArgs{ Lines( MatchesRegexp(`new-tag.*initial commit`).IsSelected(), ). + Tap(func() { + t.Views().Main().ContainsLines( + Equals("Lightweight tag: new-tag"), + Equals(""), + Equals("---"), + ) + }). PressEnter(). Tap(func() { // view the commits of the tag