A new website has been constructed using a combination of Vue/Nuxt and includes SSR, with links located in the footer.
During testing, it was discovered that although the link is present and visible, when attempting to click on it, the error message click()
indicates that the link is not in the view.
Subsequent investigation revealed that after the failed attempt to click the link, it can be manually scrolled into view.
What factors might lead to the link not being automatically scrolled into view?
it('About us page', () => {
cy.visit('https://test.fooddocs.ee');
cy.url().should('include', 'https://test.fooddocs.ee');
cy.get('footer.page-footer').within(() => {
cy.get('a')
.contains('About us')
.should('be.visible')
.should('have.attr', 'href', '/about')
.click();
});
cy.url().should('include', siteUrl + '/about');
cy.get('main h1').should('contain', 'Our team');
});