diff --git a/client/app/bundles/course/assessment/submission/containers/TestCaseView/__test__/index.test.js b/client/app/bundles/course/assessment/submission/containers/TestCaseView/__test__/index.test.js index a60d3cad126..ebc9e6bbc20 100644 --- a/client/app/bundles/course/assessment/submission/containers/TestCaseView/__test__/index.test.js +++ b/client/app/bundles/course/assessment/submission/containers/TestCaseView/__test__/index.test.js @@ -52,10 +52,9 @@ const defaultStaffViewProps = { }; const getWarning = (page, text) => - within(page.getByText(text).closest('div')).queryByText( - 'Only staff can see this.', - { exact: false }, - ); + within( + page.getByText(text).closest('.MuiAccordionSummary-content'), + ).queryByText('Only staff can see this.', { exact: false }); describe('TestCaseView', () => { describe('when viewing as staff', () => {