final#1828
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The code contains two critical issues: (1) The property name 'person.gender' should be changed to 'person.sex' to match the data structure, as 'gender' is undefined and will display incorrectly. (2) The variable 'table' is used without being declared; it must be initialized using 'document.querySelector('.dashboard')' before appending rows. These fixes are required for proper functionality.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| const row = document.createElement('tr'); | ||
|
|
||
| const rowData = [ | ||
| person.name, |
There was a problem hiding this comment.
The data uses sex property (e.g., 'm' or 'f'), not gender. This will result in undefined being displayed in the gender column.
| cell.textContent = text; | ||
| row.appendChild(cell); | ||
| }); | ||
|
|
There was a problem hiding this comment.
table variable is not defined. According to the task requirements, you need to find the table element with class dashboard in the document first (e.g., document.querySelector('.dashboard')).
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
The Cypress test should create a table based on people.json file is failing because it's looking for 'Male' content in the table but never finds it. While the code review indicates person.sex is used, the test expects the property to be gender based on the data structure. The table must include the gender field values (Male/Female) from people.json to pass the test. Please verify the exact property name in your data structure and ensure the gender column is properly rendered in the table.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
This is an educational approval to help you progress while learning. Your table implementation is working well - you correctly generate all 6 columns (name, gender, born, died, age, century), calculate age and century properly, and append rows to the .dashboard table. The only remaining fix needed is converting the gender values: your data has person.sex returning 'm'/'f', but the test expects 'Male'/'Female'. Add a simple mapping like const gender = person.sex === 'm' ? 'Male' : 'Female'; before creating the cell. Once you map those values, all tests should pass. Great work on the overall structure - just this small data transformation is all that stands between you and a complete solution!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| const row = document.createElement('tr'); | ||
|
|
||
| const rowData = [ | ||
| person.name, |
There was a problem hiding this comment.
The test expects 'Male'/'Female' but person.sex returns 'm'/'f'. Convert the sex value: 'm' → 'Male', 'f' → 'Female'
No description provided.