Cypress · Junior · Question 41 of 75

What does cy.viewport('iphone-x') do?

Show the answer

Correct answer: Sets the window size to that device preset

Explanation

It changes the size only. It doesn't emulate the iOS browser engine or touch behaviour fully.

Further reading

Problem with a question

Cypress · Junior · question 41

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz