mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-06 23:29:51 -06:00
- fixes #1264 - fixes #1321 - fixes #1799 - fixes #2689 - fixes #2688 - fixes #2687 - fixes #2686
28 lines
735 B
JavaScript
28 lines
735 B
JavaScript
const { oneLine } = require('common-tags')
|
|
|
|
module.exports = {
|
|
partial (domain) {
|
|
return oneLine`
|
|
<script type='text/javascript'>
|
|
document.domain = '${domain}';
|
|
</script>
|
|
`
|
|
},
|
|
|
|
full (domain) {
|
|
return oneLine`
|
|
<script type='text/javascript'>
|
|
document.domain = '${domain}';
|
|
|
|
var Cypress = window.Cypress = parent.Cypress;
|
|
|
|
if (!Cypress) {
|
|
throw new Error('Something went terribly wrong and we cannot proceed. We expected to find the global Cypress in the parent window but it is missing!. This should never happen and likely is a bug. Please open an issue!');
|
|
};
|
|
|
|
Cypress.action('app:window:before:load', window);
|
|
</script>
|
|
`
|
|
},
|
|
}
|