-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move majority of multidomain entry point into driver
- Loading branch information
1 parent
d7ced23
commit 2aafbb9
Showing
2 changed files
with
50 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import $Cypress from '../cypress' | ||
import $Cy from '../cypress/cy' | ||
import $Commands from '../cypress/commands' | ||
import $Log from '../cypress/log' | ||
|
||
export const initialize = (autWindow) => { | ||
const specWindow = { | ||
Error, | ||
} | ||
const Cypress = $Cypress.create({ | ||
browser: { | ||
channel: 'stable', | ||
displayName: 'Chrome', | ||
family: 'chromium', | ||
isChosen: true, | ||
isHeaded: true, | ||
isHeadless: false, | ||
majorVersion: 90, | ||
name: 'chrome', | ||
path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', | ||
version: '90.0.4430.212', | ||
}, | ||
}) | ||
const log = (...args) => { | ||
return Cypress.log.apply(Cypress, args) | ||
} | ||
const cy = $Cy.create(specWindow, Cypress, Cypress.Cookies, Cypress.state, Cypress.config, log) | ||
|
||
Cypress.log = $Log.create(Cypress, cy, Cypress.state, Cypress.config) | ||
Cypress.runner = { | ||
addLog () {}, | ||
} | ||
|
||
Cypress.state('window', autWindow) | ||
Cypress.state('document', autWindow.document) | ||
Cypress.state('runnable', { | ||
ctx: {}, | ||
clearTimeout () {}, | ||
resetTimeout () {}, | ||
timeout () {}, | ||
}) | ||
|
||
$Commands.create(Cypress, cy, Cypress.state) | ||
|
||
return { | ||
cy, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters