11import MockAdapter from 'axios-mock-adapter' ;
2- import { render , waitFor , within } from '@testing-library/react' ;
2+ import {
3+ render ,
4+ screen ,
5+ waitFor ,
6+ within ,
7+ } from '@testing-library/react' ;
38import { AppProvider } from '@edx/frontend-platform/react' ;
49import { IntlProvider } from '@edx/frontend-platform/i18n' ;
510import { camelCaseObject , initializeMockApp } from '@edx/frontend-platform' ;
@@ -76,7 +81,7 @@ describe('<MoveModal />', () => {
7681 it ( 'renders component properly' , async ( ) => {
7782 const user = userEvent . setup ( ) ;
7883 const { getByText, getByRole, getByTestId } = renderComponent ( ) ;
79- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
84+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
8085 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
8186
8287 expect ( getByText ( messages . moveModalTitle . defaultMessage . replace ( ' {displayName}' , '' ) ) ) . toBeInTheDocument ( ) ;
@@ -96,7 +101,7 @@ describe('<MoveModal />', () => {
96101 it ( 'correctly navigates through the structure list' , async ( ) => {
97102 const user = userEvent . setup ( ) ;
98103 const { getByText, getByRole, getByTestId } = renderComponent ( ) ;
99- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
104+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
100105 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
101106
102107 expect (
@@ -145,7 +150,7 @@ describe('<MoveModal />', () => {
145150 it ( 'correctly navigates using breadcrumbs' , async ( ) => {
146151 const user = userEvent . setup ( ) ;
147152 const { getByRole, findByRole, getByTestId } = renderComponent ( ) ;
148- const breadcrumbs : HTMLElement = getByTestId ( 'move-xblock-modal-breadcrumbs ') ;
153+ const breadcrumbs : HTMLElement = screen . getByLabelText ( 'Course Outline breadcrumb ') ;
149154 const categoryIndicator : HTMLElement = getByTestId ( 'move-xblock-modal-category' ) ;
150155
151156 await user . click ( await findByRole ( 'button' , { name : new RegExp ( sections [ 1 ] . displayName , 'i' ) } ) ) ;
0 commit comments