Use findByTestId

parent 9b2b369d
...@@ -98,7 +98,7 @@ describe('PolicyList component', () => { ...@@ -98,7 +98,7 @@ describe('PolicyList component', () => {
}); });
it('renders the new policy button', () => { it('renders the new policy button', () => {
const button = wrapper.find('[data-testid="new-policy"]'); const button = wrapper.findByTestId('new-policy');
expect(button.exists()).toBe(true); expect(button.exists()).toBe(true);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment