11import { expect } from '@vaadin/chai-plugins' ;
2- import { aTimeout , fixtureSync , nextFrame , nextRender , nextResize , oneEvent } from '@vaadin/testing-helpers' ;
2+ import { aTimeout , fixtureSync , nextFrame , nextRender , oneEvent } from '@vaadin/testing-helpers' ;
33import sinon from 'sinon' ;
44import '../src/vaadin-chart.js' ;
55
@@ -284,7 +284,7 @@ describe('vaadin-chart', () => {
284284
285285 it ( 'should update container height on chart resize' , async ( ) => {
286286 chart . style . width = '300px' ;
287- await oneEvent ( chart , 'chart-redraw ' ) ;
287+ await oneEvent ( chart , 'chart-end-resize ' ) ;
288288 const rect = chart . $ . chart . getBoundingClientRect ( ) ;
289289 expect ( rect . width ) . to . be . equal ( 300 ) ;
290290 expect ( chart . configuration . chartWidth ) . to . be . equal ( 300 ) ;
@@ -307,7 +307,7 @@ describe('vaadin-chart', () => {
307307
308308 it ( 'should update container height on chart resize' , async ( ) => {
309309 chart . style . height = '300px' ;
310- await oneEvent ( chart , 'chart-redraw ' ) ;
310+ await oneEvent ( chart , 'chart-end-resize ' ) ;
311311 const rect = chart . $ . chart . getBoundingClientRect ( ) ;
312312 expect ( rect . height ) . to . be . equal ( 300 ) ;
313313 expect ( chart . configuration . chartHeight ) . to . be . equal ( 300 ) ;
@@ -338,7 +338,7 @@ describe('vaadin-chart', () => {
338338 expect ( charts [ 1 ] . configuration . chartWidth ) . to . be . equal ( 500 ) ;
339339
340340 layout . style . width = '500px' ;
341- await nextResize ( charts [ 0 ] ) ;
341+ await oneEvent ( charts [ 0 ] , 'chart-end-resize' ) ;
342342
343343 expect ( layout . getBoundingClientRect ( ) . width ) . to . be . equal ( 500 ) ;
344344 expect ( charts [ 0 ] . configuration . chartWidth ) . to . be . equal ( 250 ) ;
@@ -351,7 +351,7 @@ describe('vaadin-chart', () => {
351351 expect ( charts [ 1 ] . configuration . chartHeight ) . to . be . equal ( 300 ) ;
352352
353353 layout . style . height = '200px' ;
354- await nextResize ( charts [ 0 ] ) ;
354+ await oneEvent ( charts [ 0 ] , 'chart-end-resize' ) ;
355355
356356 expect ( layout . getBoundingClientRect ( ) . height ) . to . be . equal ( 200 ) ;
357357 expect ( charts [ 0 ] . configuration . chartHeight ) . to . be . equal ( 200 ) ;
0 commit comments