@@ -14,7 +14,6 @@ function createWrapper(props) {
1414 label = "A Canvas Label"
1515 layerMetadata = { { } }
1616 layers = { [ ] }
17- t = { t => t }
1817 totalSize = { 1 }
1918 updateLayers = { ( ) => { } }
2019 windowId = "abc"
@@ -28,7 +27,7 @@ describe('CanvasLayers', () => {
2827 it ( 'displays the canvas label' , ( ) => {
2928 createWrapper ( { totalSize : 2 } ) ;
3029
31- expect ( screen . getByText ( 'annotationCanvasLabel ' , { container : '.MuiTypography-overline' } ) ) . toBeInTheDocument ( ) ;
30+ expect ( screen . getByText ( 'Left: [A Canvas Label] ' , { container : '.MuiTypography-overline' } ) ) . toBeInTheDocument ( ) ;
3231 } ) ;
3332 } ) ;
3433
@@ -44,9 +43,9 @@ describe('CanvasLayers', () => {
4443 expect ( screen . getAllByRole ( 'listitem' ) [ 0 ] ) . toHaveTextContent ( '1' ) ;
4544 expect ( screen . getAllByRole ( 'listitem' ) [ 1 ] ) . toHaveTextContent ( '2' ) ;
4645
47- expect ( screen . getAllByRole ( 'button' , { name : 'layer_hide ' } ) . length ) . toEqual ( 2 ) ;
48- expect ( screen . getAllByRole ( 'button' , { name : 'layer_moveToTop ' } ) . length ) . toEqual ( 2 ) ;
49- expect ( screen . getAllByRole ( 'spinbutton' , { name : 'layer_opacity ' } ) . length ) . toEqual ( 2 ) ;
46+ expect ( screen . getAllByRole ( 'button' , { name : 'Hide layer ' } ) . length ) . toEqual ( 2 ) ;
47+ expect ( screen . getAllByRole ( 'button' , { name : 'Move layer to top ' } ) . length ) . toEqual ( 2 ) ;
48+ expect ( screen . getAllByRole ( 'spinbutton' , { name : 'Layer opacity ' } ) . length ) . toEqual ( 2 ) ;
5049 } ) ;
5150
5251 it ( 'handles drag + drop of layers' , async ( ) => {
@@ -99,7 +98,7 @@ describe('CanvasLayers', () => {
9998 } ) ;
10099
101100 it ( 'has a button for moving a layer to the top' , async ( ) => {
102- await user . click ( screen . getAllByLabelText ( 'layer_moveToTop ' ) [ 1 ] ) ;
101+ await user . click ( screen . getAllByLabelText ( 'Move layer to top ' ) [ 1 ] ) ;
103102
104103 expect ( updateLayers ) . toHaveBeenCalledWith ( 'abc' , 'https://prtd.app/hamilton/canvas/p1.json' , {
105104 'https://prtd.app/image/iiif/2/hamilton%2fHL_524_1r_00_PSC/full/862,1024/0/default.jpg' : {
@@ -112,7 +111,7 @@ describe('CanvasLayers', () => {
112111 } ) ;
113112
114113 it ( 'has a button for toggling visibility' , async ( ) => {
115- await user . click ( screen . getAllByLabelText ( 'layer_hide ' ) [ 1 ] ) ;
114+ await user . click ( screen . getAllByLabelText ( 'Hide layer ' ) [ 1 ] ) ;
116115
117116 expect ( updateLayers ) . toHaveBeenCalledWith ( 'abc' , 'https://prtd.app/hamilton/canvas/p1.json' , {
118117 'https://prtd.app/image/iiif/2/hamilton%2fHL_524_1r_00_TS_Blue/full/862,1024/0/default.png' : {
0 commit comments