fix(tests): add missing coverage cases for AlertManagerInput

This commit is contained in:
Łukasz Mierzwa
2018-09-02 19:02:23 +01:00
parent 9644809054
commit 48f9176cf9

View File

@@ -70,6 +70,15 @@ describe("<AlertManagerInput />", () => {
}
});
it("doesn't override last selected Alertmanager instances on mount", () => {
silenceFormStore.data.alertmanagers = [AlertmanagerOption(1)];
ShallowAlertManagerInput();
expect(silenceFormStore.data.alertmanagers).toHaveLength(1);
expect(silenceFormStore.data.alertmanagers).toContainEqual(
AlertmanagerOption(1)
);
});
it("renders all 3 suggestions", () => {
const tree = ValidateSuggestions();
const options = tree.find("[role='option']");