Skip to content

Commit

Permalink
Merge pull request open-source-labs#3 from caseyescovedo/leftPanelTes…
Browse files Browse the repository at this point in the history
…ting

Left panel testing started
  • Loading branch information
caseyescovedo authored Sep 30, 2020
2 parents 7821614 + 3004a55 commit ef7dee8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions __tests__/compareTests.jsx
Original file line number Diff line number Diff line change
@@ -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(<Compare {...props}/>)
})

it('Should render a div', () => {
expect(wrapper.type()).toEqual('div');
})

it('Should render h3 tag', () => {
expect(wrapper.containsMatchingElement(
<h3>Comparisons</h3>)).toBeTruthy();
})

it('Should render query label', () => {
expect(wrapper.containsMatchingElement(
<td>{'Query Label'}</td>)).toBeTruthy();
})





})

0 comments on commit ef7dee8

Please sign in to comment.