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

ch-ok #524

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

ch-ok #524

wants to merge 2 commits into from

Conversation

Kronnes15
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. 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.

  2. 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.

  3. Placeholder Value in Subjects: The Subjects variable contains a placeholder value ('dsafgasfasd'). Please update this to a realistic and meaningful value relevant to the test case.

  4. Naming Convention: The variable phonnumber should be renamed to phoneNumber 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.

const firstName = 'Anderson';
const lastName = 'Konstant';
const userEmail = '[email protected]';
const phonnumber = 802654594154;

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.

const lastName = 'Konstant';
const userEmail = '[email protected]';
const phonnumber = 802654594154;
const Subjects = 'dsafgasfasd';

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.

describe('Student Registration page', () => {
before(() => {

cy.visit('https://demoqa.com/automation-practice-form');
});

it('', () => {

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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:

  1. 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.

  2. 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! ✨

Comment on lines +33 to +34
cy.get(`.react-datepicker__day--0${String(randomDay).padStart(2, '0')}:not(.react-datepicker__day--outside-month)`)
.click();

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();

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.

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