Compare commits
3 Commits
dependabot
...
ahtisham/I
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0ccfdafb0 | ||
|
|
b858bc3526 | ||
|
|
3bc6b5d145 |
@@ -106,7 +106,7 @@ function PostEditor({
|
|||||||
const nonCoursewareIds = useSelector(enableInContext ? inContextCoursewareIds : selectNonCoursewareIds);
|
const nonCoursewareIds = useSelector(enableInContext ? inContextCoursewareIds : selectNonCoursewareIds);
|
||||||
const coursewareTopics = useSelector(enableInContext ? inContextCourseware : selectCoursewareTopics);
|
const coursewareTopics = useSelector(enableInContext ? inContextCourseware : selectCoursewareTopics);
|
||||||
const cohorts = useSelector(selectCourseCohorts);
|
const cohorts = useSelector(selectCourseCohorts);
|
||||||
const post = useSelector(selectThread(postId));
|
const post = useSelector(editExisting ? selectThread(postId) : () => ({}));
|
||||||
const userHasModerationPrivileges = useSelector(selectUserHasModerationPrivileges);
|
const userHasModerationPrivileges = useSelector(selectUserHasModerationPrivileges);
|
||||||
const userIsGroupTa = useSelector(selectUserIsGroupTa);
|
const userIsGroupTa = useSelector(selectUserIsGroupTa);
|
||||||
const settings = useSelector(selectDivisionSettings);
|
const settings = useSelector(selectDivisionSettings);
|
||||||
|
|||||||
@@ -141,6 +141,16 @@ describe('PostEditor', () => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
test('selectThread is not called while creating a new post', async () => {
|
||||||
|
const mockSelectThread = jest.fn();
|
||||||
|
jest.mock('../data/selectors', () => ({
|
||||||
|
selectThread: mockSelectThread,
|
||||||
|
}));
|
||||||
|
await renderComponent();
|
||||||
|
expect(mockSelectThread)
|
||||||
|
.not
|
||||||
|
.toHaveBeenCalled();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('cohorting', () => {
|
describe('cohorting', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user