@@ -515,7 +515,7 @@ describe('Grid', () => {
515515 } ) ;
516516 } ) ;
517517
518- describe ( 'Pointer Events' , ( ) => {
518+ describe ( 'Click Events' , ( ) => {
519519 let grid : GridPattern ;
520520
521521 beforeEach ( ( ) => {
@@ -526,37 +526,37 @@ describe('Grid', () => {
526526 grid . setDefaultStateEffect ( ) ;
527527 } ) ;
528528
529- describe ( 'Basic Pointer Actions' , ( ) => {
530- it ( 'should move focus to the clicked cell on pointerdown ' , ( ) => {
529+ describe ( 'Basic Click Actions' , ( ) => {
530+ it ( 'should move focus to the clicked cell on click ' , ( ) => {
531531 const cells = grid . cells ( ) ;
532- grid . onPointerdown ( createClickEvent ( cells [ 0 ] [ 1 ] . element ( ) ) ) ;
532+ grid . onClick ( createClickEvent ( cells [ 0 ] [ 1 ] . element ( ) ) ) ;
533533 expect ( grid . gridBehavior . focusBehavior . activeCell ( ) ) . toBe ( cells [ 0 ] [ 1 ] ) ;
534534 } ) ;
535535 } ) ;
536536
537- describe ( 'Pointer Selection' , ( ) => {
538- it ( 'should follow focus in follow mode on pointerdown ' , ( ) => {
537+ describe ( 'Click Selection' , ( ) => {
538+ it ( 'should follow focus in follow mode on click ' , ( ) => {
539539 ( gridInputs . selectionMode as WritableSignalLike < 'follow' | 'explicit' > ) . set ( 'follow' ) ;
540540 const cell = grid . cells ( ) [ 0 ] [ 1 ] ;
541- grid . onPointerdown ( createClickEvent ( cell . element ( ) ) ) ;
541+ grid . onClick ( createClickEvent ( cell . element ( ) ) ) ;
542542 expect ( cell . selected ( ) ) . toBe ( true ) ;
543543 } ) ;
544544
545- it ( 'should toggle selection in explicit mode on pointerdown ' , ( ) => {
545+ it ( 'should toggle selection in explicit mode on click ' , ( ) => {
546546 ( gridInputs . selectionMode as WritableSignalLike < 'follow' | 'explicit' > ) . set ( 'explicit' ) ;
547547 const cell = grid . cells ( ) [ 0 ] [ 1 ] ;
548- grid . onPointerdown ( createClickEvent ( cell . element ( ) ) ) ;
548+ grid . onClick ( createClickEvent ( cell . element ( ) ) ) ;
549549 expect ( cell . selected ( ) ) . toBe ( true ) ;
550550
551- grid . onPointerdown ( createClickEvent ( cell . element ( ) ) ) ;
551+ grid . onClick ( createClickEvent ( cell . element ( ) ) ) ;
552552 expect ( cell . selected ( ) ) . toBe ( false ) ;
553553 } ) ;
554554
555- it ( 'should support multi-selection with Ctrl+pointerdown ' , ( ) => {
555+ it ( 'should support multi-selection with Ctrl+click ' , ( ) => {
556556 ( gridInputs . multi as WritableSignalLike < boolean > ) . set ( true ) ;
557557 const cells = grid . cells ( ) ;
558- grid . onPointerdown ( createClickEvent ( cells [ 0 ] [ 0 ] . element ( ) ) ) ;
559- grid . onPointerdown ( createClickEvent ( cells [ 0 ] [ 1 ] . element ( ) , { control : true } ) ) ;
558+ grid . onClick ( createClickEvent ( cells [ 0 ] [ 0 ] . element ( ) ) ) ;
559+ grid . onClick ( createClickEvent ( cells [ 0 ] [ 1 ] . element ( ) , { control : true } ) ) ;
560560 expect ( cells [ 0 ] [ 0 ] . selected ( ) ) . toBe ( true ) ;
561561 expect ( cells [ 0 ] [ 1 ] . selected ( ) ) . toBe ( true ) ;
562562 } ) ;
@@ -664,12 +664,12 @@ describe('Grid', () => {
664664 expect ( grid . gridBehavior . focusBehavior . activeCell ( ) ) . toBeUndefined ( ) ; // Should stay undefined, meaning default state was skipped
665665 } ) ;
666666
667- it ( 'should NOT set default state if pointer interacted' , ( ) => {
667+ it ( 'should NOT set default state if click interacted' , ( ) => {
668668 const gridInputs = getDefaultGridInputs ( ) ;
669669 const data = [ { cells : [ { } , { } ] } , { cells : [ { } , { } ] } ] ;
670670 const { grid} = createGrid ( data , gridInputs ) ;
671671 const cells = grid . cells ( ) ;
672- grid . onPointerdown ( { target : cells [ 0 ] [ 0 ] . element ( ) } as unknown as PointerEvent ) ; // Interaction
672+ grid . onClick ( { target : cells [ 0 ] [ 0 ] . element ( ) } as unknown as PointerEvent ) ; // Interaction
673673
674674 cells [ 0 ] [ 1 ] . inputs . selected . set ( true ) ;
675675 grid . setDefaultStateEffect ( ) ;
0 commit comments