Files
cypress/system-tests/test/block_hosts_spec.js
T
Alejandro Estrada 5d52758d82 feat: validate specPattern root level (#19980)
* feat: validate specPattern root level

* Fix/add tests

* Fix test

* Update specExcludePattern

* Fix tests

* Fix/add tests

* Fix/add tests

* Fix tests

* Rename specExcludePattern to excludeSpecPattern

* Fix tests
2022-02-04 10:48:10 -05:00

42 lines
772 B
JavaScript

const systemTests = require('../lib/system-tests').default
const onServer = function (app) {
app.get('/', (req, res) => {
return res.send('<html>hi there</html>')
})
app.get('/req', (req, res) => {
return res.sendStatus(200)
})
return app.get('/status', (req, res) => {
return res.sendStatus(503)
})
}
describe('e2e blockHosts', () => {
systemTests.setup({
servers: [{
port: 3131,
onServer,
}, {
port: 3232,
onServer,
}],
settings: {
blockHosts: 'localhost:3131',
video: false,
e2e: {
baseUrl: 'http://localhost:3232',
},
},
})
it('passes', function () {
return systemTests.exec(this, {
spec: 'block_hosts.cy.js',
snapshot: true,
})
})
})