fix incident links with helper
This commit is contained in:
1 parent
618258d282
commit
7fb57d8090
20 files changed
+83
-34
No files matched your search
@@ -96,6 +96,14 @@ describe("SlackProvider", () => {
|
||||
expect(text).toContain("Additional Information");
|
||||
});
|
||||
|
||||
it("links the incident button to the monitor's incidents page", async () => {
|
||||
const { provider } = createProvider();
|
||||
await provider.sendMessage(makeNotification() as any, makeMessageWithIncident());
|
||||
const blocks = mockGotPost.mock.calls[0][1].json.blocks;
|
||||
const actions = blocks.find((b: any) => b.type === "actions");
|
||||
expect(actions.elements[0].url).toBe("https://app.example.com/incidents/mon-1");
|
||||
});
|
||||
|
||||
it("omits threshold, details, and incident sections when not present", async () => {
|
||||
const { provider } = createProvider();
|
||||
const msg = makeMessage();
|
||||
|
||||
Reference in new issue
Block a user