Complete the code to set the viewport size for responsive testing in Cypress.
cy.viewport([1], 800);
Setting the viewport width to 375 simulates a common mobile device width, which is essential for responsive testing.
Complete the code to check if the navigation menu is visible on a small screen.
cy.get('nav').should('[1]');
The assertion be.visible checks if the navigation menu is shown on the screen, which is important for responsive layouts.
Fix the error in the code to test responsiveness by setting viewport to tablet size.
cy.viewport([1], 900);
The viewport width should be a number like 768 for tablets, not a string like 'tablet'.
Fill both blanks to assert that the footer is hidden on mobile and visible on desktop.
cy.viewport(375, 667); cy.get('footer').should('[1]'); cy.viewport(1280, 800); cy.get('footer').should('[2]');
On mobile (375 width), the footer should not be visible (not.be.visible), but on desktop (1280 width), it should be visible (be.visible).
Fill all three blanks to create a test that checks header text changes on different screen sizes.
cy.viewport([1], 600); cy.get('header h1').should('contain.text', [2]); cy.viewport([3], 900);
The test sets viewport to 375 for mobile, checks the header text for mobile greeting, then sets viewport to 1280 for desktop.