// Set zoom and/or pan together, emitting once
cy.viewport(opts: { zoom?: number; pan?: Position }): thisSet zoom and/or pan together, emitting once.
| Name | Description |
|---|---|
opts: { zoom?: number; pan?: Position } | the |
Fields of opts
| Name | Description |
|---|---|
zoom: number? | |
pan: Position? |
Returns
thisthis core, for chaining
Example
cy.viewport({ zoom: 2, pan: { x: 40, y: 20 } });console.log(cy.zoom()); // 2