Created
September 24, 2019 18:30
-
-
Save ralfting/131f087a96809f85a8ede536e02c4cd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Email badge', () => { | |
it('adds two email', () => { | |
const { container, getByTestId } = render(<EmailInput setTo={jest.fn()} {...props} />); | |
container.querySelector('input').value = 'example1@pipefy.com,'; | |
fireEvent.keyUp(container.querySelector('input'), { | |
key: 'Backspace', | |
}); | |
container.querySelector('input').value = 'example2@pipefy.com,'; | |
fireEvent.keyUp(container.querySelector('input'), { | |
key: 'Backspace', | |
}); | |
expect(getByTestId('[data-testid="email-compose-badge"]')).toHaveLength(2) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment