Skip to content

Commit 71c2037

Browse files
fix: remove testid that wasn't being applied anymore
1 parent efd5b47 commit 71c2037

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/course-unit/move-modal/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const MoveModal: FC<IUseMoveModalParams> = ({
4444
const renderBreadcrumbs = useCallback(() => (
4545
<Breadcrumb
4646
ariaLabel={intl.formatMessage(messages.moveModalBreadcrumbsLabel)}
47-
data-testid="move-xblock-modal-breadcrumbs"
4847
isMobile={isExtraSmall}
4948
links={breadcrumbs.slice(0, -1).map((breadcrumb, index) => (
5049
{ label: breadcrumb, 'data-parent-index': index }

src/course-unit/move-modal/moveModal.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import MockAdapter from 'axios-mock-adapter';
2-
import { render, waitFor, within } from '@testing-library/react';
2+
import { render, screen, waitFor, within } from '@testing-library/react';
33
import { AppProvider } from '@edx/frontend-platform/react';
44
import { IntlProvider } from '@edx/frontend-platform/i18n';
55
import { 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

Comments
 (0)