Skip to content

Commit

Permalink
update smoketests without details
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercactapus committed Jun 30, 2022
1 parent 067e35f commit b845de2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions smoketest/slackinteraction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestSlackInteraction(t *testing.T) {
a := h.CreateAlertWithDetails(h.UUID("sid"), "testing", "details")

ch := h.Slack().Channel("test")
msg := ch.ExpectMessage("testing", "details")
msg := ch.ExpectMessage("testing")
msg.AssertColor("#862421")
msg.AssertActions("Acknowledge", "Close")

Expand All @@ -50,14 +50,14 @@ func TestSlackInteraction(t *testing.T) {
msg.Action("Acknowledge").Click()

updated := msg.ExpectUpdate()
updated.AssertText("Ack", "testing", "details")
updated.AssertText("Ack", "testing")
updated.AssertColor("#867321")
updated.AssertActions("Close")

a.Escalate()

updated = msg.ExpectUpdate()
updated.AssertText("Escalated", "testing", "details")
updated.AssertText("Escalated", "testing")
updated.AssertColor("#862421")
updated.AssertActions("Acknowledge", "Close")
msg.ExpectBroadcastReply("testing")
Expand Down
9 changes: 5 additions & 4 deletions smoketest/statusupdateschannel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ func TestStatusUpdatesChannel(t *testing.T) {
defer h.Close()

a := h.CreateAlertWithDetails(h.UUID("sid"), "testing", "details")
msg := h.Slack().Channel("test").ExpectMessage("testing", "details")
msg := h.Slack().Channel("test").ExpectMessage("testing")
msg.AssertColor("#862421")
msg.AssertActions()
a.Ack()

updated := msg.ExpectUpdate()
updated.AssertText("Ack", "testing", "details")
updated.AssertText("Ack", "testing")
updated.AssertNotText("details")
updated.AssertColor("#867321")
updated.AssertActions()

a.Escalate()

updated = msg.ExpectUpdate()
updated.AssertText("Escalated", "testing", "details")
updated.AssertText("Escalated", "testing")
updated.AssertNotText("details")
updated.AssertColor("#862421")
updated.AssertActions()
msg.ExpectBroadcastReply("testing")
Expand All @@ -60,5 +62,4 @@ func TestStatusUpdatesChannel(t *testing.T) {
updated.AssertColor("#218626")

updated.AssertActions() // no actions

}

0 comments on commit b845de2

Please sign in to comment.