mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
feat(ui): add @cluster to multi-grid label dropdown
This commit is contained in:
committed by
Łukasz Mierzwa
parent
172d0d9257
commit
9f15ffef35
@@ -16,6 +16,7 @@ const valueToOption = (v) => ({ label: v ? v : disabledLabel, value: v });
|
||||
const staticValues = [
|
||||
{ label: disabledLabel, value: "" },
|
||||
{ label: "@alertmanager", value: "@alertmanager" },
|
||||
{ label: "@cluster", value: "@cluster" },
|
||||
{ label: "@receiver", value: "@receiver" },
|
||||
];
|
||||
|
||||
|
||||
@@ -72,16 +72,17 @@ describe("<MultiGridConfiguration />", () => {
|
||||
});
|
||||
const tree = ExpandSortLabelSuggestions();
|
||||
const options = tree.find("div.react-select__option");
|
||||
expect(options).toHaveLength(3);
|
||||
expect(options).toHaveLength(4);
|
||||
expect(options.at(0).text()).toBe("Disable multi-grid");
|
||||
expect(options.at(1).text()).toBe("@alertmanager");
|
||||
expect(options.at(2).text()).toBe("@receiver");
|
||||
expect(options.at(2).text()).toBe("@cluster");
|
||||
expect(options.at(3).text()).toBe("@receiver");
|
||||
});
|
||||
|
||||
it("clicking on a label option updates settingsStore", () => {
|
||||
const tree = ExpandSortLabelSuggestions();
|
||||
const options = tree.find("div.react-select__option");
|
||||
options.at(4).simulate("click");
|
||||
options.at(5).simulate("click");
|
||||
expect(settingsStore.multiGridConfig.config.gridLabel).toBe("job");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user