Skip to content

Commit 44159ff

Browse files
committed
Add tests for tag information rendering
These should have been added when we started rendering this information in e5b09f3; 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.
1 parent 8483239 commit 44159ff

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

pkg/integration/tests/tag/crud_annotated.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,18 @@ var CrudAnnotated = NewIntegrationTest(NewIntegrationTestArgs{
3232
Lines(
3333
MatchesRegexp(`new-tag.*message`).IsSelected(),
3434
).
35+
Tap(func() {
36+
t.Views().Main().ContainsLines(
37+
Equals("Annotated tag: new-tag"),
38+
Equals(""),
39+
Contains("Tagger:"),
40+
Contains("TaggerDate:"),
41+
Equals(""),
42+
Equals("message"),
43+
Equals(""),
44+
Equals("---"),
45+
)
46+
}).
3547
Press(keys.Universal.Push).
3648
Tap(func() {
3749
t.ExpectPopup().Prompt().

pkg/integration/tests/tag/crud_lightweight.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ var CrudLightweight = NewIntegrationTest(NewIntegrationTestArgs{
2828
Lines(
2929
MatchesRegexp(`new-tag.*initial commit`).IsSelected(),
3030
).
31+
Tap(func() {
32+
t.Views().Main().ContainsLines(
33+
Equals("Lightweight tag: new-tag"),
34+
Equals(""),
35+
Equals("---"),
36+
)
37+
}).
3138
PressEnter().
3239
Tap(func() {
3340
// view the commits of the tag

0 commit comments

Comments
 (0)