From f83c2c4743cb466715d0786d980336f03fba6f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 12 Jun 2020 10:54:50 +0100 Subject: [PATCH] fix(tests): update AlertManagerInput with new cluster label --- .../__snapshots__/index.test.js.snap | 2 +- .../SilenceModal/AlertManagerInput/index.test.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/src/Components/SilenceModal/AlertManagerInput/__snapshots__/index.test.js.snap b/ui/src/Components/SilenceModal/AlertManagerInput/__snapshots__/index.test.js.snap index 4ba4e8d2c..f19e0975c 100644 --- a/ui/src/Components/SilenceModal/AlertManagerInput/__snapshots__/index.test.js.snap +++ b/ui/src/Components/SilenceModal/AlertManagerInput/__snapshots__/index.test.js.snap @@ -7,7 +7,7 @@ exports[` matches snapshot 1`] = `
- am1 | am2 + Cluster: HA
{ alertStore = new AlertStore([]); alertStore.data.upstreams.clusters = { - ha: ["am1", "am2"], + HA: ["am1", "am2"], am3: ["am3"], }; alertStore.data.upstreams.instances = [ @@ -30,7 +30,7 @@ beforeEach(() => { corsCredentials: "include", error: "", version: "0.17.0", - cluster: "ha", + cluster: "HA", clusterMembers: ["am1", "am2"], }, { @@ -42,7 +42,7 @@ beforeEach(() => { corsCredentials: "include", error: "", version: "0.17.0", - cluster: "ha", + cluster: "HA", clusterMembers: ["am1", "am2"], }, { @@ -109,7 +109,7 @@ describe("", () => { MountedAlertManagerInput(); expect(silenceFormStore.data.alertmanagers).toHaveLength(2); expect(silenceFormStore.data.alertmanagers).toContainEqual({ - label: "am1 | am2", + label: "Cluster: HA", value: ["am1", "am2"], }); expect(silenceFormStore.data.alertmanagers).toContainEqual({ @@ -132,7 +132,7 @@ describe("", () => { const tree = ValidateSuggestions(); const options = tree.find("div.react-select__option"); expect(options).toHaveLength(2); - expect(options.at(0).text()).toBe("am1 | am2"); + expect(options.at(0).text()).toBe("Cluster: HA"); expect(options.at(1).text()).toBe("am3"); }); @@ -144,7 +144,7 @@ describe("", () => { options.at(1).simulate("click"); expect(silenceFormStore.data.alertmanagers).toHaveLength(2); expect(silenceFormStore.data.alertmanagers).toContainEqual({ - label: "am1 | am2", + label: "Cluster: HA", value: ["am1", "am2"], }); expect(silenceFormStore.data.alertmanagers).toContainEqual({