File tree 1 file changed +5
-4
lines changed
packages/@vue/cli-plugin-e2e-nightwatch/generator/template/test/e2e/custom-assertions
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 7
7
// For more information on custom assertions see:
8
8
// http://nightwatchjs.org/guide#writing-custom-assertions
9
9
10
- exports . assertion = function ( selector , count ) {
10
+ exports . assertion = function elementCount ( selector , count ) {
11
11
this . message = `Testing if element <${ selector } > has count: ${ count } `
12
12
this . expected = count
13
13
this . pass = val => val === count
14
14
this . value = res => res . value
15
- this . command = cb => this . api . execute ( function ( selector ) {
16
- return document . querySelectorAll ( selector ) . length
17
- } , [ selector ] , cb )
15
+ function evaluator ( _selector ) {
16
+ return document . querySelectorAll ( _selector ) . length
17
+ }
18
+ this . command = cb => this . api . execute ( evaluator , [ selector ] , cb )
18
19
}
You can’t perform that action at this time.
0 commit comments