@@ -58,14 +58,14 @@ describe('<CollectionInfoHeader />', () => {
5858 render ( ) ;
5959 expect ( await screen . findByText ( 'Test Collection' ) ) . toBeInTheDocument ( ) ;
6060
61- expect ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) . toBeInTheDocument ( ) ;
61+ expect ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) . toBeInTheDocument ( ) ;
6262 } ) ;
6363
6464 it ( 'should not render edit title button without permission' , async ( ) => {
6565 render ( libraryIdReadOnly ) ;
6666 expect ( await screen . findByText ( 'Test Collection' ) ) . toBeInTheDocument ( ) ;
6767
68- expect ( screen . queryByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) . not . toBeInTheDocument ( ) ;
68+ expect ( screen . queryByRole ( 'button' , { name : / e d i t / i } ) ) . not . toBeInTheDocument ( ) ;
6969 } ) ;
7070
7171 it ( 'should update collection title' , async ( ) => {
@@ -76,9 +76,9 @@ describe('<CollectionInfoHeader />', () => {
7676 const url = api . getLibraryCollectionApiUrl ( mockLibraryId , collectionId ) ;
7777 axiosMock . onPatch ( url ) . reply ( 200 ) ;
7878
79- fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) ;
79+ fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) ;
8080
81- const textBox = screen . getByRole ( 'textbox' , { name : / t i t l e i n p u t / i } ) ;
81+ const textBox = screen . getByRole ( 'textbox' , { name : / t e x t i n p u t / i } ) ;
8282
8383 userEvent . clear ( textBox ) ;
8484 userEvent . type ( textBox , 'New Collection Title{enter}' ) ;
@@ -99,9 +99,9 @@ describe('<CollectionInfoHeader />', () => {
9999 const url = api . getLibraryCollectionApiUrl ( mockLibraryId , collectionId ) ;
100100 axiosMock . onPatch ( url ) . reply ( 200 ) ;
101101
102- fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) ;
102+ fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) ;
103103
104- const textBox = screen . getByRole ( 'textbox' , { name : / t i t l e i n p u t / i } ) ;
104+ const textBox = screen . getByRole ( 'textbox' , { name : / t e x t i n p u t / i } ) ;
105105
106106 userEvent . clear ( textBox ) ;
107107 userEvent . type ( textBox , `${ mockGetCollectionMetadata . collectionData . title } {enter}` ) ;
@@ -118,9 +118,9 @@ describe('<CollectionInfoHeader />', () => {
118118 const url = api . getLibraryCollectionApiUrl ( mockLibraryId , collectionId ) ;
119119 axiosMock . onPatch ( url ) . reply ( 200 ) ;
120120
121- fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) ;
121+ fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) ;
122122
123- const textBox = screen . getByRole ( 'textbox' , { name : / t i t l e i n p u t / i } ) ;
123+ const textBox = screen . getByRole ( 'textbox' , { name : / t e x t i n p u t / i } ) ;
124124
125125 userEvent . clear ( textBox ) ;
126126 userEvent . type ( textBox , '{enter}' ) ;
@@ -137,9 +137,9 @@ describe('<CollectionInfoHeader />', () => {
137137 const url = api . getLibraryCollectionApiUrl ( mockLibraryId , collectionId ) ;
138138 axiosMock . onPatch ( url ) . reply ( 200 ) ;
139139
140- fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) ;
140+ fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) ;
141141
142- const textBox = screen . getByRole ( 'textbox' , { name : / t i t l e i n p u t / i } ) ;
142+ const textBox = screen . getByRole ( 'textbox' , { name : / t e x t i n p u t / i } ) ;
143143
144144 userEvent . clear ( textBox ) ;
145145 userEvent . type ( textBox , 'New Collection Title{esc}' ) ;
@@ -156,9 +156,9 @@ describe('<CollectionInfoHeader />', () => {
156156 const url = api . getLibraryCollectionApiUrl ( mockLibraryId , collectionId ) ;
157157 axiosMock . onPatch ( url ) . reply ( 500 ) ;
158158
159- fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t c o l l e c t i o n t i t l e / i } ) ) ;
159+ fireEvent . click ( screen . getByRole ( 'button' , { name : / e d i t / i } ) ) ;
160160
161- const textBox = screen . getByRole ( 'textbox' , { name : / t i t l e i n p u t / i } ) ;
161+ const textBox = screen . getByRole ( 'textbox' , { name : / t e x t i n p u t / i } ) ;
162162
163163 userEvent . clear ( textBox ) ;
164164 userEvent . type ( textBox , 'New Collection Title{enter}' ) ;
0 commit comments