File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/@vue/cli-plugin-e2e-nightwatch/generator/template/test/e2e/custom-assertions Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 77// For more information on custom assertions see:
88// http://nightwatchjs.org/guide#writing-custom-assertions
99
10- exports . assertion = function ( selector , count ) {
10+ exports . assertion = function elementCount ( selector , count ) {
1111 this . message = `Testing if element <${ selector } > has count: ${ count } `
1212 this . expected = count
1313 this . pass = val => val === count
1414 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 )
1819}
You can’t perform that action at this time.
0 commit comments