@revoloo/cypress6
Version:
Cypress.io end to end testing tool
34 lines (31 loc) • 814 B
HTML
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cypress</title>
<link rel="stylesheet" href="app.css" />
</head>
<body>
<div id="app"></div>
<script>
if (!!window.Cypress) {
window.env = 'test'
} else {
window.env = '<%= htmlWebpackPlugin.options.env %>'
}
if (window.env === 'development') {
// this allows React DevTools to work in an iframe
// (if we're in Cypress running our app)
__REACT_DEVTOOLS_GLOBAL_HOOK__ = parent.__REACT_DEVTOOLS_GLOBAL_HOOK__
}
</script>
<script src="app.js"></script>
<script>
// this allows us to control when the app starts from Cypress tests
// but starts it immediately if run outside of Cypress
if (!window.Cypress) {
App.start()
}
</script>
</body>
</html>