11import { createScreenshotsComparer } from 'devextreme-screenshot-comparer' ;
2- import { Selector as $ , ClientFunction } from 'testcafe' ;
2+ import { Selector , ClientFunction } from 'testcafe' ;
33import { runManualTest } from '../../../utils/visual-tests/matrix-test-helper' ;
44import { testScreenshot } from '../../../utils/visual-tests/helpers/theme-utils' ;
55
@@ -14,12 +14,12 @@ fixture('FileUploader.CustomDropzone')
1414runManualTest ( 'FileUploader' , 'CustomDropzone' , ( test ) => {
1515 const triggerDragEnter = async ( dropZoneSelector , items ) => {
1616 await ClientFunction ( ( ) => {
17+ // @ts -expect-error $ is not typed
1718 const $dropZone = $ ( dropZoneSelector ) ;
18- // @ts -expect-error Selector.offset is not typed
1919 const { left, top } = $dropZone . offset ( ) ;
20- // @ts -expect-error Selector.trigger is not typed
20+ // @ts -expect-error $ is not typed
2121 $dropZone . trigger ( $ . Event ( 'dragenter' , {
22- // @ts -expect-error Selector.Event is not typed
22+ // @ts -expect-error $ is not typed
2323 originalEvent : $ . Event ( 'dragenter' , {
2424 dataTransfer : {
2525 items,
@@ -35,13 +35,13 @@ runManualTest('FileUploader', 'CustomDropzone', (test) => {
3535 test ( 'dropzone-active class is added to the dropzone element when single valid file is dragged over it' , async ( t ) => {
3636 await triggerDragEnter ( `#${ DROPZONE_EXTERNAL_ID } ` , [ { type : 'image/png' } ] ) ;
3737
38- await t . expect ( $ ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . ok ( ) ;
38+ await t . expect ( Selector ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . ok ( ) ;
3939 } ) ;
4040
4141 test ( 'dropzone-active class is not added to the dropzone element when an invalid file format is dragged' , async ( t ) => {
4242 await triggerDragEnter ( `#${ DROPZONE_EXTERNAL_ID } ` , [ { type : 'image/xlsx' } ] ) ;
4343
44- await t . expect ( $ ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . notOk ( ) ;
44+ await t . expect ( Selector ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . notOk ( ) ;
4545 } ) ;
4646
4747 test ( 'dropzone-active class is not added to the dropzone element when multiple items are dragged' , async ( t ) => {
@@ -50,7 +50,7 @@ runManualTest('FileUploader', 'CustomDropzone', (test) => {
5050 { type : 'image/png' } ,
5151 ] ) ;
5252
53- await t . expect ( $ ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . notOk ( ) ;
53+ await t . expect ( Selector ( `#${ DROPZONE_EXTERNAL_ID } ` ) . hasClass ( DROPZONE_ACTIVE_CLASS ) ) . notOk ( ) ;
5454 } ) ;
5555
5656 test ( 'custom dropzone user interface appearance when dropzone-active is applied' , async ( t ) => {
0 commit comments