@@ -11,36 +11,12 @@ describe('High Contrast Mode', () => {
1111 cy . get ( '#scatter-high-contrast' ) . first ( ) . should ( 'have.attr' , 'data-state' , 'unchecked' ) ;
1212 } ) ;
1313
14- it ( 'shuffle colors button is hidden when high contrast is off' , ( ) => {
15- cy . get ( '[data-testid="scatter-shuffle-colors"]' ) . should ( 'not.exist' ) ;
16- } ) ;
17-
1814 it ( 'visiting with i_hc=1 applies high contrast on load' , ( ) => {
1915 cy . visit ( '/inference?i_hc=1' ) ;
2016 cy . get ( '[data-testid="scatter-graph"]' ) . should ( 'exist' ) ;
2117 cy . get ( '#scatter-high-contrast' ) . first ( ) . should ( 'have.attr' , 'data-state' , 'checked' ) ;
2218 } ) ;
2319
24- it ( 'shuffle colors button appears when high contrast is enabled' , ( ) => {
25- // Still on /?i_hc=1 from previous test
26- cy . get ( '[data-testid="scatter-shuffle-colors"]' ) . should ( 'exist' ) ;
27- cy . get ( '[data-testid="scatter-shuffle-colors"]' ) . should ( 'contain.text' , 'Shuffle Colors' ) ;
28- } ) ;
29-
30- it ( 'clicking shuffle colors changes the point colors' , ( ) => {
31- // Still on /?i_hc=1 from previous test
32- cy . get ( '[data-testid="scatter-graph"] .visible-shape' )
33- . first ( )
34- . invoke ( 'attr' , 'fill' )
35- . then ( ( colorBefore ) => {
36- cy . get ( '[data-testid="scatter-shuffle-colors"]' ) . first ( ) . click ( ) ;
37- cy . get ( '[data-testid="scatter-graph"] .visible-shape' )
38- . first ( )
39- . invoke ( 'attr' , 'fill' )
40- . should ( 'not.equal' , colorBefore ) ;
41- } ) ;
42- } ) ;
43-
4420 it ( 'multiple high contrast params can coexist in URL' , ( ) => {
4521 cy . visit ( '/inference?i_hc=1&r_hc=1&e_hc=1' ) ;
4622 cy . get ( '[data-testid="scatter-graph"]' ) . should ( 'exist' ) ;
@@ -65,17 +41,9 @@ describe('High Contrast Mode', () => {
6541 cy . get ( '#historical-high-contrast' ) . first ( ) . should ( 'have.attr' , 'data-state' , 'unchecked' ) ;
6642 } ) ;
6743
68- it ( 'historical trends high contrast toggle enables HC and shows shuffle button ' , ( ) => {
44+ it ( 'historical trends high contrast toggle enables HC via URL ' , ( ) => {
6945 cy . visit ( '/historical?i_hc=1' ) ;
7046 cy . get ( '[data-testid="historical-trends-display"]' ) . should ( 'exist' ) ;
7147 cy . get ( '#historical-high-contrast' ) . first ( ) . should ( 'have.attr' , 'data-state' , 'checked' ) ;
72- cy . get ( '[data-testid="historical-shuffle-colors"]' ) . should ( 'exist' ) ;
73- cy . get ( '[data-testid="historical-shuffle-colors"]' ) . should ( 'contain.text' , 'Shuffle Colors' ) ;
74- } ) ;
75-
76- it ( 'historical trends shuffle button is hidden when high contrast is off' , ( ) => {
77- cy . visit ( '/historical' ) ;
78- cy . get ( '[data-testid="historical-trends-display"]' ) . should ( 'exist' ) ;
79- cy . get ( '[data-testid="historical-shuffle-colors"]' ) . should ( 'not.exist' ) ;
8048 } ) ;
8149} ) ;
0 commit comments