79610733

Date: 2025-05-07 14:13:32
Score: 2.5
Natty:
Report link

As you want to hover on User 2, not User 3, i think you should select the second avatar and corresponding tooltip ?

describe('Mouse Hover', () => {                           
  it('should display tooltip for User 2 on hover', () => {
    cy.visit('https://www.stackoverflow.com/hovers'); //Please change the website url here. As i shouldn't spam this chat using other webiste urls.
    
    cy.get('.figure').eq(1).trigger('mouseover');

    cy.get('.figure').eq(1).find('.figcaption').should('be.visible');
    cy.get('.figure').eq(1).find('h5').should('contain.text', 'name: user2');
    
    cy.get('.figure').eq(1).find('a').click();
    cy.url().should('include', '/users/2');
  });
});
Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Omprakash S