From 0c52a528b16fa15a468363d384d3c27103f03451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Thu, 1 Dec 2022 18:26:10 +0000 Subject: [PATCH] fix(tests): update snapshots --- ...rtGroupCollapseConfiguration.test.tsx.snap | 12 +-- .../AlertGroupSortConfiguration.test.tsx.snap | 12 +-- .../MultiGridConfiguration.test.tsx.snap | 12 +-- .../ThemeConfiguration.test.tsx.snap | 12 +-- .../__snapshots__/index.test.tsx.snap | 48 ++++++------ .../MainModalContent.test.tsx.snap | 48 ++++++------ .../__snapshots__/index.test.tsx.snap | 24 +++--- .../AlertManagerInput/index.test.tsx | 8 +- .../SilenceMatch/LabelValueInput.test.tsx | 4 +- .../LabelNameInput.test.tsx.snap | 12 +-- .../LabelValueInput.test.tsx.snap | 24 +++--- .../__snapshots__/ReactSelect.test.tsx.snap | 78 +++++++++---------- 12 files changed, 147 insertions(+), 147 deletions(-) diff --git a/ui/src/Components/MainModal/Configuration/__snapshots__/AlertGroupCollapseConfiguration.test.tsx.snap b/ui/src/Components/MainModal/Configuration/__snapshots__/AlertGroupCollapseConfiguration.test.tsx.snap index 1c288ed65..d9b99c222 100644 --- a/ui/src/Components/MainModal/Configuration/__snapshots__/AlertGroupCollapseConfiguration.test.tsx.snap +++ b/ui/src/Components/MainModal/Configuration/__snapshots__/AlertGroupCollapseConfiguration.test.tsx.snap @@ -16,13 +16,13 @@ exports[` matches snapshot with default value class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Collapse on mobile
matches snapshot with default value
- +
matches snapshot with default values 1` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Use defaults from karma config file
matches snapshot with default values 1`
- +
matches snapshot with default values 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Disable multi-grid
matches snapshot with default values 1`] = `
- +
matches snapshot with default values 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Automatic theme, follow browser preference
matches snapshot with default values 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Automatic theme, follow browser preference
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Collapse on mobile
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Use defaults from karma config file
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Disable multi-grid
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Automatic theme, follow browser preference
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Collapse on mobile
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Use defaults from karma config file
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
+
+
+
Disable multi-grid
matches snapshot 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
-
-
+
+
+
+
Cluster: HA
matches snapshot 1`] = `
-
-
+
+
am3
matches snapshot 1`] = `
matches snapshot 1`] = `
matches snapshot 1`] = `
- +
", () => { 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\\" > -
-
+
+
Label value
fetches suggestions on mount 1`] = `
- +
matches snapshot 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
+
+
Label value
matches snapshot 1`] = `
- +
matches snapshot when focused 1`] = ` class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
+
+
Select...
matches snapshot when focused 1`] = `
- +
matches snapshot when focused and disabled class=\\"css-1f43avz-a11yText-A11yText\\" > -
-
+
+
Select...
matches snapshot when focused and disabled
- +
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\\" > -
-
+
+
Select...
matches snapshot with isMulti=true 1`] = `
- +
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
- +