File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { commands } from './'
2
2
3
3
commands . forEach ( ( { name, command} ) => {
4
- Cypress . Commands . add ( name , command . bind ( null , cy ) )
4
+ Cypress . Commands . add ( name , command )
5
5
} )
6
6
7
- /* global Cypress, cy */
7
+ /* global Cypress */
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const defaults = {
8
8
const commands = Object . keys ( queries ) . map ( queryName => {
9
9
return {
10
10
name : queryName ,
11
- command : ( cy , ...args ) => {
11
+ command : ( ...args ) => {
12
12
const lastArg = args [ args . length - 1 ]
13
13
const waitOptions = ( typeof lastArg === 'object' )
14
14
? Object . assign ( { } , defaults , lastArg )
@@ -67,4 +67,4 @@ const commands = Object.keys(queries).map(queryName => {
67
67
export { commands }
68
68
69
69
/* eslint no-new-func:0 */
70
- /* globals Cypress */
70
+ /* globals Cypress, cy */
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ function getFirstElement(jqueryOrElement) {
6
6
}
7
7
8
8
function getContainer ( container ) {
9
- const withinContainer = Cypress . cy . state ( 'withinSubject' )
9
+ const withinContainer = cy . state ( 'withinSubject' )
10
10
if ( withinContainer ) {
11
11
return getFirstElement ( withinContainer )
12
12
}
@@ -18,4 +18,4 @@ export {
18
18
getContainer ,
19
19
}
20
20
21
- /* globals Cypress */
21
+ /* globals Cypress, cy */
You can’t perform that action at this time.
0 commit comments