@@ -56,9 +56,8 @@ describe('IgxGrid Master Detail #grid', () => {
5656 expect ( grid . rowList . length ) . toEqual ( expandIcons . length ) ;
5757 } ) ;
5858
59- it ( 'Should correctly expand a basic detail view, update expansionStates and the context provided should be correct' , async ( ) => {
59+ it ( 'Should correctly expand a basic detail view, update expansionStates and the context provided should be correct' , ( ) => {
6060 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
61- await wait ( ) ;
6261 fix . detectChanges ( ) ;
6362
6463 const firstRowIconName = GridFunctions . getRowExpandIconName ( grid . rowList . first ) ;
@@ -70,9 +69,8 @@ describe('IgxGrid Master Detail #grid', () => {
7069 expect ( getDetailAddressText ( firstRowDetail ) ) . toEqual ( 'Obere Str. 57' ) ;
7170 } ) ;
7271
73- it ( 'Should render a detail view with dynamic elements and they should be clickable/focusable.' , async ( ) => {
72+ it ( 'Should render a detail view with dynamic elements and they should be clickable/focusable.' , ( ) => {
7473 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
75- await wait ( ) ;
7674 fix . detectChanges ( ) ;
7775
7876 const firstDetail = GridFunctions . getMasterRowDetailDebug ( fix , grid . rowList . first ) ;
@@ -102,7 +100,6 @@ describe('IgxGrid Master Detail #grid', () => {
102100 it ( `Should persist state of rendered templates, such as expansion state of expansion panel,
103101 checkbox state, etc. after scrolling them in and out of view.` , ( async ( ) => {
104102 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
105- await wait ( ) ;
106103 fix . detectChanges ( ) ;
107104
108105 let firstDetail = GridFunctions . getMasterRowDetailDebug ( fix , grid . rowList . first ) ;
@@ -144,9 +141,8 @@ describe('IgxGrid Master Detail #grid', () => {
144141 } ) ) ;
145142
146143 it ( `Should persist state of rendered templates, such as expansion state of expansion panel,
147- checkbox state, etc. after scrolling them in and out of view.` , async ( ) => {
144+ checkbox state, etc. after scrolling them in and out of view.` , ( ) => {
148145 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
149- await wait ( ) ;
150146 fix . detectChanges ( ) ;
151147
152148 let firstRowDetail = GridFunctions . getMasterRowDetailDebug ( fix , grid . rowList . first ) ;
@@ -163,11 +159,9 @@ describe('IgxGrid Master Detail #grid', () => {
163159 fix . detectChanges ( ) ;
164160
165161 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
166- await wait ( ) ;
167162 fix . detectChanges ( ) ;
168163
169164 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
170- await wait ( ) ;
171165 fix . detectChanges ( ) ;
172166
173167 firstRowDetail = GridFunctions . getMasterRowDetailDebug ( fix , grid . rowList . first ) ;
@@ -397,6 +391,9 @@ describe('IgxGrid Master Detail #grid', () => {
397391 const row = grid . getRowByIndex ( 6 ) as IgxGridRowComponent ;
398392 const targetCellElement = grid . getCellByColumn ( 6 , 'ContactName' ) ;
399393
394+ targetCellElement . onFocus ( null ) ;
395+ fix . detectChanges ( ) ;
396+
400397 GridFunctions . simulateCellKeydown ( targetCellElement , 'ArrowDown' ) ;
401398 await wait ( ) ;
402399 fix . detectChanges ( ) ;
@@ -536,6 +533,7 @@ describe('IgxGrid Master Detail #grid', () => {
536533 await wait ( DEBOUNCETIME ) ;
537534 fix . detectChanges ( ) ;
538535 await wait ( DEBOUNCETIME ) ;
536+ fix . detectChanges ( ) ;
539537
540538 expect ( row . expanded ) . toBeFalsy ( ) ;
541539 targetCellElement = grid . getCellByColumn ( 52 , 'ContactName' ) ;
@@ -546,6 +544,7 @@ describe('IgxGrid Master Detail #grid', () => {
546544 await wait ( DEBOUNCETIME ) ;
547545 fix . detectChanges ( ) ;
548546 await wait ( DEBOUNCETIME ) ;
547+ fix . detectChanges ( ) ;
549548
550549 expect ( row . expanded ) . toBeTruthy ( ) ;
551550 targetCellElement = grid . getCellByColumn ( 52 , 'ContactName' ) ;
@@ -987,7 +986,6 @@ describe('IgxGrid Master Detail #grid', () => {
987986 grid = fix . componentInstance . grid ;
988987
989988 GridFunctions . toggleMasterRow ( fix , grid . rowList . first ) ;
990- await wait ( ) ;
991989 fix . detectChanges ( ) ;
992990 } ) ;
993991
@@ -1012,7 +1010,7 @@ describe('IgxGrid Master Detail #grid', () => {
10121010 } ) ;
10131011
10141012 it ( `Should navigate down through a detail view by focusing the whole row and continuing
1015- onto the next with arrow down in multi-row layout grid.` , ( ) => {
1013+ onto the next with arrow down in multi-row layout grid.` , async ( ) => {
10161014 let targetCellElement = grid . getCellByColumn ( 0 , 'ContactName' ) ;
10171015 GridFunctions . simulateCellKeydown ( targetCellElement , 'ArrowDown' ) ;
10181016 fix . detectChanges ( ) ;
@@ -1027,16 +1025,18 @@ describe('IgxGrid Master Detail #grid', () => {
10271025 expect ( document . activeElement ) . toBe ( firstRowDetail ) ;
10281026
10291027 GridFunctions . simulateDetailKeydown ( grid , grid . rowList . first , 'ArrowDown' ) ;
1028+ await wait ( ) ;
10301029 fix . detectChanges ( ) ;
10311030
10321031 targetCellElement = grid . getCellByColumn ( 2 , 'CompanyName' ) ;
10331032 expect ( targetCellElement . focused ) . toBeTruthy ( ) ;
10341033 } ) ;
10351034
10361035 it ( `Should navigate up through a detail view by
1037- focusing the whole row and continuing onto the next with arrow up in multi-row layout grid.` , ( ) => {
1036+ focusing the whole row and continuing onto the next with arrow up in multi-row layout grid.` , async ( ) => {
10381037 let targetCellElement = grid . getCellByColumn ( 2 , 'ContactName' ) ;
10391038 GridFunctions . simulateCellKeydown ( targetCellElement , 'ArrowUp' ) ;
1039+ await wait ( ) ;
10401040 fix . detectChanges ( ) ;
10411041
10421042 targetCellElement = grid . getCellByColumn ( 2 , 'CompanyName' ) ;
0 commit comments