@@ -15,7 +15,7 @@ import { dblclick, flushGrid, getContainerCell } from '@vaadin/grid-pro/test/hel
1515describe ( 'grid-pro custom editor' , ( ) => {
1616 let grid , cell ;
1717
18- function createGrid ( path , autoOpen = false ) {
18+ function createGrid ( path ) {
1919 grid = fixtureSync ( `
2020 <vaadin-grid-pro>
2121 <vaadin-grid-pro-edit-column path="${ path } " editor-type="custom"></vaadin-grid-pro-edit-column>
@@ -25,9 +25,9 @@ describe('grid-pro custom editor', () => {
2525 const column = grid . querySelector ( `[path="${ path } "]` ) ;
2626 switch ( path ) {
2727 case 'date' :
28- column . editModeRenderer = ( root , _ , model ) => {
28+ column . editModeRenderer = ( root , column , model ) => {
2929 root . innerHTML = `
30- <vaadin-date-picker value="${ model . item . date } " ${ ! autoOpen ? 'auto-open-disabled' : '' } ></vaadin-date-picker>
30+ <vaadin-date-picker value="${ model . item . date } " ${ ! column . autoOpen ? 'auto-open-disabled' : '' } ></vaadin-date-picker>
3131 ` ;
3232 } ;
3333 break ;
@@ -175,8 +175,8 @@ describe('grid-pro custom editor', () => {
175175
176176 beforeEach ( async ( ) => {
177177 await setViewport ( { width : 420 , height : 1020 } ) ;
178- grid = createGrid ( 'date' , true ) ;
179- await nextRender ( ) ;
178+ // Do not set auto-open-disabled on the date-picker
179+ grid . querySelector ( 'vaadin-grid-pro-edit-column' ) . autoOpen = true ;
180180 cell = getContainerCell ( grid . $ . items , 0 , 0 ) ;
181181 await sendMouse ( { type : 'click' , position : [ 10 , 10 ] } ) ;
182182 } ) ;
@@ -215,7 +215,7 @@ describe('grid-pro custom editor', () => {
215215 const datePicker = cell . _content . querySelector ( 'vaadin-date-picker' ) ;
216216 await untilOverlayRendered ( datePicker ) ;
217217
218- sendMouse ( { type : 'click' , position : [ 10 , 10 ] } ) ;
218+ await sendMouse ( { type : 'click' , position : [ 10 , 10 ] } ) ;
219219 await nextRender ( ) ;
220220 expect ( cell . _content . querySelector ( 'vaadin-date-picker' ) ) . to . not . be . ok ;
221221 expect ( previousContent ) . to . be . equal ( cell . _content . textContent ) ;
0 commit comments