", () => {
it("renders ValidationError after failed validation", () => {
const tree = MountedAlertManagerInput();
- tree.find(".react-select__multi-value__remove").at(0).simulate("click");
- tree.find(".react-select__multi-value__remove").at(0).simulate("click");
+ tree.find("div.react-select__multi-value__remove").at(0).simulate("click");
+ tree.find("div.react-select__multi-value__remove").at(0).simulate("click");
silenceFormStore.data.setAlertmanagers([]);
silenceFormStore.data.setWasValidated(true);
expect(toDiffableHtml(tree.html())).toMatch(/fa-circle-exclamation/);
@@ -186,10 +186,10 @@ describe("
", () => {
const tree = MountedAlertManagerInput();
expect(silenceFormStore.data.alertmanagers).toHaveLength(2);
- tree.find(".react-select__multi-value__remove").at(0).simulate("click");
+ tree.find("div.react-select__multi-value__remove").at(0).simulate("click");
expect(silenceFormStore.data.alertmanagers).toHaveLength(1);
- tree.find(".react-select__multi-value__remove").simulate("click");
+ tree.find("div.react-select__multi-value__remove").simulate("click");
expect(silenceFormStore.data.alertmanagers).toHaveLength(0);
expect(silenceFormStore.data.alertmanagers).toEqual([]);
});
diff --git a/ui/src/Components/SilenceModal/SilenceMatch/LabelValueInput.test.tsx b/ui/src/Components/SilenceModal/SilenceMatch/LabelValueInput.test.tsx
index d227c7900..51223a102 100644
--- a/ui/src/Components/SilenceModal/SilenceMatch/LabelValueInput.test.tsx
+++ b/ui/src/Components/SilenceModal/SilenceMatch/LabelValueInput.test.tsx
@@ -144,10 +144,10 @@ describe("
", () => {
matcher.values = [StringToOption("dev"), StringToOption("staging")];
const tree = MountedLabelValueInput(true);
- tree.find(".react-select__multi-value__remove").at(0).simulate("click");
+ tree.find("div.react-select__multi-value__remove").at(0).simulate("click");
expect(matcher.values).toHaveLength(1);
- tree.find(".react-select__multi-value__remove").simulate("click");
+ tree.find("div.react-select__multi-value__remove").simulate("click");
expect(matcher.values).toHaveLength(0);
expect(matcher.values).toEqual([]);
});
diff --git a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelNameInput.test.tsx.snap b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelNameInput.test.tsx.snap
index a10e76d06..ac01b50f3 100644
--- a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelNameInput.test.tsx.snap
+++ b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelNameInput.test.tsx.snap
@@ -15,13 +15,13 @@ exports[`
matches snapshot 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
-
+
+
+
cluster
matches snapshot 1`] = `
-
+
fetches suggestions on mount 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
+
+
-
+
matches snapshot 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
+
+
-
+
matches snapshot when focused 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
+
+
-
+
matches snapshot when focused and disabled
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
+
+
-
+
matches snapshot with a value 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
-
+
+
+
foo
matches snapshot with a value 1`] = `
-
+
matches snapshot with isDisabled=true 1`]
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
-
+
+
+
foo
matches snapshot with isDisabled=true 1`]
-
+
matches snapshot with isMulti=true 1`] = `
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
+
+
-
+
matches snapshot with isMulti=true and a v
class=\\"css-1f43avz-a11yText-A11yText\\"
>
-
-
-
-
+
+
+
+
foo
matches snapshot with isMulti=true and a v
matches snapshot with isMulti=true and a v
matches snapshot with isMulti=true and a v
-
+