@@ -61,7 +61,7 @@ describe('Example - Spreadsheet with DataView and Cell Selection', { retries: 0
6161 . should ( 'have.text' , '{"fromRow":10,"fromCell":4,"toCell":4,"toRow":46}' ) ;
6262 } ) ;
6363
64- it ( 'should click on cell E12 then End key w/ selection E46-E99 ' , ( ) => {
64+ it ( 'should click on cell E46 then Shift+ End key with full row horizontal selection E46-CV46 ' , ( ) => {
6565 cy . getCell ( 46 , 5 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
6666 . as ( 'cell_E46' )
6767 . click ( ) ;
@@ -70,19 +70,43 @@ describe('Example - Spreadsheet with DataView and Cell Selection', { retries: 0
7070 . type ( '{shift}{end}' ) ;
7171
7272 cy . get ( '#selectionRange' )
73- . should ( 'have.text' , '{"fromRow":46,"fromCell":5,"toCell":5 ,"toRow":99 }' ) ;
73+ . should ( 'have.text' , '{"fromRow":46,"fromCell":5,"toCell":100 ,"toRow":46 }' ) ;
7474 } ) ;
7575
76- it ( 'should click on cell C85 then End key w/ selection C0-C85 ' , ( ) => {
77- cy . getCell ( 85 , 3 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
78- . as ( 'cell_C85 ' )
76+ it ( 'should click on cell CP54 then Ctrl+Shift+ End keys with selection E46-CV99 ' , ( ) => {
77+ cy . getCell ( 54 , 94 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
78+ . as ( 'cell_CP54 ' )
7979 . click ( ) ;
8080
81- cy . get ( '@cell_C85' )
82- . type ( '{shift}{home}' ) ;
81+ cy . get ( '@cell_CP54' )
82+ . type ( '{ctrl}{shift}{end}' ) ;
83+
84+ cy . get ( '#selectionRange' )
85+ . should ( 'have.text' , '{"fromRow":54,"fromCell":94,"toCell":100,"toRow":99}' ) ;
86+ } ) ;
87+
88+ it ( 'should click on cell CP95 then Ctrl+Shift+Home keys with selection C0-CP95' , ( ) => {
89+ cy . getCell ( 95 , 98 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
90+ . as ( 'cell_CP95' )
91+ . click ( ) ;
92+
93+ cy . get ( '@cell_CP95' )
94+ . type ( '{ctrl}{shift}{home}' ) ;
95+
96+ cy . get ( '#selectionRange' )
97+ . should ( 'have.text' , '{"fromRow":0,"fromCell":0,"toCell":98,"toRow":95}' ) ;
98+ } ) ;
99+
100+ it ( 'should click on cell CR5 then Ctrl+Home keys and expect to scroll back to cell A0 without any selection range' , ( ) => {
101+ cy . getCell ( 5 , 95 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
102+ . as ( 'cell_CR95' )
103+ . click ( ) ;
104+
105+ cy . get ( '@cell_CR95' )
106+ . type ( '{ctrl}{home}' ) ;
83107
84108 cy . get ( '#selectionRange' )
85- . should ( 'have.text' , '{"fromRow":0,"fromCell":3,"toCell":3,"toRow":85} ' ) ;
109+ . should ( 'have.text' , '' ) ;
86110 } ) ;
87111 } ) ;
88112
@@ -92,7 +116,7 @@ describe('Example - Spreadsheet with DataView and Cell Selection', { retries: 0
92116 cy . get ( '[data-val="25"]' ) . click ( ) ;
93117 } ) ;
94118
95- it ( 'should click on cell B14 then Shift+End w/ selection B14-24' , ( ) => {
119+ it ( 'should click on cell B14 then Shift+End with selection B14-24' , ( ) => {
96120 cy . getCell ( 14 , 2 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
97121 . as ( 'cell_B14' )
98122 . click ( ) ;
@@ -101,45 +125,45 @@ describe('Example - Spreadsheet with DataView and Cell Selection', { retries: 0
101125 . type ( '{shift}{end}' ) ;
102126
103127 cy . get ( '#selectionRange' )
104- . should ( 'have.text' , '{"fromRow":14,"fromCell":2,"toCell":2 ,"toRow":24 }' ) ;
128+ . should ( 'have.text' , '{"fromRow":14,"fromCell":2,"toCell":100 ,"toRow":14 }' ) ;
105129 } ) ;
106130
107- it ( 'should click on cell C19 then Shift+End w/ selection C0-19 ' , ( ) => {
108- cy . getCell ( 19 , 2 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
109- . as ( 'cell_C19 ' )
131+ it ( 'should click on cell CS14 then Shift+Home with selection A14-CS14 ' , ( ) => {
132+ cy . getCell ( 14 , 97 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
133+ . as ( 'cell_CS14 ' )
110134 . click ( ) ;
111135
112- cy . get ( '@cell_C19 ' )
136+ cy . get ( '@cell_CS14 ' )
113137 . type ( '{shift}{home}' ) ;
114138
115139 cy . get ( '#selectionRange' )
116- . should ( 'have.text' , '{"fromRow":0 ,"fromCell":2 ,"toCell":2 ,"toRow":19 }' ) ;
140+ . should ( 'have.text' , '{"fromRow":14 ,"fromCell":0 ,"toCell":97 ,"toRow":14 }' ) ;
117141 } ) ;
118142
119- it ( 'should click on cell E3 then Shift+PageDown multiple times with current page selection starting at E3 w/selection E3-24' , ( ) => {
120- cy . getCell ( 3 , 5 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
121- . as ( 'cell_E3 ' )
143+ it ( 'should click on cell CN3 then Shift+PageDown multiple times with current page selection starting at E3 w/selection E3-24' , ( ) => {
144+ cy . getCell ( 3 , 95 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
145+ . as ( 'cell_CN3 ' )
122146 . click ( ) ;
123147
124- cy . get ( '@cell_E3 ' )
148+ cy . get ( '@cell_CN3 ' )
125149 . type ( '{shift}{pagedown}{pagedown}{pagedown}' ) ;
126150
127151 cy . get ( '#selectionRange' )
128- . should ( 'have.text' , '{"fromRow":3,"fromCell":5 ,"toCell":5 ,"toRow":24}' ) ;
152+ . should ( 'have.text' , '{"fromRow":3,"fromCell":95 ,"toCell":95 ,"toRow":24}' ) ;
129153 } ) ;
130154
131- it ( 'should change to 2nd page then click on cell D41 then Shift+PageUp multiple times with current page selection w/selection D25-41' , ( ) => {
155+ it ( 'should change to 2nd page then click on cell CN41 then Shift+PageUp multiple times with current page selection w/selection D25-41' , ( ) => {
132156 cy . get ( '.slick-pager .sgi-chevron-right' ) . click ( ) ;
133157
134- cy . getCell ( 15 , 4 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
135- . as ( 'cell_D41 ' )
158+ cy . getCell ( 15 , 92 , '' , { parentSelector : "#myGrid" , rowHeight : cellHeight } )
159+ . as ( 'cell_CN41 ' )
136160 . click ( ) ;
137161
138- cy . get ( '@cell_D41 ' )
162+ cy . get ( '@cell_CN41 ' )
139163 . type ( '{shift}{pageup}{pageup}{pageup}' ) ;
140164
141165 cy . get ( '#selectionRange' )
142- . should ( 'have.text' , '{"fromRow":0,"fromCell":4 ,"toCell":4 ,"toRow":15}' ) ;
166+ . should ( 'have.text' , '{"fromRow":0,"fromCell":92 ,"toCell":92 ,"toRow":15}' ) ;
143167 } ) ;
144168 } ) ;
145169} ) ;
0 commit comments