@@ -6,13 +6,15 @@ import {
66 _registerHook ,
77} from '@ember/test-helpers' ;
88import { buildInstrumentedElement , insertElement } from '../../helpers/events' ;
9- import { isIE11 } from '../../helpers/browser-detect' ;
9+ import { isIE11 , isFirefox } from '../../helpers/browser-detect' ;
1010import hasEmberVersion from '@ember/test-helpers/has-ember-version' ;
1111
1212let clickSteps = [ 'focus' , 'focusin' , 'input' , 'change' ] ;
1313
1414if ( isIE11 ) {
1515 clickSteps = [ 'focusin' , 'input' , 'change' , 'focus' ] ;
16+ } else if ( isFirefox ) {
17+ clickSteps . push ( 'selectionchange' ) ;
1618}
1719
1820module ( 'DOM Helper: fillIn' , function ( hooks ) {
@@ -226,7 +228,8 @@ module('DOM Helper: fillIn', function (hooks) {
226228 await setupContext ( context ) ;
227229 await fillIn ( element , 'foo' ) ;
228230
229- assert . verifySteps ( clickSteps ) ;
231+ // For this specific case, Firefox does not emit `selectionchange`.
232+ assert . verifySteps ( clickSteps . filter ( ( s ) => s !== 'selectionchange' ) ) ;
230233 assert . strictEqual (
231234 document . activeElement ,
232235 element ,
@@ -255,7 +258,8 @@ module('DOM Helper: fillIn', function (hooks) {
255258 await setupContext ( context ) ;
256259 await fillIn ( `#${ element . id } ` , '' ) ;
257260
258- assert . verifySteps ( clickSteps ) ;
261+ // For this specific case, Firefox does not emit `selectionchange`.
262+ assert . verifySteps ( clickSteps . filter ( ( s ) => s !== 'selectionchange' ) ) ;
259263 assert . strictEqual (
260264 document . activeElement ,
261265 element ,
0 commit comments