-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat Interface work #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. just two comments. Please check @kurund
}); | ||
|
||
test('it should render the message date correctly', () => { | ||
expect(wrapper.find('[data-testid="date"]').text()).toEqual('00:14'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the right time? considering it's 18:44 in the defaultProps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's right! It is based on the timezone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I think we should avoid the timezone as now CI in place, it may have different timezone than IST and the test case may fail. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not checking the actual data, I am checking mock data. So that should be fine. Check the props that are being sent.
input.simulate('change', { target: { value: 'Hello' } }); | ||
input.simulate('keypress', { key: 'Enter' }); | ||
|
||
// TODO: both change and keypress are triggered correctly so wondering if we need any assertion here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably the same assertion as clicked on the button. The inputSubmitted
should change to true. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a key enter event and it not submitting the form directly. Hence "inputSubmitted" won't work.
Summary
Test Plan