diff --git a/MAP/src/components/Legend/test/Legend.test.js b/MAP/src/components/Legend/test/Legend.test.js index 872b70cc..a745ad2c 100644 --- a/MAP/src/components/Legend/test/Legend.test.js +++ b/MAP/src/components/Legend/test/Legend.test.js @@ -15,12 +15,15 @@ it('renders correctly when there are no items', () => { expect(tree).toMatchSnapshot(); }); -it('render Correctly with context data' , async () => { +it('>>>render Correctly with context data' , async () => { const tree = renderer.create( - ); - expect(tree).toMatchSnapshot(); + ).root; + // query for element + const element = tree.findByType("div"); + + expect(element.props.children.length).toEqual(4); }) diff --git a/MAP/src/components/Legend/test/__snapshots__/Legend.test.js.snap b/MAP/src/components/Legend/test/__snapshots__/Legend.test.js.snap index 52bd7f8a..25fe7d97 100644 --- a/MAP/src/components/Legend/test/__snapshots__/Legend.test.js.snap +++ b/MAP/src/components/Legend/test/__snapshots__/Legend.test.js.snap @@ -1,110 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`render Correctly with context data 1`] = ` - - - - - - - - - - - -
-
- -
- - - mapLegend.no - -
-
- -
- - - mapLegend.partial - -
-
- -
- - - mapLegend.full - -
-
- -
- - - mapLegend.noData - -
-
- -`; - exports[`renders correctly when there are no items 1`] = `