@@ -272,18 +272,18 @@ test('Should only bottomRight is resizable and call onResizeStart when mousedown
272
272
expect ( onResizeStart . getCall ( 0 ) . args [ 1 ] ) . toBe ( 'bottomRight' ) ;
273
273
} ) ;
274
274
275
- // TODO: This test is so flaky.
276
- // test('Should not begin resize when onResizeStart returns false', async ({ mount, page } ) => {
277
- // const onResizeStart = () => {
278
- // return false ;
279
- // } ;
280
- // const onResize = spy( );
281
- // const resizable = await mount(<Resizable onResizeStart={onResizeStart} onResize={onResize} /> );
282
- // const divs = resizable.locator('div ');
283
- // await (await divs.all())[1].dispatchEvent('mousedown' );
284
- // await page.mouse.move(100, 200 );
285
- // expect(onResize.callCount).toBe(0);
286
- // });
275
+ test ( 'Should not begin resize when onResizeStart returns false' , async ( { mount , page } ) => {
276
+ const onResizeStart = ( ) => {
277
+ return false ;
278
+ } ;
279
+ const onResize = spy ( ) ;
280
+ const resizable = await mount ( < Resizable onResizeStart = { onResizeStart } onResize = { onResize } /> ) ;
281
+ const divs = resizable . locator ( 'div' ) ;
282
+ await ( await divs . all ( ) ) [ 1 ] . dispatchEvent ( 'mousedown ') ;
283
+ await page . mouse . move ( 100 , 200 ) ;
284
+ await page . mouse . up ( ) ;
285
+ expect ( onResize . callCount ) . toBe ( 0 ) ;
286
+ } ) ;
287
287
288
288
// test('should call onResize with expected args when resize direction right', async ({ mount, page }) => {
289
289
// const onResize = spy();
0 commit comments