Skip to content

Commit

Permalink
Fix tests around query description
Browse files Browse the repository at this point in the history
This content is now wrapped in a whitespace-preserving element, so these
need to be updated ever so slightly.
  • Loading branch information
rylnd committed Oct 13, 2020
1 parent 14bf12c commit 4341cac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ describe('helpers', () => {
query: mockQueryBarWithQuery.query,
savedId: mockQueryBarWithQuery.saved_id,
});
expect(result[0].title).toEqual(<>{i18n.QUERY_LABEL} </>);
expect(result[0].description).toEqual(<>{mockQueryBarWithQuery.query} </>);

expect(result[0].title).toEqual(<>{i18n.QUERY_LABEL}</>);
expect(shallow(result[0].description as React.ReactElement).text()).toEqual(
mockQueryBarWithQuery.query
);
});

test('returns expected array of ListItems when "savedId" exists', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ describe('description_step', () => {
mockFilterManager
);

expect(result[0].title).toEqual(<>{i18n.QUERY_LABEL} </>);
expect(result[0].description).toEqual(<>{mockQueryBar.queryBar.query.query} </>);
expect(result[0].title).toEqual(<>{i18n.QUERY_LABEL}</>);
expect(shallow(result[0].description as React.ReactElement).text()).toEqual(
mockQueryBar.queryBar.query.query
);
});
});

Expand Down

0 comments on commit 4341cac

Please sign in to comment.