Skip to content

Commit 6b66dcb

Browse files
authored
fix(ci): cypress ci issue (element-plus#5289)
- Replace localhost with 127.0.0.1 - Add feature flag for headless Chrome
1 parent 53b4cee commit 6b66dcb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cypress.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"video": false,
3-
"baseUrl": "http://localhost:5001/en-US/"
3+
"baseUrl": "http://127.0.0.1:5001/en-US/"
44
}

cypress/plugins/index.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@
1717
* @type {Cypress.PluginConfig}
1818
*/
1919
// eslint-disable-next-line no-unused-vars
20-
module.exports = (_on, _config) => {
20+
module.exports = (on, _config) => {
21+
on('before:browser:launch', (browser = {}, args) => {
22+
if (browser.name === 'chrome') {
23+
// ^ make sure this is your browser name, you may
24+
// be using 'canary' or 'chromium' for example, so change it to match!
25+
args.push('--proxy-bypass-list=<-loopback>')
26+
return args
27+
}
28+
})
2129
// `on` is used to hook into various events Cypress emits
2230
// `config` is the resolved Cypress config
2331
}

0 commit comments

Comments
 (0)