diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap
new file mode 100644
index 000000000..dfaa05fd2
--- /dev/null
+++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/__snapshots__/index.test.js.snap
@@ -0,0 +1,90 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[` matches snapshot 1`] = `
+
+
+
+ annotation name
+
+`;
+
+exports[` matches snapshot when visible=false 1`] = `
+"
+
+"
+`;
+
+exports[` matches snapshot when visible=true 1`] = `
+"
+
+
+
+ foo:
+
+
+ some long text
+
+
+"
+`;
diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js
new file mode 100644
index 000000000..ed1edbbad
--- /dev/null
+++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Annotation/index.test.js
@@ -0,0 +1,100 @@
+import React from "react";
+
+import { shallow, mount } from "enzyme";
+
+import toDiffableHtml from "diffable-html";
+
+import { AlertStore } from "Stores/AlertStore";
+import { RenderNonLinkAnnotation, RenderLinkAnnotation } from ".";
+
+let alertStore;
+
+beforeEach(() => {
+ alertStore = new AlertStore([]);
+});
+
+const ShallowLinkAnnotation = () => {
+ return shallow(
+
+ );
+};
+
+describe("", () => {
+ it("matches snapshot", () => {
+ const tree = ShallowLinkAnnotation();
+ expect(tree).toMatchSnapshot();
+ });
+
+ it("contains a link", () => {
+ const tree = ShallowLinkAnnotation();
+ const link = tree.find("a[href='http://localhost/foo']");
+ expect(link).toHaveLength(1);
+ expect(link.text()).toMatch(/annotation name/);
+ });
+});
+
+const MockAfterUpdate = jest.fn();
+
+const ShallowNonLinkAnnotation = visible => {
+ return shallow(
+
+ );
+};
+
+const MountedNonLinkAnnotation = visible => {
+ return mount(
+
+ );
+};
+
+describe("", () => {
+ it("matches snapshot when visible=true", () => {
+ const tree = ShallowNonLinkAnnotation(true);
+ expect(toDiffableHtml(tree.html())).toMatchSnapshot();
+ });
+
+ it("contains value when visible=true", () => {
+ const tree = ShallowNonLinkAnnotation(true);
+ expect(tree.html()).toMatch(/some long text/);
+ });
+
+ it("matches snapshot when visible=false", () => {
+ const tree = ShallowNonLinkAnnotation(false);
+ expect(toDiffableHtml(tree.html())).toMatchSnapshot();
+ });
+
+ it("doesn't contain value when visible=false", () => {
+ const tree = ShallowNonLinkAnnotation(false);
+ expect(tree.html()).not.toMatch(/some long text/);
+ });
+
+ it("clicking on + icon hides the value", () => {
+ const tree = MountedNonLinkAnnotation(true);
+ expect(tree.html()).toMatch(/fa-search-minus/);
+ expect(tree.html()).toMatch(/some long text/);
+ tree.find("div").simulate("click");
+ expect(tree.html()).toMatch(/fa-search-plus/);
+ expect(tree.html()).not.toMatch(/some long text/);
+ });
+
+ it("clicking on - icon shows the value", () => {
+ const tree = MountedNonLinkAnnotation(false);
+ expect(tree.html()).toMatch(/fa-search-plus/);
+ expect(tree.html()).not.toMatch(/some long text/);
+ tree.find("div").simulate("click");
+ expect(tree.html()).toMatch(/fa-search-minus/);
+ expect(tree.html()).toMatch(/some long text/);
+ });
+});