mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix bug
Don't add a leading coma when the tag list is empty
This commit is contained in:
@@ -126,6 +126,17 @@ describe("TagListInputController", () => {
|
||||
expect(variant_add_tag.classList).toContain("tag-error");
|
||||
});
|
||||
});
|
||||
|
||||
describe("when no tag yet", () => {
|
||||
it("doesn't include leading comma in hidden tag list input", () => {
|
||||
variant_tag_list.value = "";
|
||||
|
||||
variant_add_tag.value = "latest";
|
||||
variant_add_tag.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter" }));
|
||||
|
||||
expect(variant_tag_list.value).toBe("latest");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("removeTag", () => {
|
||||
|
||||
Reference in New Issue
Block a user