Skip to content

Commit 874dbf5

Browse files
fix(tests): update toast test for Paragon v23 changes
Paragon removed the redundant "alert" role from the toast container in openedx/paragon#3434 (landed via openedx/paragon#3567). Updated test to find the container using document.getElementById instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 74e69f7 commit 874dbf5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/GradesView/ImportSuccessToast/index.test.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ describe('ImportSuccessToast', () => {
4040
});
4141

4242
render(<ImportSuccessToast />);
43-
const alert = screen.getByRole('alert');
44-
expect(alert).toBeInTheDocument();
43+
44+
const toastRoot = document.getElementById('toast-root');
45+
expect(toastRoot).toBeInTheDocument();
46+
expect(toastRoot).toHaveClass('toast-container');
47+
4548
const toastMessage = screen.queryByText('Import Successful! Grades will be updated momentarily.');
4649
expect(toastMessage).toBeNull();
4750
expect(useImportSuccessToastData).toHaveBeenCalled();

0 commit comments

Comments
 (0)