@@ -33,9 +33,6 @@ describe('TileChartMap', () => {
33
33
renderComponent ( ) ;
34
34
expect ( screen . getByTestId ( 'tile-chart-map' ) ) . toBeInTheDocument ( ) ;
35
35
expect ( screen . getByTestId ( 'tile-chart-map' ) ) . not . toHaveClass ( 'print' ) ;
36
- expect (
37
- screen . getByText ( 'Map of unspecified region with 1 data series.' ) ,
38
- ) . toBeInTheDocument ( ) ;
39
36
} ) ;
40
37
41
38
it ( 'renders print mode' , ( ) => {
@@ -71,8 +68,8 @@ describe('TileChartMap', () => {
71
68
expect ( await screen . findByText ( '11,397' ) ) . toBeInTheDocument ( ) ;
72
69
73
70
// need to mouseover to initialize the toggleState handler
74
- fireEvent . mouseEnter ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
75
- fireEvent . click ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
71
+ fireEvent . mouseEnter ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
72
+ fireEvent . click ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
76
73
77
74
expect ( analyticsSpy ) . toHaveBeenCalledWith ( 'State Event: add' , 'FL' ) ;
78
75
@@ -110,20 +107,20 @@ describe('TileChartMap', () => {
110
107
expect ( screen . getByTestId ( 'tile-chart-map' ) ) . toBeInTheDocument ( ) ;
111
108
expect ( screen . getByTestId ( 'tile-chart-map' ) ) . not . toHaveClass ( 'print' ) ;
112
109
113
- await screen . findByLabelText ( '1. FL, value: 11,397.' ) ;
110
+ await screen . findByLabelText ( 'FL, value: 11,397.' ) ;
114
111
115
112
expect ( screen . getByText ( 'Complaints per 1,000' ) ) . toBeInTheDocument ( ) ;
116
113
expect ( screen . getByText ( 'FL' ) ) . toBeInTheDocument ( ) ;
117
114
expect ( screen . getByText ( '0.56' ) ) . toBeInTheDocument ( ) ;
118
115
119
116
// tooltip check
120
- fireEvent . mouseEnter ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
117
+ fireEvent . mouseEnter ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
121
118
122
119
expect (
123
120
screen . getByText ( 'Product with highest complaint volume' ) ,
124
121
) . toBeVisible ( ) ;
125
122
126
- fireEvent . click ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
123
+ fireEvent . click ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
127
124
expect ( analyticsSpy ) . toHaveBeenCalledWith ( 'State Event: add' , 'FL' ) ;
128
125
expect ( addStateFilterSpy ) . toHaveBeenCalledWith ( {
129
126
abbr : 'FL' ,
@@ -164,8 +161,8 @@ describe('TileChartMap', () => {
164
161
expect ( await screen . findByText ( '11,397' ) ) . toBeInTheDocument ( ) ;
165
162
166
163
// need to mouseEnter to initialize the toggleState handler!
167
- fireEvent . mouseEnter ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
168
- fireEvent . click ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
164
+ fireEvent . mouseEnter ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
165
+ fireEvent . click ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
169
166
expect ( analyticsSpy ) . toHaveBeenCalledWith ( 'State Event: remove' , 'FL' ) ;
170
167
expect ( removeStateFilterSpy ) . toHaveBeenCalledWith ( {
171
168
abbr : 'FL' ,
@@ -205,16 +202,12 @@ describe('TileChartMap', () => {
205
202
expect ( await screen . findByText ( 'FL' ) ) . toBeInTheDocument ( ) ;
206
203
expect ( await screen . findByText ( '0.56' ) ) . toBeInTheDocument ( ) ;
207
204
208
- expect ( screen . getByLabelText ( '31. OK, value: 535.' ) ) . toHaveClass (
209
- 'deselected' ,
210
- ) ;
211
- expect ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) . toHaveClass (
212
- 'selected' ,
213
- ) ;
205
+ expect ( screen . getByLabelText ( 'OK, value: 535.' ) ) . toHaveClass ( 'deselected' ) ;
206
+ expect ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) . toHaveClass ( 'selected' ) ;
214
207
215
208
// need to mouseEnter to initialize the toggleState handler!
216
- fireEvent . mouseEnter ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
217
- fireEvent . click ( screen . getByLabelText ( '1. FL, value: 11,397.' ) ) ;
209
+ fireEvent . mouseEnter ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
210
+ fireEvent . click ( screen . getByLabelText ( 'FL, value: 11,397.' ) ) ;
218
211
219
212
expect ( analyticsSpy ) . toHaveBeenCalledWith ( 'State Event: remove' , 'FL' ) ;
220
213
expect ( removeStateFilterSpy ) . toHaveBeenCalledWith ( {
0 commit comments