@@ -27,6 +27,17 @@ describe(`column, mode=${AppMode.Actionable}, flavor=${AppFlavor.Merged}, ${AppF
2727 DashTable . getHeader ( 1 , 1 ) . within ( ( ) => cy . get ( 'span.column-header-name' ) . should ( 'have.html' , 'Paris' ) ) ;
2828 } ) ;
2929
30+ it ( 'keeps hidden pieces when deleting a merged column' , ( ) => {
31+ cy . get ( '.column-4 .column-header--hide' ) . click ( ) ; // Boston
32+ cy . get ( '.column-2 .column-header--hide' ) . click ( ) ; // Montréal
33+ DashTable . deleteColumnById ( 0 , 'ccc' ) ; // City
34+ cy . get ( '.show-hide' ) . click ( ) ;
35+ cy . get ( '.show-hide-menu-item input' ) . eq ( 1 ) . click ( ) ; // Montréal
36+ cy . get ( '.show-hide-menu-item input' ) . eq ( 2 ) . click ( ) ; // Boston
37+ cy . get ( '.column-1 .column-header-name' ) . eq ( 2 ) . should ( 'have.html' , 'Montréal' ) ;
38+ cy . get ( '.column-2 .column-header-name' ) . eq ( 1 ) . should ( 'have.html' , 'Boston' ) ;
39+ } ) ;
40+
3041 it ( 'can clear column' , ( ) => {
3142 DashTable . getFilter ( 0 ) . click ( ) ;
3243 DOM . focused . type ( `is num` ) ;
@@ -62,6 +73,29 @@ describe(`column, mode=${AppMode.Actionable}, flavor=${AppFlavor.Merged}, ${AppF
6273 DashTable . getFilter ( 4 ) . within ( ( ) => cy . get ( 'input' ) . should ( 'have.value' , '' ) ) ;
6374 } ) ;
6475
76+ it ( 'keeps hidden pieces when clearing a merged column' , ( ) => {
77+ // initial state of city columns
78+ DashTable . getCell ( 0 , 1 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '1' ) ) ;
79+ DashTable . getCell ( 0 , 2 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '100' ) ) ;
80+ DashTable . getCell ( 0 , 3 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '1' ) ) ;
81+ DashTable . getCell ( 0 , 4 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '2' ) ) ;
82+ DashTable . getCell ( 0 , 5 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '10' ) ) ;
83+
84+ cy . get ( '.column-4 .column-header--hide' ) . click ( ) ; // Boston
85+ cy . get ( '.column-2 .column-header--hide' ) . click ( ) ; // Montréal
86+ DashTable . clearColumnById ( 0 , 'ccc' ) ; // City
87+ cy . get ( '.show-hide' ) . click ( ) ;
88+ cy . get ( '.show-hide-menu-item input' ) . eq ( 2 ) . click ( ) ; // Montréal
89+ cy . get ( '.show-hide-menu-item input' ) . eq ( 4 ) . click ( ) ; // Boston
90+
91+ // after clear and re-show -> only Montréal and Boston have data
92+ DashTable . getCell ( 0 , 1 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '' ) ) ;
93+ DashTable . getCell ( 0 , 2 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '100' ) ) ;
94+ DashTable . getCell ( 0 , 3 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '' ) ) ;
95+ DashTable . getCell ( 0 , 4 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '2' ) ) ;
96+ DashTable . getCell ( 0 , 5 ) . within ( ( ) => cy . get ( '.dash-cell-value' ) . should ( 'have.html' , '' ) ) ;
97+ } ) ;
98+
6599 it ( 'can hide column' , ( ) => {
66100 DashTable . getHeader ( 0 , 0 ) . within ( ( ) => cy . get ( 'span.column-header-name' ) . should ( 'have.html' , 'rows' ) ) ;
67101 DashTable . hideColumnById ( 0 , 'rows' ) ;
@@ -313,4 +347,4 @@ describe(`column, mode=${AppMode.Actionable}`, () => {
313347 DashTable . getHeader ( 1 , 2 ) . within ( ( ) => cy . get ( 'span.column-header-name' ) . should ( 'have.html' , 'France' ) ) ;
314348 DashTable . getHeader ( 2 , 2 ) . within ( ( ) => cy . get ( 'span.column-header-name' ) . should ( 'have.html' , 'Paris' ) ) ;
315349 } ) ;
316- } ) ;
350+ } ) ;
0 commit comments