-
Notifications
You must be signed in to change notification settings - Fork 562
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
ch-ok #524
base: master
Are you sure you want to change the base?
ch-ok #524
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.
Thank you for your hard work on this task! 😊 While your code meets many of the task requirements, there are a few critical issues that need to be addressed before we can approve the pull request:
-
Assertion Missing: The task requires asserting the inputted data in the modal window after submission. This is a core requirement that needs to be implemented to ensure the test is complete.
-
Descriptive Test Name: The test case lacks a descriptive name. Providing a meaningful name will help others understand the purpose of the test more easily.
-
Placeholder Value in
Subjects
: TheSubjects
variable contains a placeholder value ('dsafgasfasd'). Please update this to a realistic and meaningful value relevant to the test case. -
Naming Convention: The variable
phonnumber
should be renamed tophoneNumber
to adhere to camelCase naming conventions, which improves code readability and maintainability.
Once these issues are addressed, your code will be in great shape! Keep up the great work and feel free to reach out if you have any questions. 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
cypress/e2e/registration.cy.js
Outdated
const firstName = 'Anderson'; | ||
const lastName = 'Konstant'; | ||
const userEmail = '[email protected]'; | ||
const phonnumber = 802654594154; |
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.
The variable phonnumber
should be renamed to phoneNumber
to follow camelCase naming conventions.
cypress/e2e/registration.cy.js
Outdated
const lastName = 'Konstant'; | ||
const userEmail = '[email protected]'; | ||
const phonnumber = 802654594154; | ||
const Subjects = 'dsafgasfasd'; |
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.
The Subjects
variable contains a placeholder value ('dsafgasfasd'). Ensure that this value is meaningful and relevant to the test case.
cypress/e2e/registration.cy.js
Outdated
describe('Student Registration page', () => { | ||
before(() => { | ||
|
||
cy.visit('https://demoqa.com/automation-practice-form'); | ||
}); | ||
|
||
it('', () => { |
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.
The test case lacks a descriptive name. Consider providing a meaningful name to describe what this test is verifying.
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.
Review Summary
Great job on implementing the test script for the student registration page! 🎉 Your code meets the task requirements and constraints, effectively automating the form submission and verification process. However, there are a few critical issues that need attention:
-
Date Selection Logic: The current logic might not handle single-digit days correctly. Ensure that the day is always formatted as two digits using
padStart(2, '0')
to avoid any potential issues. -
Gender Selection Logic: The gender selection is hardcoded to select the third child, which may not be reliable if the page structure changes. Consider using a more dynamic selector based on the label text to enhance robustness.
These improvements will make your test script more reliable and adaptable to changes. Remember, addressing these issues will not only improve your current project but also enhance your skills for future tasks. Keep up the great work and continue learning from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
cy.get(`.react-datepicker__day--0${String(randomDay).padStart(2, '0')}:not(.react-datepicker__day--outside-month)`) | ||
.click(); |
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.
The selector for the day might not work correctly for single-digit days. Ensure that the day is always two digits by using padStart(2, '0')
to format the day correctly. This is already done, but make sure the logic accounts for all possible scenarios.
cy.get('#firstName').type(firstName); | ||
cy.get('#lastName').type(lastName); | ||
cy.get('#userEmail').type(userEmail); | ||
cy.get('#genterWrapper > .col-md-9 > :nth-child(3)').click(); |
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.
The gender selection is hardcoded to select the third child. This approach may break if the page structure changes. Consider using a more reliable selector, such as one based on the label text.
No description provided.