Sai Sandeep taking over for Ramya unit test : Reports/PeopleTableDetails#2102
Sai Sandeep taking over for Ramya unit test : Reports/PeopleTableDetails#2102scoopstroop92 wants to merge 8 commits intodevelopmentfrom
Conversation
|
@metaphor987 @aaryaneil I have fixed the console warnings. Now you shouldn't see any warnings except for warning due to the main component logic |
|
@ZhangPeizhou @cgomezhub @dkn6 my understanding is the warning stems from the main component logic. I am not really sure if i can make that changes as part of this PR . I beleive it should be addressed in a separate PR altogether as the component needs to functionally tested after making any changes. Let me know your thoughts |
| <div className="people-table"> | ||
| {filteredTasks.map(value => ( |
There was a problem hiding this comment.
@ramyaram2092
From my understanding, simply assigning a unique key to the list of items here should be enough, and I don't think this change will have any negative impact. Whether to handle this in a separate PR is up to you, so I approve this PR. Thank you for your great work!
There was a problem hiding this comment.
All test cases have passed. However, there is a warning for a unique key. Each element in an array rendered by a map must have a unique key prop.


You can replace the line numbers 221 to 229 in the PeopleTableDetails.jsx with this code:
{filteredTasks.map(value => (
<NewModal key={value._id} header="Task info" trigger={() => renderFilteredTask(value)}>
<textarea className="rectangle" type="text" value={value.whyInfo} readOnly />
<textarea className="rectangle" type="text" value={value.intentInfo} readOnly />
<textarea className="rectangle" type="text" value={value.endstateInfo} readOnly />
))}
Also, you can make your code better by removing extra stuff like.
Line no. 61, remove const simple = [ ] as it is never used.
Line no. 64 to 72, use return instead of an if and return true.
the warning stems from the main component logic . I beleive it is better to make the changes as a seperate PR. Let me know your thoughts @JatinAgrawal94 @Kavil-Jain-514 |
































Description
Unit test for src/components/Reports/PeopleTableDetails
Main changes explained:
Test cases
How to test:
Screenshots or videos of changes:
Note :
Kindly take a look at the test cases and suggest if more validations can be added