-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: refactor cy funcs #19080
Merged
jennifer-shehane
merged 24 commits into
cypress-io:develop
from
sainthkh:refactor-cy-funcs
Dec 8, 2021
Merged
chore: refactor cy funcs #19080
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
b24618f
move state('specWindow'), warnMixingPromisesAndCommands
sainthkh 157e60d
move isCy, runnableCtx, urlNavigationEvent
sainthkh 84ff477
Queue, CommandQueue.
sainthkh 16413d4
fix failures.
sainthkh 199fe2a
move queue
sainthkh ad14e42
isStopped, contentWindowListeners.
sainthkh 932501d
enqueue, getCommandsUntilFirstParentOrValidSubject
sainthkh e0d97bd
fix failures.
sainthkh 5aea317
pushSubjectAndValidatel, doneEarly
sainthkh acd429d
initialize
sainthkh e70b8da
fix failures.
sainthkh 64e2599
stop, reset
sainthkh 8e5c30c
addCommandSync addChainer addCommand now
sainthkh 8d1caa4
replayCommandsFrom
sainthkh 51d5515
onBeforeAppWindowLoad
sainthkh 981ad75
bind public functions.
sainthkh 15d15bd
onUncaughtException
sainthkh e35af20
fix error.
sainthkh abd2037
fix error.
sainthkh e7ae213
setRunnable
sainthkh 45807fa
remove create + private
sainthkh 7ed0d70
Remove TODO comment.
sainthkh 1e418ea
Merge branch 'develop' into refactor-cy-funcs
emilyrohrbough 65a64d7
Merge branch 'develop' into refactor-cy-funcs
davidmunechika File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ import browserInfo from './cypress/browser' | |
import $scriptUtils from './cypress/script_utils' | ||
|
||
import $Commands from './cypress/commands' | ||
import $Cy from './cypress/cy' | ||
import { $Cy } from './cypress/cy' | ||
import $dom from './dom' | ||
import $Downloads from './cypress/downloads' | ||
import $errorMessages from './cypress/error_messages' | ||
|
@@ -209,12 +209,8 @@ class $Cypress { | |
// or parsed. we have not received any custom commands | ||
// at this point | ||
onSpecWindow (specWindow, scripts) { | ||
const logFn = (...args) => { | ||
return this.log.apply(this, args) | ||
} | ||
|
||
// create cy and expose globally | ||
this.cy = $Cy.create(specWindow, this, this.Cookies, this.state, this.config, logFn) | ||
this.cy = new $Cy(specWindow, this, this.Cookies, this.state, this.config) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For curious reviewers, logFn isn't used by the constructor (or even the create function at this point) so it's safe to omit. |
||
window.cy = this.cy | ||
this.isCy = this.cy.isCy | ||
this.log = $Log.create(this, this.cy, this.state, this.config) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the internal class is
$Cy
, notCy
.