Verify navigation to previous and next sibling elements using cy.prev() and cy.next()
Preconditions (2)
Step 1: Open the web page with the list
Step 2: Locate the list item with text 'Item 2'
Step 3: Use cy.prev() to get the previous sibling element
Step 4: Verify the previous sibling's text is 'Item 1'
Step 5: Use cy.next() to get the next sibling element
Step 6: Verify the next sibling's text is 'Item 3'
✅ Expected Result: The test should confirm that the previous sibling of 'Item 2' is 'Item 1' and the next sibling is 'Item 3', passing all assertions.