-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mock Assessment API calls (#113)
Resolves #74 * Add /missions result * Add closed and all missions Also added a counter for all the ids * Add mock questions * Make assessment folder * Add types and interfaces for assessment api calls * Match mock data to updated fields - Only closed assessment previews available (2 of them) - 3 open assessment previews - Changed dates to string * Make Questions use inheritence The union of interfaces seems to work. * Use IAssessment in Assessment component * Change dispatch name in component * Use proper variable names in AssessmentContainer * Change state to use IAssessment Also: - Used `Array<T>` for definition in mock api - Formatted AssessmentContainer * Use IAssessmentOverview in academy/missions Also removed category-specific assessments * Use IAssessmentOverview for Missions Also added an enum for AssessmentCategory * Fix mission tests * Use assessment-related names in MissionsContainer * Modify state to use IAssessmentOverview * Modify mission info fetch action to assessment * Fix linting and tests * Fix filtering issue for missions The problem was with a faulty dataset.Also added - Fix for not showing "loading" page (which was a mistake I made a few commits ago) - Spacing out for contentdisplay cards * Use enum category values * Arrange fields in alphabetical order * Format mockAPI * Make fetchAssessmentOverviews general This is because the API fetch is to fetch all the previews. Having the parameter for category there, but not using it (or using it, resulting in multiple calls for multiple categories) is not preferred. * Add saga for assessment overview fetching Note that the initial data is still not removed. * Add mock API fetch for assessment overviews The default value for the overviews is now undefined so as to simulate the fetching. * Format some files * Add API call for fetching assessment Moved the fetch dispact in the academy/mission component from the render function to the componentWillMount function, as we should not render (due to content updates) while the render function is running. * Format and update test files * Add historyHelper to state It got lost somewhere in the rebase * Use typed Map instead of Object for IAssessments
- Loading branch information
Showing
14 changed files
with
570 additions
and
113 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
Oops, something went wrong.