@@ -63,7 +63,7 @@ configs().forEach(({ title, screenshot, config }) => {
6363 } ) ;
6464 } ) ;
6565 test . describe ( 'input click behaviors' , ( ) => {
66- test ( 'should not have visual regressions' , async ( { page } ) => {
66+ test ( 'should not have visual regressions when user double clicks ' , async ( { page } ) => {
6767 await page . setContent (
6868 `
6969 <ion-input
@@ -75,15 +75,12 @@ configs().forEach(({ title, screenshot, config }) => {
7575 config
7676 ) ;
7777 const input = page . locator ( 'ion-input' ) ;
78- input . dblclick ( ) ;
78+ const nativeInput = input . locator ( 'input' ) ;
79+ await nativeInput . dblclick ( ) ;
7980 // Validates the display of an input with a clear button.
8081 await expect ( input ) . toHaveScreenshot ( screenshot ( `input-dbclick` ) ) ;
8182 } ) ;
82- test ( 'should not have visual regressions with stacked label' , async ( { page, browserName } ) => {
83- if ( browserName === 'firefox' ) {
84- //TODO: Figure out why it's not working for firefox
85- test . skip ( ) ;
86- }
83+ test ( 'should not have visual regressions with stacked label when user double clicks' , async ( { page, browserName } ) => {
8784 await page . setContent (
8885 `
8986 <ion-input
@@ -96,7 +93,8 @@ configs().forEach(({ title, screenshot, config }) => {
9693 config
9794 ) ;
9895 const input = page . locator ( 'ion-input' ) ;
99- input . dblclick ( ) ;
96+ const nativeInput = input . locator ( 'input' ) ;
97+ await nativeInput . dblclick ( ) ;
10098 // Validates the display of an input with a clear button.
10199 await expect ( input ) . toHaveScreenshot ( screenshot ( `input-dbclick-stacked` ) ) ;
102100 } ) ;
@@ -224,11 +222,7 @@ configs({ modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
224222 await expect ( container ) . toHaveScreenshot ( screenshot ( `input-clear-button-focused` ) ) ;
225223 } ) ;
226224
227- test ( 'should not have visual regressions when user dbclicks' , async ( { page, browserName } ) => {
228- if ( browserName === 'firefox' || browserName === 'webkit' ) {
229- //TODO: Figure out why it's not working for webkit & firefox
230- test . skip ( ) ;
231- }
225+ test ( 'should not have visual regressions when user double clicks' , async ( { page, browserName } ) => {
232226 await page . setContent (
233227 `
234228 <ion-input
@@ -241,8 +235,8 @@ configs({ modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
241235 config
242236 ) ;
243237 const input = page . locator ( 'ion-input' ) ;
244- await input . dblclick ( ) ;
245- await page . waitForChanges ( ) ;
238+ const nativeInput = input . locator ( 'input' ) ;
239+ await nativeInput . dblclick ( ) ;
246240 await expect ( input ) . toHaveScreenshot ( screenshot ( `input-dbclick` ) ) ;
247241 } ) ;
248242 } ) ;
0 commit comments