Today is my first day using cypress and I encountered a scenario where I need to test the display of a simple element on mobile, tablet, or desktop.
I tried changing the viewport with a method that seems to work, but unfortunately, the config doesn't update.
cy.log("viewport");
cy.log(""+Cypress.config().viewportWidth) // logs 1000
cy.viewport(preset)
cy.log(""+Cypress.config().viewportWidth) // still logs 1000
It seems like config() remains as the default configuration and does not get updated by the viewport method. Is there a way to retrieve the current viewport?