Skip to content
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

Merged
merged 15 commits into from
Jun 22, 2020
Merged

Chat Interface work #60

merged 15 commits into from
Jun 22, 2020

Conversation

kurund
Copy link
Contributor

@kurund kurund commented Jun 21, 2020

Summary

Test Plan

  • Test cases are part of this PR

@kurund kurund added this to the v0.1 milestone Jun 21, 2020
@kurund kurund requested a review from rathorevaibhav June 21, 2020 19:26
Copy link
Contributor

@rathorevaibhav rathorevaibhav left a 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');
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@kurund kurund merged commit 5989440 into master Jun 22, 2020
@kurund kurund deleted the chats branch June 22, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants