-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from edx/aakbar/PROD-2395
refactor: move api calls in entitlement component
- Loading branch information
Showing
6 changed files
with
188 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
const entitlementsData = { | ||
data: { | ||
results: [ | ||
{ | ||
user: 'edX', | ||
uuid: 'entitlement-uuid', | ||
courseUuid: 'course-uuid', | ||
enrollmentCourseRun: 'course-v1:testX+test123+2030', | ||
created: Date().toLocaleString(), | ||
modified: Date().toLocaleString(), | ||
expiredAt: Date().toLocaleString(), | ||
mode: 'verified', | ||
orderNumber: '123edX456', | ||
supportDetails: [{ | ||
supportUser: 'admin', | ||
action: 'CREATE', | ||
actionCreated: Date().toLocaleString(), | ||
comments: 'creating entitlement', | ||
unenrolledRun: null, | ||
}, | ||
{ | ||
supportUser: 'admin', | ||
action: 'EXPIRE', | ||
actionCreated: Date().toLocaleString(), | ||
comments: 'expiring entitlement', | ||
unenrolledRun: null, | ||
}, | ||
], | ||
export const entitlementsData = { | ||
results: [ | ||
{ | ||
user: 'edX', | ||
uuid: 'entitlement-uuid', | ||
courseUuid: 'course-uuid', | ||
enrollmentCourseRun: 'course-v1:testX+test123+2030', | ||
created: Date().toLocaleString(), | ||
modified: Date().toLocaleString(), | ||
expiredAt: Date().toLocaleString(), | ||
mode: 'verified', | ||
orderNumber: '123edX456', | ||
supportDetails: [{ | ||
supportUser: 'admin', | ||
action: 'CREATE', | ||
actionCreated: Date().toLocaleString(), | ||
comments: 'creating entitlement', | ||
unenrolledRun: null, | ||
}, | ||
{ | ||
user: 'edX', | ||
uuid: 'entitlement-1-uuid', | ||
courseUuid: 'course-1-uuid', | ||
enrollmentCourseRun: 'course-v1:testX+test123+2040', | ||
created: Date().toLocaleString(), | ||
modified: Date().toLocaleString(), | ||
expiredAt: Date().toLocaleString(), | ||
mode: 'professional', | ||
orderNumber: '123edX456789', | ||
supportDetails: [], | ||
supportUser: 'admin', | ||
action: 'EXPIRE', | ||
actionCreated: Date().toLocaleString(), | ||
comments: 'expiring entitlement', | ||
unenrolledRun: null, | ||
}, | ||
], | ||
}, | ||
user: 'edX', | ||
expanded: true, | ||
changeHandler: jest.fn(() => {}), | ||
], | ||
}, | ||
{ | ||
user: 'edX', | ||
uuid: 'entitlement-1-uuid', | ||
courseUuid: 'course-1-uuid', | ||
enrollmentCourseRun: null, | ||
created: Date().toLocaleString(), | ||
modified: Date().toLocaleString(), | ||
expiredAt: null, | ||
mode: 'professional', | ||
orderNumber: '123edX456789', | ||
supportDetails: [], | ||
}, | ||
], | ||
}; | ||
|
||
export default entitlementsData; | ||
export const entitlementsErrors = { | ||
errors: [ | ||
{ | ||
code: null, | ||
dismissible: true, | ||
text: 'Test Error', | ||
type: 'danger', | ||
topic: 'entitlements', | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.