Skip to content

Commit

Permalink
test: fix not related test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 11, 2024
1 parent 7ca8f22 commit 0f0a5d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/course-outline/page-alerts/PageAlerts.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('<PageAlerts />', () => {
});

it('renders discussion alerts', async () => {
const { queryByText } = renderComponent({
const { findByText, queryByText } = renderComponent({
...pageAlertsData,
discussionsSettings: {
providerType: 'openedx',
Expand All @@ -99,11 +99,11 @@ describe('<PageAlerts />', () => {
expect(learnMoreBtn).toHaveAttribute('href', 'some-learn-more-url');

const dismissBtn = queryByText('Dismiss');
await act(async () => fireEvent.click(dismissBtn));
fireEvent.click(dismissBtn);
const discussionAlertDismissKey = `discussionAlertDismissed-${pageAlertsData.courseId}`;
expect(localStorage.getItem(discussionAlertDismissKey)).toBe('true');

const feedbackLink = queryByText(messages.discussionNotificationFeedback.defaultMessage);
const feedbackLink = await findByText(messages.discussionNotificationFeedback.defaultMessage);
expect(feedbackLink).toBeInTheDocument();
expect(feedbackLink).toHaveAttribute('href', 'some-feedback-url');
});
Expand Down

0 comments on commit 0f0a5d6

Please sign in to comment.