From 1eb23e0a0f5889c8e7e1ab480415d16f806dfd2d Mon Sep 17 00:00:00 2001 From: Tanner Barlow Date: Tue, 16 Apr 2019 07:06:00 -0700 Subject: [PATCH] Fix tag removal test for editor page --- .../components/pages/editorPage/editorPage.test.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/react/components/pages/editorPage/editorPage.test.tsx b/src/react/components/pages/editorPage/editorPage.test.tsx index 786375aba5..4716f33bad 100644 --- a/src/react/components/pages/editorPage/editorPage.test.tsx +++ b/src/react/components/pages/editorPage/editorPage.test.tsx @@ -29,6 +29,7 @@ import { appInfo } from "../../../../common/appInfo"; import SplitPane from "react-split-pane"; import EditorSideBar from "./editorSideBar"; import Alert from "../../common/alert/alert"; +import registerMixins from "../../../../registerMixins"; function createComponent(store, props: IEditorPageProps): ReactWrapper { return mount( @@ -657,6 +658,11 @@ describe("Editor Page Component", () => { }); describe("Basic tag interaction tests", () => { + + beforeAll(() => { + registerMixins(); + }); + it("tags are initialized correctly", () => { const project = MockFactory.createTestProject(); const store = createReduxStore({ @@ -700,6 +706,9 @@ describe("Editor Page Component", () => { expect(getState(wrapper).project.tags).toEqual(project.tags); wrapper.find(".tag-content").last().simulate("click"); wrapper.find("i.tag-input-toolbar-icon.fas.fa-trash").simulate("click"); + wrapper.find("button.btn.btn-danger").simulate("click"); + + await MockFactory.flushUi(); const stateTags = getState(wrapper).project.tags; expect(stateTags).toHaveLength(project.tags.length - 1);