From 6d4b3d67465b9459a54b07f9f74ac94ad1ec707d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 7 Sep 2018 19:23:17 +0100 Subject: [PATCH] fix(tests): use diffable html for annotation snapshot test --- .../__snapshots__/index.test.js.snap | 55 +++++++------------ .../AlertGroup/Annotation/index.test.js | 2 +- 2 files changed, 20 insertions(+), 37 deletions(-) diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap index dfaa05fd2..2182fcb83 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap @@ -1,45 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` matches snapshot 1`] = ` - - - + + + + annotation name +" `; exports[` matches snapshot when visible=false 1`] = ` diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js index 31a3bfa67..cddd63457 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js @@ -22,7 +22,7 @@ const ShallowLinkAnnotation = () => { describe("", () => { it("matches snapshot", () => { const tree = ShallowLinkAnnotation(); - expect(tree).toMatchSnapshot(); + expect(toDiffableHtml(tree.html())).toMatchSnapshot(); }); it("contains a link", () => {