Website is supposed to work only on Mobile web (Shows error message on desktop web), trying to automate the same using cypress viewport.
Manual Test steps: In chrome, We are launching an URL in desktop web application, application display error page. Then change to chrome emulator mode, refresh the application, actual page will be displayed.
Automating using cypress: launching an application, minimizing to mobile view, reloading the application.
expecting, After reloading the page, actual application page should be displayed in the mobile view but error page is displaying in the mobile.
My code looks like below
cy.visit('url')
cy.viewport('iphone-6')
cy.wait(200)
Could anyone help on this?