diff --git a/cypress/integration/home_page_spec.js b/cypress/integration/home_page_spec.js index 93e456d..9b20ff6 100644 --- a/cypress/integration/home_page_spec.js +++ b/cypress/integration/home_page_spec.js @@ -1,7 +1,11 @@ describe("The Home Page", function() { it("successfully loads", function() { - cy.visit("/").scrollTo('bottom'); - cy.pause(); - cy.get('#ScrollToTopWC').click(); + cy.visit("/").scrollTo("bottom", { duration: 1000 }); + + cy.contains("top").click(); + + cy.window().then($window => { + expect($window.scrollY).to.be.closeTo(0, 30); + }); }); }); diff --git a/demo/index.html b/demo/index.html index ad1a3b9..b584797 100644 --- a/demo/index.html +++ b/demo/index.html @@ -41,22 +41,20 @@ margin: 1rem; } - body, - html { - scroll-behavior: smooth; - } +