{"action":"created","issue":{"url":"https://api.github.com/repos/oppia/oppia/issues/4057","repository_url":"https://api.github.com/repos/oppia/oppia","labels_url":"https://api.github.com/repos/oppia/oppia/issues/4057/labels{/name}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/4057/comments","events_url":"https://api.github.com/repos/oppia/oppia/issues/4057/events","html_url":"https://github.com/oppia/oppia/issues/4057","id":271297365,"number":4057,"title":"Test frontend services","user":{"login":"shubha1593","id":7807557,"avatar_url":"https://avatars1.githubusercontent.com/u/7807557?v=4","gravatar_id":"","url":"https://api.github.com/users/shubha1593","html_url":"https://github.com/shubha1593","followers_url":"https://api.github.com/users/shubha1593/followers","following_url":"https://api.github.com/users/shubha1593/following{/other_user}","gists_url":"https://api.github.com/users/shubha1593/gists{/gist_id}","starred_url":"https://api.github.com/users/shubha1593/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubha1593/subscriptions","organizations_url":"https://api.github.com/users/shubha1593/orgs","repos_url":"https://api.github.com/users/shubha1593/repos","events_url":"https://api.github.com/users/shubha1593/events{/privacy}","received_events_url":"https://api.github.com/users/shubha1593/received_events","type":"User","site_admin":false},"labels":[{"id":383795018,"url":"https://api.github.com/repos/oppia/oppia/labels/frontend","name":"frontend","color":"d4c5f9","default":false},{"id":719357022,"url":"https://api.github.com/repos/oppia/oppia/labels/good%20first%20issue","name":"good first issue","color":"c5def5","default":true},{"id":719397439,"url":"https://api.github.com/repos/oppia/oppia/labels/talk-to:%20@shubha1593","name":"talk-to: @shubha1593","color":"eeeeee","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":42,"created_at":"2017-11-05T17:21:36Z","updated_at":"2018-04-17T17:59:50Z","closed_at":"2018-04-17T17:59:50Z","author_association":"MEMBER","body":"_This is intended as a starter project for newer contributors._\r\n\r\nIn order to prevent future regressions, we want to ensure that all services in our frontend codebase are thoroughly tested. In particular, each method of every service should have a thorough set of tests that prevents it from breaking in the future. Tests should cover both \"happy paths\" and unexpected conditions. We recommend also writing JSDoc for the functions you are testing in order to make the contract of each method clear, so that the resulting tests will only need to cover arguments satisfying the input/output descriptions in these JSDocs.\r\n\r\nAs a sanity-check, you can check the coverage of a file (i.e. how many lines of code in the file are covered by tests) using Karma Coverage, as follows:\r\n  - On your local machine, run `scripts/run_frontend_tests.sh`.\r\n  - When the tests finish running, go to the karma_coverage_reports directory (in the same directory where your oppia, oppia_tools etc. reside). Open index.html in your browser and check out the coverage of the file for which you are writing the test for. It should be 100%.\r\n\r\nNote that coverage is just a sanity-check, and isn't the metric for success. What matters is that each method in the service should be tested thoroughly.\r\n\r\nSpec files for services tests consist of the name of the service, followed by `Spec.js`. For example, the tests for `ExplorationEmbedButtonService.js` are contained in the test file `ExplorationEmbedButtonServiceSpec.js`. When writing tests, if a Spec file already exists for the service you have picked, then edit the existing file. If a Spec file isn't present yet, create a new file and name it accordingly. You can also take a look at the existing Spec files for different services to get an idea on how to get started.\r\n\r\nIf you'd like to help with this issue, please select a file from the list below, put your name in parentheses next to it, and submit a PR when you've completed writing the test. Once the PR is submitted, you can tick the checkboxes. Note that all filepaths should be assumed to start from `core/templates/dev/head`.\r\n\r\n----\r\n\r\n**Files to write tests for:**  \r\n\r\n- components/forms \r\n  - [ ] FormBuilder.js\r\n- domain/summary\r\n  - [ ] ExplorationSummaryBackendApiService.js (see #4690 for prior work)\r\n- expressions\r\n  - [ ] ExpressionSyntaxTreeService.js\r\n- pages/exploration_editor/editor_tab  \r\n  - [ ] InteractionDetailsCacheService.js\r\n  - [ ] ResponsesService.js\r\n- pages/exploration_editor\r\n  - [ ] ExplorationAdvancedFeaturesService.js\r\n  - [ ] ExplorationDiffService.js\r\n  - [ ] ExplorationSaveService.js\r\n  - [ ] ParameterMetadataService.js\r\n  - [ ] RouterService.js @subhdeep\r\n  - [ ] UserEmailPreferencesService.js\r\n- pages/exploration_player\r\n  - [ ] AudioPreloaderService.js\r\n  - [ ] ExplorationPlayerStateService.js\r\n  - [ ] ExplorationRecommendationsService.js\r\n  - [ ] FatigueDetectionService.js\r\n  - [ ] LearnerViewRatingService.js\r\n  - [ ] PlayerPositionService.js\r\n  - [ ] PlayerService.js\r\n  - [ ] SolutionManagerService.js\r\n  - [ ] StatsReportingService.js\r\n- services\r\n  - [ ] AudioPlayerService.js\r\n  - [ ] AutogeneratedAudioPlayerService.js\r\n  - [ ] AutoplayedVideosService.js @proishan11 \r\n  - [ ] DebouncerService.js\r\n  - [ ] IdGenerationService.js \r\n  - [ ] MessengerService.js\r\n- (root)\r\n  - [ ] i18n.js\r\n  - [ ] app.js\r\n- domain/collection\r\n  - [ ] CollectionPlaythroughObjectFactory.js\r\n- domain/exploration\r\n  - [ ] AnswerGroupObjectFactory.js\r\n  - [ ] HintObjectFactory.js\r\n  - [ ] InteractionObjectFactory.js\r\n  - [ ] OutcomeObjectFactory.js\r\n  - [ ] ParamChangesObjectFactory.js\r\n  - [ ] TriggerObjectFactory.js\r\n- domain/utilities\r\n  - [ ] AudioLanguageObjectFactory.js\r\n  - [ ] AutogeneratedAudioLanguageObjectFactory.js\r\n\r\n---\r\n**Completed**\r\n- pages/exploration_editor/editor_tab  \r\n  - [x] AnswerGroupsCacheService.js @vinitamurthi\r\n- pages/exploration_editor/feedback_tab @paroothisumit #4606 \r\n  - [x] ThreadStatusDisplayService.js\r\n- services\r\n  - [x] EditabilityServices.js @square-1111 \r\n- services/stateful @aks681 #4148 \r\n  - [x] BackgroundMaskService.js\r\n  - [x] FocusManagerService.js\r\n- domain/learner_dashboard @nithusha21  #4135 \r\n  - [x] LearnerDashboardBackendApiService.js\r\n  - [x] LearnerDashboardIdsBackendApiService.js\r\n  - [x] LearnerPlaylistService.js\r\n  - domain/sidebar @WickedBrat  #4520 \r\n  - [x] SidebarStatusService.js\r\n- domain/classifier @jervis446 #4305 \r\n  - [x] AnswerClassificationResultObjectFactory.js\r\n  - [x] ClassifierObjectFactory.js\r\n"},"comment":{"url":"https://api.github.com/repos/oppia/oppia/issues/comments/382086084","html_url":"https://github.com/oppia/oppia/issues/4057#issuecomment-382086084","issue_url":"https://api.github.com/repos/oppia/oppia/issues/4057","id":382086084,"user":{"login":"DubeySandeep","id":16653571,"avatar_url":"https://avatars0.githubusercontent.com/u/16653571?v=4","gravatar_id":"","url":"https://api.github.com/users/DubeySandeep","html_url":"https://github.com/DubeySandeep","followers_url":"https://api.github.com/users/DubeySandeep/followers","following_url":"https://api.github.com/users/DubeySandeep/following{/other_user}","gists_url":"https://api.github.com/users/DubeySandeep/gists{/gist_id}","starred_url":"https://api.github.com/users/DubeySandeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DubeySandeep/subscriptions","organizations_url":"https://api.github.com/users/DubeySandeep/orgs","repos_url":"https://api.github.com/users/DubeySandeep/repos","events_url":"https://api.github.com/users/DubeySandeep/events{/privacy}","received_events_url":"https://api.github.com/users/DubeySandeep/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T17:59:50Z","updated_at":"2018-04-17T17:59:50Z","author_association":"MEMBER","body":"Hi @vinitamurthi, I've assigned you to `InteractionDetailsCacheService.js` part of this issue, you can start working on it. Thanks! :) "}}
{"actor":{"display_login":"DubeySandeep"}}