fix: [AA-1018] api refactor

This is the first step toward clearing out the redundant metadata from the
coursewareMetadata and getting it from a common source - the courseHomeMetadata.

remove username from coursewareMetadata
Remove courseAccess from coursewareMetadata.

Fix all unit tests
Modify classes that use metadataModel to use courseHomeMetadata for common data.
metadataModel still exists as a mechanism to distinguish if a component is under
courseware or courseHome, and it will be renamed or removed in a later refactor.
This commit is contained in:
Chris Deery
2022-01-14 08:54:07 -05:00
parent 6db421eade
commit 3fe5bb1733
25 changed files with 127 additions and 62 deletions

View File

@@ -5,9 +5,9 @@ import { Factory } from 'rosie'; // eslint-disable-line import/no-extraneous-dep
import './tab.factory';
export default new Factory()
.sequence('id', (i) => `course-v1:edX+DemoX+Demo_Course_${i}`)
.option('host')
.attrs({
id: 'course-v1:edX+DemoX+Demo_Course_1',
is_staff: false,
original_user_is_staff: false,
number: 'DemoX',