11import MockAdapter from 'axios-mock-adapter' ;
2- import { render , waitFor , within } from '@testing-library/react' ;
2+ import { render , screen , waitFor , within } from '@testing-library/react' ;
33import { AppProvider } from '@edx/frontend-platform/react' ;
44import { IntlProvider } from '@edx/frontend-platform/i18n' ;
55import { camelCaseObject , initializeMockApp } from '@edx/frontend-platform' ;
@@ -76,7 +76,7 @@ describe('<MoveModal />', () => {
7676 it ( 'renders component properly' , async ( ) => {
7777 const user = userEvent . setup ( ) ;
7878 const { getByText, getByRole, getByTestId } = renderComponent ( ) ;
79- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
79+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
8080 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
8181
8282 expect ( getByText ( messages . moveModalTitle . defaultMessage . replace ( ' {displayName}' , '' ) ) ) . toBeInTheDocument ( ) ;
@@ -96,7 +96,7 @@ describe('<MoveModal />', () => {
9696 it ( 'correctly navigates through the structure list' , async ( ) => {
9797 const user = userEvent . setup ( ) ;
9898 const { getByText, getByRole, getByTestId } = renderComponent ( ) ;
99- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
99+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
100100 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
101101
102102 expect (
@@ -145,7 +145,7 @@ describe('<MoveModal />', () => {
145145 it ( 'correctly navigates using breadcrumbs' , async ( ) => {
146146 const user = userEvent . setup ( ) ;
147147 const { getByRole, findByRole, getByTestId } = renderComponent ( ) ;
148- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
148+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
149149 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
150150
151151 await user . click ( await findByRole ( 'button' , { name : new RegExp ( sections [ 1 ] . displayName , 'i' ) } ) ) ;
0 commit comments