File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ const tableWrapper = wrapper.findTable();
2121// All the columns fit in the viewport, which make it easier to test the columns' widths
2222const defaultScreen = { width : 1680 , height : 800 } ;
2323
24+ function delay ( ) {
25+ return new Promise ( resolve => setTimeout ( resolve ) ) ;
26+ }
27+
2428class TablePage extends BasePageObject {
2529 async resizeColumn ( columnIndex : number , xOffset : number ) {
2630 const resizerSelector = tableWrapper . findColumnResizer ( columnIndex ) . toSelector ( ) ;
@@ -46,7 +50,7 @@ class TablePage extends BasePageObject {
4650
4751 async getColumnWidth ( columnIndex : number ) {
4852 const columnSelector = tableWrapper . findColumnHeaders ( ) . get ( columnIndex ) . toSelector ( ) ;
49- const element = await this . browser . $ ( columnSelector ) ;
53+ const element = this . browser . $ ( columnSelector ) ;
5054 const size = await element . getSize ( ) ;
5155 return size . width ;
5256 }
@@ -345,6 +349,7 @@ test(
345349 await page . resizeColumn ( 2 , 100 ) ;
346350 const oldWidth = await page . getColumnWidth ( 2 ) ;
347351 await page . click ( '#reset-state' ) ;
352+ await delay ( ) ;
348353 const newWidth = await page . getColumnWidth ( 2 ) ;
349354 expect ( oldWidth ) . toEqual ( newWidth ) ;
350355 } )
You can’t perform that action at this time.
0 commit comments