Verify form fields inside a specific section using cy.within()
Preconditions (2)
Step 1: Locate the section with id 'user-form'
Step 2: Within this section, find the input field with name 'firstName' and type 'John'
Step 3: Within this section, find the input field with name 'lastName' and type 'Doe'
Step 4: Within this section, click the submit button with type 'submit'
Step 5: Verify that a success message with id 'success-msg' is visible
✅ Expected Result: The form fields inside the 'user-form' section accept input and the form submits successfully showing the success message