@@ -169,11 +169,11 @@ describe('<AddComponent />', () => {
169169 it ( 'creates new "Library" xblock on click' , ( ) => {
170170 const { getByRole } = renderComponent ( ) ;
171171
172- const discussionButton = getByRole ( 'button' , {
172+ const libraryButton = getByRole ( 'button' , {
173173 name : new RegExp ( `${ messages . buttonText . defaultMessage } Library Content` , 'i' ) ,
174174 } ) ;
175175
176- userEvent . click ( discussionButton ) ;
176+ userEvent . click ( libraryButton ) ;
177177 expect ( handleCreateNewCourseXBlockMock ) . toHaveBeenCalled ( ) ;
178178 expect ( handleCreateNewCourseXBlockMock ) . toHaveBeenCalledWith ( {
179179 parentLocator : '123' ,
@@ -293,11 +293,11 @@ describe('<AddComponent />', () => {
293293
294294 it ( 'verifies "Text" component creation and submission in modal' , ( ) => {
295295 const { getByRole } = renderComponent ( ) ;
296- const advancedButton = getByRole ( 'button' , {
296+ const textButton = getByRole ( 'button' , {
297297 name : new RegExp ( `${ messages . buttonText . defaultMessage } Text` , 'i' ) ,
298298 } ) ;
299299
300- userEvent . click ( advancedButton ) ;
300+ userEvent . click ( textButton ) ;
301301 const modalContainer = getByRole ( 'dialog' ) ;
302302
303303 const radioInput = within ( modalContainer ) . getByRole ( 'radio' , { name : 'Text' } ) ;
@@ -319,11 +319,11 @@ describe('<AddComponent />', () => {
319319
320320 it ( 'verifies "Open Response" component creation and submission in modal' , ( ) => {
321321 const { getByRole } = renderComponent ( ) ;
322- const advancedButton = getByRole ( 'button' , {
322+ const openResponseButton = getByRole ( 'button' , {
323323 name : new RegExp ( `${ messages . buttonText . defaultMessage } Open Response` , 'i' ) ,
324324 } ) ;
325325
326- userEvent . click ( advancedButton ) ;
326+ userEvent . click ( openResponseButton ) ;
327327 const modalContainer = getByRole ( 'dialog' ) ;
328328
329329 const radioInput = within ( modalContainer ) . getByRole ( 'radio' , { name : 'Peer Assessment Only' } ) ;
0 commit comments