mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(tests): update AlertManagerInput with new cluster label
This commit is contained in:
committed by
Łukasz Mierzwa
parent
9f15ffef35
commit
f83c2c4743
@@ -7,7 +7,7 @@ exports[`<AlertManagerInput /> matches snapshot 1`] = `
|
||||
<div class=\\"react-select__value-container react-select__value-container--is-multi react-select__value-container--has-value css-1pfcrl6-ValueContainer\\">
|
||||
<div class=\\"css-owt1hd-multiValue react-select__multi-value\\">
|
||||
<div class=\\"css-xbn6jz react-select__multi-value__label\\">
|
||||
am1 | am2
|
||||
Cluster: HA
|
||||
</div>
|
||||
<div class=\\"css-1ucqin4 react-select__multi-value__remove\\">
|
||||
<svg height=\\"14\\"
|
||||
|
||||
@@ -17,7 +17,7 @@ beforeEach(() => {
|
||||
|
||||
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("<AlertManagerInput />", () => {
|
||||
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("<AlertManagerInput />", () => {
|
||||
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("<AlertManagerInput />", () => {
|
||||
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({
|
||||
|
||||
Reference in New Issue
Block a user