Skip to content

Commit 26ecb4a

Browse files
committed
test: updated tests
1 parent 5c33b1f commit 26ecb4a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/notification-preferences/NotificationPreferences.test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BrowserRouter as Router } from 'react-router-dom';
55

66
import * as auth from '@edx/frontend-platform/auth';
77
import { IntlProvider } from '@edx/frontend-platform/i18n';
8-
import { fireEvent, render, screen } from '@testing-library/react';
8+
import { render, screen } from '@testing-library/react';
99

1010
import { defaultState } from './data/reducers';
1111
import NotificationPreferences from './NotificationPreferences';
@@ -77,7 +77,7 @@ const setupStore = (override = {}) => {
7777
storeState.courses = {
7878
status: SUCCESS_STATUS,
7979
courses: [
80-
{ id: '', name: 'Account' },
80+
{ id: '', name: 'Select Course' },
8181
{ id: 'selected-course-id', name: 'Selected Course' },
8282
],
8383
};

src/notification-preferences/data/reducers.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('notification-preferences reducer', () => {
4444
);
4545
expect(result.courses).toEqual({
4646
status: SUCCESS_STATUS,
47-
courses: [{ id: '', name: 'Account' }],
47+
courses: [{ id: '', name: 'Select Course' }],
4848
pagination: data.pagination,
4949
});
5050
});
@@ -61,7 +61,7 @@ describe('notification-preferences reducer', () => {
6161
status,
6262
courses: [{
6363
id: '',
64-
name: 'Account',
64+
name: 'Select Course',
6565
}],
6666
pagination: {},
6767
});

src/notification-preferences/data/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getConfig } from '@edx/frontend-platform';
22

3-
export const notificationChannels = () => ((getConfig().SHOW_EMAIL_CHANNEL === 'true' && { EMAIL: 'email' }));
3+
export const notificationChannels = () => ({ WEB: 'web', ...(getConfig().SHOW_EMAIL_CHANNEL === 'true' && { EMAIL: 'email' }) });
44

55
export const shouldHideAppPreferences = (preferences, appId) => {
66
const appPreferences = preferences.filter(pref => pref.appId === appId);

0 commit comments

Comments
 (0)