From bd4e549b270d968082278d906a66d44643af24d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sun, 2 Sep 2018 18:02:58 +0100 Subject: [PATCH] fix(tests): cover regex matches in silence tests --- .../AlertGroup/Silence/__snapshots__/index.test.js.snap | 3 +++ .../Grid/AlertGrid/AlertGroup/Silence/index.test.js | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap index 2c7daac4d..fe7c57330 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap @@ -112,6 +112,9 @@ exports[` matches snapshot with expaned details 1`] = ` alertname=MockAlert + + instance=~foo[0-9]+ + " diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/index.test.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/index.test.js index 56ddd651b..4eb9b29de 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/index.test.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/index.test.js @@ -30,6 +30,11 @@ const silence = { name: "alertname", value: "MockAlert", isRegex: false + }, + { + name: "instance", + value: "foo[0-9]+", + isRegex: true } ], startsAt: "2000-01-01T10:00:00Z",