I'm building a React app and I'm testing it with Cypress and React Testing library.
I was wondering: How can I test the app "on mobile". Meaning how can I write tests for the app that run if the window size is below the breakpoint? I couldn't find anything about that in the respective packages documentation.
You may need to check this page - https://docs.cypress.io/api/commands/viewport.html
You can control the size and orientation of the screen for your application. There are also preset dimensions available already for various devices,
Preset width height
Just need to pass cy.viewport('iphone-6')
which will set the viewport to 375px x 667px. Hope this helps.