describe('template spec', () => { beforeEach(() => { cy.visit('./../scroll-to-top.html') }) it('Apparition button scroll top', () => { cy.scrollTo('bottom') cy.get('div.fixed[ x-data ]').should('be.visible') }) it('Retour en haut et disparition du bouton scroll top', () => { cy.scrollTo('bottom') cy.get('div.fixed[ x-data ]').should('be.visible') cy.get('div.fixed[ x-data ] button').click() cy.window().its('scrollY').should('eq', 0) cy.get('div.fixed[ x-data ]').should('not.be.visible') }) })