Verify parent and children elements using cy.parent() and cy.children()
Preconditions (2)
Step 1: Visit the web page at 'http://localhost:3000/menu'.
Step 2: Locate the <ul> element with id 'menu'.
Step 3: Use cy.children() on the <ul> element to get all <li> children.
Step 4: Assert that there are exactly 3 <li> children.
Step 5: Select the first <li> child and use cy.parent() to get its parent element.
Step 6: Assert that the parent element has id 'menu'.
✅ Expected Result: The test confirms that the <ul> element has exactly 3 <li> children and that the parent of the first <li> is the <ul> with id 'menu'.