📜  cypress 为所有测试用例设置视口 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.809000             🧑  作者: Mango

代码示例3
//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'"