Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

cypress set viewport

//add this in cypress.json
{  
  "viewportWidth": 1280,
  "viewportHeight": 720
}
Comment

cypress support ability to set viewport in `before`

// pass viewport in cmd, this will over ride settings in cypress.json

"script_name": "./node_modules/.bin/cypress run --browser chrome --config viewportWidth=414,viewportHeight=896 --spec 'cypress/integration/file_name.js'"
      
Comment

cypress set viewport

//for all test files, add this in cypress.json
{  
  "viewportWidth": 1280,
  "viewportHeight": 720
}
//for individual file(applies for all test cases inside this file)
//add a script in package.json

"script_name": "./node_modules/.bin/cypress run --browser chrome --config viewportWidth=414,viewportHeight=896 --spec 'cypress/integration/file_name.js'"
      
Comment

PREVIOUS NEXT
Code Example
Javascript :: react-native resource android:attr/lStar not found in Android 
Javascript :: how to start react project 
Javascript :: regex detect negative numbers 
Javascript :: json server 
Javascript :: remove border on modal material ui 
Javascript :: javascript open new window and pass data 
Javascript :: component unmount useeffect 
Javascript :: how to print numbers in javascript 
Javascript :: get browser timezone 
Javascript :: js when key is pressed 
Javascript :: too many open files react native 
Javascript :: scroll to bottom of div javascript 
Javascript :: angular timestamp 
Javascript :: store array in localstorage 
Javascript :: ERR_REQUIRE_ESM 
Javascript :: comma in price js 
Javascript :: checkbox on click jquery 
Javascript :: js string contains substring ignore case 
Javascript :: javascript phone number mask 
Javascript :: lodash find object in array 
Javascript :: loop an array in javascript 
Javascript :: javascript display max amount of characters 
Javascript :: javascript confirm delete 
Javascript :: get total height of page javascript 
Javascript :: node-json-db example 
Javascript :: return index of array with function in array angular 
Javascript :: How to add and play sounds in JS 
Javascript :: moment js year only 
Javascript :: immediately invoked function in javascript 
Javascript :: react detect screen size 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =