From 99d94c382c8540d0d6d9cc7ec662c470755d270c Mon Sep 17 00:00:00 2001 From: Christian Thomas Elfreich Date: Thu, 24 Sep 2020 15:21:41 -0400 Subject: [PATCH] Changed position to fixed and appbar width set to inherit its parent --- src/ItemViewAppBar.test.js | 25 +++++++++++++++++++ .../ItemViewAppBar/ItemViewAppBar.js | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/ItemViewAppBar.test.js diff --git a/src/ItemViewAppBar.test.js b/src/ItemViewAppBar.test.js new file mode 100644 index 0000000..4218681 --- /dev/null +++ b/src/ItemViewAppBar.test.js @@ -0,0 +1,25 @@ +import React from "react"; +import { render, unmountComponentAtNode} from "react-dom"; +import { act } from "react-dom/test-utils"; + +import ItemViewAppBar from "./ItemViewAppBar"; + +let container = null; +beforeEach(() => { + //Setup a DOM element as a render target + container = document.createElement("div"); + document.body.appendChild(container); +}); + +afterEach(() => { + unmountComponentAtNode(container); + container.remove(); + container = null; +}); + +it("renders only with a title", () =>{ + act(() => { + render(, container); + }) + expect(container.ItemViewAppBar).toBe(null); +}) \ No newline at end of file diff --git a/src/components/ItemViewAppBar/ItemViewAppBar.js b/src/components/ItemViewAppBar/ItemViewAppBar.js index a150cd6..9ae4957 100644 --- a/src/components/ItemViewAppBar/ItemViewAppBar.js +++ b/src/components/ItemViewAppBar/ItemViewAppBar.js @@ -18,7 +18,7 @@ export default function ItemViewAppBar(props){ return( <> - +