Skip to content
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

Fix the type of $$. #6327

Merged
merged 2 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ declare namespace Cypress {
* @example
* cy.$$('p')
*/
$$: JQueryStatic
$$<TElement extends Element = HTMLElement>(selector: JQuery.Selector, context?: Element | Document | JQuery): JQuery<TElement>
}

interface SinonSpyAgent<A extends sinon.SinonSpy> {
Expand Down
6 changes: 6 additions & 0 deletions cli/types/tests/chainer-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,3 +456,9 @@ cy.writeFile('../file.path', '', {
cy.get('foo').click()
cy.get('foo').rightclick()
cy.get('foo').dblclick()

// cy.$$() is not jQuery(). It only queries.
// $ExpectError
cy.$$.escapeSelector
cy.$$('.warning')
cy.$$('.warning', cy.$$('.notice'))