diff --git a/src/course-unit/CourseUnit.jsx b/src/course-unit/CourseUnit.jsx
index 5ebf803b85..dc7a4bae5a 100644
--- a/src/course-unit/CourseUnit.jsx
+++ b/src/course-unit/CourseUnit.jsx
@@ -73,7 +73,8 @@ const CourseUnit = ({ courseId }) => {
const initialXBlocksData = useMemo(() => courseVerticalChildren.children ?? [], [courseVerticalChildren.children]);
const [unitXBlocks, setUnitXBlocks] = useState(initialXBlocksData);
-
+ // const unitData = useSelector(state => state.courseUnit);
+ // console.log('unitData ===>', unitData);
useEffect(() => {
document.title = getPageHeadTitle('', unitTitle);
}, [unitTitle]);
@@ -98,7 +99,7 @@ const CourseUnit = ({ courseId }) => {
);
}
-
+ console.log('movedXBlockParams =======>', movedXBlockParams);
const finalizeXBlockOrder = () => (newXBlocks) => {
handleXBlockDragAndDrop(newXBlocks.map(xBlock => xBlock.id), () => {
setUnitXBlocks(initialXBlocksData);
diff --git a/src/course-unit/CourseUnit.test.jsx b/src/course-unit/CourseUnit.test.jsx
index 4127058189..1eeb02823d 100644
--- a/src/course-unit/CourseUnit.test.jsx
+++ b/src/course-unit/CourseUnit.test.jsx
@@ -1513,37 +1513,6 @@ describe('', () => {
});
});
- it('should expand xblocks when "Expand all" button is clicked', async () => {
- const { getByRole, getAllByTestId } = render();
-
- axiosMock
- .onGet(getCourseVerticalChildrenApiUrl(blockId))
- .reply(200, courseVerticalChildrenMock);
-
- await executeThunk(fetchCourseVerticalChildrenData(blockId), store.dispatch);
-
- const expandAllXBlocksBtn = getByRole('button', { name: messages.expandAllButton.defaultMessage });
- const unitXBlocks = getAllByTestId('course-xblock');
-
- unitXBlocks.forEach((unitXBlock) => {
- const unitXBlockContentSections = unitXBlock.querySelectorAll('.pgn__card-section');
- expect(unitXBlockContentSections).toHaveLength(0);
- });
-
- userEvent.click(expandAllXBlocksBtn);
-
- await waitFor(() => {
- const collapseAllXBlocksBtn = getByRole('button', { name: messages.collapseAllButton.defaultMessage });
- expect(collapseAllXBlocksBtn).toBeInTheDocument();
-
- unitXBlocks.forEach((unitXBlock) => {
- const unitXBlockContentSections = unitXBlock.querySelectorAll('.pgn__card-section');
- // xblock content appears inside the xblock element
- expect(unitXBlockContentSections.length).toBeGreaterThan(0);
- });
- });
- });
-
describe('Edit and move modals', () => {
it('should close the edit modal when the close button is clicked', async () => {
const { getByTitle, getAllByTestId } = render();
diff --git a/src/course-unit/course-xblock/CourseXBlock.jsx b/src/course-unit/course-xblock/CourseXBlock.jsx
index 0cad179471..7ae4f25710 100644
--- a/src/course-unit/course-xblock/CourseXBlock.jsx
+++ b/src/course-unit/course-xblock/CourseXBlock.jsx
@@ -48,7 +48,7 @@ const CourseXBlock = ({
useEffect(() => {
const handleMessage = (event) => {
const { method, params } = event.data;
-
+ console.log('method ===>', method);
if (method === 'close_modal') {
toggleLegacyEditModal(false);
dispatch(fetchCourseVerticalChildrenData(blockId));
diff --git a/src/course-unit/data/api.js b/src/course-unit/data/api.js
index dd1a2e42c8..e0a03698d3 100644
--- a/src/course-unit/data/api.js
+++ b/src/course-unit/data/api.js
@@ -19,9 +19,10 @@ export const postXBlockBaseApiUrl = () => `${getStudioBaseUrl()}/xblock/`;
* @returns {Promise