Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

68
Views
Cypress runner loading mobile site instead of desktop site

I am opening the website https://www.vangoghmuseum.nl/nl with cy.visit().

However, the cypress runner is opening the mobile website instead of the desktop website.

Any ideas why and how to change this behavior?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The mobile setting seem to be more like tablet size settings.

You can control the viewport before visiting

it('opens van gogh', () => {
  cy.viewport(1800,1000)
  cy.visit('https://www.vangoghmuseum.nl/nl');    // large screen layout
});

If you open devtools to the right and resize, you will see the breakpoint is around 1025 px wide.

Cypress viewport defaults to 1000 px, so you get the small-screen layout.


If you look at one of the <article> elements, it has breakpoint styling of

@media only screen and (min-width: 64em)

which equates to 1024px for the default pixel size of 16px.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!