Hovering on the video doesn't play the video. Clicking on the video opens a new tab

Current behavior
Hovering on a video tile doesn’t play the video as expected
Clicking on the video opens a new tab (Expected to open the video player on the same screen)

Desired behavior
Hovering on a video should play the video
Clicking on the video should open up the video player and video should play

Test code to reproduce
Hovering on a video should play the video

const urls = [`https://cat-press.com/cat-movies/firework`]
  urls.forEach((url) => {
    it(`Should load the videos and autoplay one: ${url}`, () => {
      cy.visit(url)
      // Scroll to feed
      cy.get('.cy-grid').scrollIntoView()
      // Should hover over to the video at index 1
      cy.get(`.cy-thumbnail-link`).eq(1).trigger('mouseover')
     
    })
  })

Clicking on the video opens a new tab (Expected to open the video player on the same screen)

const urls = [`https://cat-press.com/cat-movies/firework`]
  urls.forEach((url) => {
    it(`Should load the videos and autoplay one: ${url}`, () => {
      cy.visit(url)
      // Scroll to feed
      cy.get('.cy-grid').scrollIntoView()
      // Should hover over to the video at index 1
      cy.get(`.cy-thumbnail-link`).eq(1).trigger('click')
     
    })
  })

enter image description here

updated the reproducible example in

https://github.com/cypress-io/cypress-test-tiny/tree/opens-new-tab

119 thoughts on “Hovering on the video doesn't play the video. Clicking on the video opens a new tab”

Leave a Comment