Skip to content

Commit

Permalink
Revert "fix: get library blocks editing to work locally (openedx#431)" (
Browse files Browse the repository at this point in the history
openedx#433)

This reverts commit fd3ed5d.
  • Loading branch information
jesperhodge authored Dec 12, 2023
1 parent 6dab3a1 commit 57042c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
5 changes: 0 additions & 5 deletions src/editors/data/services/cms/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ export const apiMethods = {
),
fetchByUnitId: ({ blockId, studioEndpointUrl }) => get(
urls.blockAncestor({ studioEndpointUrl, blockId }),
{
headers: {
Accept: '*/*',
},
},
),
fetchStudioView: ({ blockId, studioEndpointUrl }) => get(
urls.blockStudioView({ studioEndpointUrl, blockId }),
Expand Down
26 changes: 13 additions & 13 deletions src/editors/data/services/cms/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jest.mock('../../../utils', () => {
});

jest.mock('./urls', () => ({
block: jest.fn().mockReturnValue('urls.block'),
blockAncestor: jest.fn().mockReturnValue('urls.blockAncestor'),
blockStudioView: jest.fn().mockReturnValue('urls.StudioView'),
courseAssets: jest.fn().mockReturnValue('urls.courseAssets'),
videoTranscripts: jest.fn().mockReturnValue('urls.videoTranscripts'),
allowThumbnailUpload: jest.fn().mockReturnValue('urls.allowThumbnailUpload'),
thumbnailUpload: jest.fn().mockReturnValue('urls.thumbnailUpload'),
checkTranscriptsForImport: jest.fn().mockReturnValue('urls.checkTranscriptsForImport'),
courseDetailsUrl: jest.fn().mockReturnValue('urls.courseDetailsUrl'),
courseAdvanceSettings: jest.fn().mockReturnValue('urls.courseAdvanceSettings'),
replaceTranscript: jest.fn().mockReturnValue('urls.replaceTranscript'),
videoFeatures: jest.fn().mockReturnValue('urls.videoFeatures'),
block: jest.fn().mockName('urls.block'),
blockAncestor: jest.fn().mockName('urls.blockAncestor'),
blockStudioView: jest.fn().mockName('urls.StudioView'),
courseAssets: jest.fn().mockName('urls.courseAssets'),
videoTranscripts: jest.fn().mockName('urls.videoTranscripts'),
allowThumbnailUpload: jest.fn().mockName('urls.allowThumbnailUpload'),
thumbnailUpload: jest.fn().mockName('urls.thumbnailUpload'),
checkTranscriptsForImport: jest.fn().mockName('urls.checkTranscriptsForImport'),
courseDetailsUrl: jest.fn().mockName('urls.courseDetailsUrl'),
courseAdvanceSettings: jest.fn().mockName('urls.courseAdvanceSettings'),
replaceTranscript: jest.fn().mockName('urls.replaceTranscript'),
videoFeatures: jest.fn().mockName('urls.videoFeatures'),
courseVideos: jest.fn()
.mockName('urls.courseVideos')
.mockImplementation(
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('cms api', () => {
describe('fetchByUnitId', () => {
it('should call get with url.blockAncestor', () => {
apiMethods.fetchByUnitId({ blockId, studioEndpointUrl });
expect(get).toHaveBeenCalledWith(urls.blockAncestor({ studioEndpointUrl, blockId }), { headers: { Accept: '*/*' } });
expect(get).toHaveBeenCalledWith(urls.blockAncestor({ studioEndpointUrl, blockId }));
});
});

Expand Down

0 comments on commit 57042c9

Please sign in to comment.