From 3004a5540dcac7e2be99c4a553da0998bdfd87a4 Mon Sep 17 00:00:00 2001 From: Casey Escovedo Date: Tue, 29 Sep 2020 20:27:13 -0700 Subject: [PATCH] Left panel testing started --- __tests__/compareTests.jsx | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 __tests__/compareTests.jsx diff --git a/__tests__/compareTests.jsx b/__tests__/compareTests.jsx new file mode 100644 index 00000000..e3f17583 --- /dev/null +++ b/__tests__/compareTests.jsx @@ -0,0 +1,39 @@ +import * as React from "react"; +import * as renderer from "react-test-renderer"; +import { Compare } from "../frontend/components//leftPanel/Compare"; +import { shallow } from "enzyme"; +import { stringify } from "querystring"; + +describe ("Comparison feature tests", () => { + // wrapper will be assigned the evaluation of the shallow render + let wrapper; + + const props = { + queries: [], + currentSchema: '', + + } + // shallow render the component before running tests + beforeAll(() => { + wrapper = shallow() + }) + + it('Should render a div', () => { + expect(wrapper.type()).toEqual('div'); + }) + + it('Should render h3 tag', () => { + expect(wrapper.containsMatchingElement( +

Comparisons

)).toBeTruthy(); + }) + + it('Should render query label', () => { + expect(wrapper.containsMatchingElement( + {'Query Label'})).toBeTruthy(); + }) + + + + + +}) \ No newline at end of file