Repository: oppia/oppia

Issue:
Test frontend services
_This is intended as a starter project for newer contributors but if you're already a contributor for some time, you can help as well._

NOTE: Please ping @nithusha21 if you have any questions about this issue or would like to be assigned to some part of it.

In order to prevent future regressions, we want to ensure that all services in our frontend codebase are thoroughly tested. If it's your first time here, please read carefully the guide of how to get started with frontend unit testing: [Guide for writing frontend tests](https://github.com/oppia/oppia/wiki/Frontend-unit-tests-guide). **Please use this guide as your helper, all the instructions of how to test properly is in it**.

Also, here is Oppia's wiki page for [running the client-side Karma tests](https://github.com/oppia/oppia/wiki/Running-Tests#client-side-tests).

The services are separated by three levels of complexity:
| Complexity      |      Easy        | Medium          | Hard               |
|:---------------:|:----------------:|:---------------:|:------------------:|
| Number of lines |  up to 100 lines | up to 250 lines | at least 250 lines |

Then, it doesn't matter if you're new to unit test or if you're looking for something more challenging, there will be service for you work with.

Each file is marked with two information that will help you to decide which service to pick. For example:
- [ ] **A - B** service-name.service.ts

A means the service complexity: E for Easy, M for medium and H for Hard.
B means if the service has a spec file: Y for Yes and N for No.

Spec files for services tests consist of the name of the service, followed by `.spec.ts` or `Spec.ts`, it depends of the service file name structure:
- Use `.spec.ts` for services like: service-name.service.ts
- Use `Spec.ts` for services like: ServiceNameService.ts
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. 

_Note: We are currently in the process of upgrading AngularJS to Angular. If the service is written in AngularJS, write the test in AngularJS. If the service is written in Angular, write the test in Angular. We would also prefer to cover all Angular files before moving to AngularJS files to prevent extra work during the migration._

**If you'd like to help with this issue, please select a file from the list below, comment on the thread with the file name or any query you'd like to be assigned, and submit a PR when you've completed writing the test. Once the PR is submitted, you can tick the checkboxes.**

PR's for reference: [#4135](https://github.com/oppia/oppia/pull/4135) #8916 #8934 

----

**Files to write tests for or increase until 100%:**

**Angular files**
- core/templates
  - components/graph-services
    - [ ] **H - N** graph-layout.service.ts
  - components/state-editor
    - [ ] **M - Y** state-editor.service.ts @Deepam101
    - [ ] **M - Y** state-property.service.ts
  - domain/collection
    - [ ] **M - Y** collection-node.model.ts @Nisarg-Chaudhari 
    - [ ] **H - Y** collection.model.ts
    - [ ] **E - N** collection-playthrough.model.ts @karthikshetty03
    - [ ] **M - Y** editable-collection-backend-api.service.ts
    - [ ] **M - Y** read-only-collection-backend-api.service.ts
  - domain/question
    - [ ] **E - Y** pretest-question-backend-api.service.ts @wcascades 
  - domain/skill
    - [ ] **H - Y** SkillObjectFactory.ts
  - domain/state_card
    - [ ] **M - Y** StateCardObjectFactory.ts
  - domain/story
    - [ ] **M - Y** editable-story-backend-api.service.ts @kaushambisharma 
    - [ ] **H - Y** StoryContentsObjectFactory.ts
    - [ ] **H - Y** story-node.model.ts    
  - domain/topic
    - [ ] **M - Y** SubtopicObjectFactory.ts
    - [ ] **M - Y** SubtopicPageObjectFactory.ts
    - [ ] **H - Y** TopicObjectFactory.ts
  - domain/topics_and_skills_dashboard
    - [ ] **E - Y** topics-and-skills-dashboard-backend-api.service.ts @michaelw54  
  - domain/utilities
    - [ ] **M - Y** language-util.service.ts @laujamie 
    - [ ] **M - Y** url-interpolation.service.ts
  - expressions
    - [ ] **M - Y** expression-evaluator.service.ts
    - [ ] **M - Y** expression-interpolation.service.ts
  - pages/community-dashboard-page
    - [ ] **M - Y** contribution-opportunities-backend-api.service.ts
  - pages/email-dashboard-pages
    - [ ] **M - Y** email-dashboard-data.service.ts @siddharthmehta02
  - pages/exploration-editor-page
    - [ ] **H - N** exploration-diff.service.ts
    - [ ] **M - Y** version-tree.service.ts
 - pages/exploration-player-page 
    - [x] **E - Y** audio-translation-manager.service.ts @Nik-09 
    - [ ] **M - Y** answer-classification.service.ts
    - [ ] **M - Y** audio-preloader.service.ts
    - [ ] **M - Y** current-interaction.service.ts
    - [ ] **E - N** exploration-recommendations.service.ts @TheoLipeles 
    - [ ] **M - Y** learner-answer-info.service.ts
    - [ ] **E - N** player-correctness-feedback-enabled.service.ts @soumyo123-prog
    - [ ] **M - Y** player-transcript.service.ts
    - [ ] **H - N** question-player-engine.service.ts @ehwu
    - [ ] **H - N** stats-reporting.service.ts
  - pages/story-editor-page
    - [ ] **M - Y** story-editor-state.service.ts
  - services
    - [ ] **E - N** autogenerated-audio-player.service.ts
    - [ ] **H - Y** context.service.ts @HarshKhilawala 
    - [ ] **E - Y** csrf-token.service.ts @Nik-09
    - [ ] **E - Y** html-escaper.service.ts @Nik-09
    - [ ] **M - N** messenger.service.ts
    - [ ] **E - Y** promo-bar-backend-api.service.ts @tanishq67
    - [ ] **M - N** request-interceptor.service.ts
    - [ ] **M - Y** state-top-answers-stats.service.ts
    - [ ] **E - Y** utils.service.ts @HarshKhilawala
- extensions
  - classifiers
    - [ ] **H - Y** python-program.tokenizer.ts
    - [ ] **H - Y** svm-prediction.service.ts
  - extensions
    - [ ] **M - N** base-interaction-validation.service.ts
    - [ ] **H - Y** code-repl-prediction.service.ts
    - [ ] **E - Y** continue-rules.service.ts
    - [ ] **M - Y** drag-and-drop-sort-input-validation.service.ts
    - [ ] **E - N** end-exploration-rules.service.ts @SAEb-ai
    - [ ] **H - Y** fraction-input-validation.service.ts
    - [ ] **E - N** graph-detail.service.ts @safwan20 
    - [ ] **M - Y** graph-input-rules.service.ts
    - [ ] **M - Y** graph-input-validation.service.ts
    - [ ] **M - N** graph-utils.service.ts @atpug22
    - [ ] **M - Y** item-selection-input-validation.service.ts
    - [ ] **M - Y** music-notes-input-rules.service.ts
    - [ ] **E - N** music-phrase-player.service.ts @HarshKhilawala 
    - [ ] **M - Y** number-with-units-validation.service.ts @akshayrathi2102
    - [ ] **M - Y** numeric-input-validation.service.ts @EeshaArif

**AngularJS files**
- core/templates
  - components/entity_creation
    - [ ] **M - N** exploration-creation.service.ts 
    - [ ] **E - N** skill-creation.service.ts @LakmaNeha
    - [ ] **E - N** story-creation.service.ts @taiwo2
    - [ ] **E - N** topic-creation.service.ts
  - domain/collection
    - [ ] **H - Y** collection-update.service.ts
  - domain/question
    - [ ] **M - Y** question-update.service.ts
  - domain/skill
    - [ ] **H - Y** skill-update.service.ts
  - domain/story
    - [ ] **H - Y** story-update.service.ts
  - pages/community-dashboard-page
    - [ ] **M - Y** contribution-and-review.service.ts
    - [ ] **E - N** contribution-opportunities.service.ts    
    - [ ] **M - N** translate-text.service.ts
  - pages/exploration-editor-page
    - [ ] **M - N** change-list.service.ts
    - [ ] **H - N** exploration-save.service.ts
    - [ ] **H - Y** exploration-states.service.ts
    - [ ] **E - N** state-tutorial-first-time.service.ts @safwan20
    - [ ] **M - N** suggestion-modal-for-exploration-editor.service.ts
    - [ ] **M - N** voiceover-recording.service.ts
  - pages/exploration-player-page 
    - [ ] **H - N** exploration-engine.service.ts
    - [ ] **H - Y** exploration-player-state.service.ts
    - [ ] **E - N** fatigue-detection.service.ts 
    - [ ] **M - N** hint-and-solution-modal.service.ts @Radesh-kumar
    - [ ] **M - Y** learner-answer-info.service.ts
    - [ ] **E - N** refresher-exploration-confirmation-modal.service.ts
    - [ ] **M - N** suggestion-modal-for-exploration-player.service.ts
  - pages/skill-editor-page
    - [ ] **M - Y** skill-editor-state.service.ts
  - pages/topic_editor
    - [ ] topic-editor-state.service.ts 
  - services
    - [ ] **M - N** audio-player.service.ts
    - [ ] **E - Y** image-upload-helper.service.tests @sachinchauhan2889
    - [ ] **E - N** translation-file-hash-loader.service.ts

---
<details>
<summary><strong>Click to see the list of completed work.</strong></summary>

- components/forms 
  - [x] FormBuilder.js -- @unit-00 
- components/state_editor
  - [x] StateParamChangesService.ts @safwan20 
  - [x] StateHintsService.ts @safwan20 
  - [x] StateNameService.ts @safwan20 
- domain/classifier
  - [x] AnswerClassificationResultObjectFactory.js @jervis446 #4305 
  - [x] ClassifierObjectFactory.js @jervis446 #4305 
  - [x] PredictionResultObjectFactory.ts @marianazangrossi 
- domain/classroom
  - [x] **E - Y**classroom-backend-api.service.ts @krishnarao22
- domain/collection
  - [x] CollectionRightsBackendApiService.ts @marianazangrossi 
  - [x] CollectionRightsObjectFactory.ts @marianazangrossi 
  - [x] CollectionValidationService.ts @marianazangrossi 
- domain/creator_dashboard
  - [x] CreatorDashboardBackendApiService.ts @marianazangrossi 
- domain/exploration
  - [x] AnswerStatsObjectFactory.ts @marianazangrossi 
  - [x] ExplorationObjectFactory.ts @marianazangrossi 
  - [x] HintObjectFactory.js @YashJipkate 
  - [x] InteractionObjectFactory.js  @YashJipkate 
  - [x] OutcomeObjectFactory.js @abhaygupta97 
  - [x] ParamChangeObjectFactory.ts @marianazangrossi 
  - [x] ParamChangesObjectFactory.ts - @lakshay-angrish
  - [x] ParamSpecObjectFactory.ts @marianazangrossi 
  - [x] ParamSpecsObjectFactory.ts @marianazangrossi 
  - [x] RuleObjectFactory.ts @abhayraghuwanshi 
  - [x] SolutionObjectFactory.ts @marianazangrossi 
  - [x] TriggerObjectFactory.js @17bcs029 (removed the file)
  - [x] WrittenTranslationsObjectFactory.ts @marianazangrossi 
- domain/learner_dashboard
  - [x] LearnerDashboardActivityIdsObjectFactory @marianazangrossi 
  - [x] LearnerDashboardBackendApiService.js @nithusha21 @marianazangrossi 
  - [x] LearnerDashboardIdsBackendApiService.js @nithusha21 @marianazangrossi 
  - [x] LearnerPlaylistService.js @nithusha21 #4135 
- domain/objects
  - [x] UnitsObjectFactory.ts - @felicityzhao99
- domain/question
  - [x] EditableQuestionBackendApiService.ts @marianazangrossi 
  - [x] QuestionBackendApiService.ts @jimbyo 
  - [x] QuestionObjectFactory.ts @jimbyo 
- domain/sidebar @WickedBrat  #4520 
  - [x] SidebarStatusService.js
- domain/skill
  - [x] ConceptCardBackendApiService.ts @marianazangrossi 
  - [x] EditableSkillBackendApiService.ts @marianazangrossi 
  - [x] MisconceptionObjectFactory.ts @marianazangrossi 
  - [x] SkillRightsObjectFactory.ts @marianazangrossi 
  - [x] SkillRightsBackendApiService.ts @marianazangrossi 
- domain/state
  - [x] StateObjectFactory.ts @marianazangrossi 
- domain/statistics
  - [x] FeedbackImprovementTaskObjectFactory.ts @marianazangrossi 
  - [x] PlaythroughImprovementTaskObjectFactory.ts @marianazangrossi 
  - [x] SuggestionImprovementTaskObjectFactory.ts @marianazangrossi 
- domain/suggestion
  - [x] SuggestionThreadObjectFactory.ts @marianazangrossi 
- domain/summary
  - [x] ExplorationSummaryBackendApiService.ts @marianazangrossi 
- domain/topic
  - [x] EditableTopicBackendApiService.ts @marianazangrossi 
  - [x] TopicRightsBackendApiService.ts @marianazangrossi 
  - [x] TopicRightsObjectFactory.ts @marianazangrossi 
- domain/user
  - [x] UserInfoObjectFactory.ts
- domain/utilities
  - [x] AudioLanguageObjectFactory.js @hoangviet1993
  - [x] AutogeneratedAudioLanguageObjectFactory.js @hoangviet1993
  - [x] BrowserCheckerService.ts @marianazangrossi 
- pages/creator_dashboard
  - [x] SuggestionModalForCreatorViewService.ts @marianazangrossi 
- pages/exploration_editor
  - [x] AnswerGroupsCacheService.js @vinitamurthi
  - [x] AutosaveInfoModalService.ts @marianazangrossi 
  - [x] ChangesInHumanReadableFormService.ts @marianazangrossi 
  - [x] CompareVersionService.ts @marianazangrossi 
  - [x] EditorFirstTimeEventsService.ts @marianazangrossi 
  - [x] **E - N** exploration-category.service.ts @safwan20 
  - [x] ExplorationCorrectnessFeedbackService.ts @marianazangrossi 
  - [x] ExplorationDataService.ts @marianazangrossi 
  - [x] ExplorationPropertyService.ts @marianazangrossi 
  - [x] ExplorationRightsService.ts @marianazangrossi 
  - [x] **E - N** exploration-tags.service.ts @safwan20 
  - [x] ExplorationWarningsService.ts @marianazangrossi 
  - [x] GraphDataService.ts @marianazangrossi 
  - [x] InteractionDetailsCacheService.js @vinitamurthi
  - [x] ImprovementModalService.ts @marianazangrossi 
  - [x] LearnerAnswerDetailsDataService.ts @marianazangrossi 
  - [x] ParameterMetadataService.ts @marianazangrossi 
  - [x] ResponsesService.ts @marianazangrossi 
  - [x] RouterService.ts @marianazangrossi 
  - [x] SolutionVerificationService.ts @marianazangrossi 
  - [x] ThreadDataService.ts @marianazangrossi 
  - [x] ThreadStatusDisplayService.js @paroothisumit #4606 
  - [x] TranslationLanguageService.ts @marianazangrossi 
  - [x] UserEmailPreferencesService.ts  @Arnesh07 
pages/exploration_player
  - [x] AudioTranslationLanguageService.ts @marianazangrossi 
  - [x] HitsAndSolutionManager.service.ts @marianazangrossi 
  - [x] ImagePreloaderService.ts @marianazangrossi 
  - [x] StateClassifierMappingService.ts @marianazangrossi 
pages/skill_editor
  - [x] SkillEditorRoutingService.ts @marianazangrossi 
- services
  - [x] AlertsService.ts @marianazangrossi 
  - [x] AssetsBackendApiService.ts @marianazangrossi 
  - [x] AutoplayedVideosService.js @proishan11 #4805 
  - [x] BackgroundMaskService.js @aks681
  - [x] CodeNormalizerService.ts @marianazangrossi 
  - [x] ConstructTranslationIdsService.ts @marianazangrossi 
  - [x] EditabilityServices.js @square-1111
  - [x] **E - N** exploration-features.service.ts @abhayraghuwanshi 
  - [x] IdGenerationService.js @lilithxxx 
  - [x] DateTimeFormatService.ts @marianazangrossi 
  - [x] DebouncerService.ts @marianazangrossi 
  - [x] DeviceInfoService.ts @marianazangrossi
  - [x] DocumentAttributeCustomizationService.ts @marianazangrossi
  - [x] ExtensionTagAssemblerService.ts @marianazangrossi 
  - [x] FocusManagerService.js @aks681
  - [x] LocalStorageService.ts @marianazangrossi 
  - [x] LoggerService.ts @marianazangrossi
  - [x] MetaTagCustomizationService.ts @marianazangrossi
  - [x] NavigationService.ts @marianazangrossi 
  - [x] NestedDirectivesRecursionTimeoutPreventionService.ts @marianazangrossi 
  - [x] PageTitleService.ts @marianazangrossi 
  - [x] PlayerPositionService.js @ujjwalgulecha
  - [x] PlaythroughIssuesBackendApiService.ts @marianazangrossi  
  - [x] PlaythroughIssuesService.ts @marianazangrossi 
  - [x] QuestionsListService.ts @marianazangrossi 
  - [x] RteHelperService.ts @marianazangrossi 
  - [x] SchemaDefaultValueService.ts @marianazangrossi 
  - [x] SchemaUndefinedLastElementService.ts @marianazangrossi 
  - [x] SearchService.ts @marianazangrossi 
  - [x] SiteAnalyticsService.ts @marianazangrossi 
  - [x] SpeechSynthesisChunkerService.ts @marianazangrossi 
  - [x] SuggestionModalService.ts @marianazangrossi 
  - [x] TrainingDataEditorPainelService.ts @marianazangrossi 
  - [x] TrainingModalService.ts @marianazangrossi 
  - [x] UrlService.ts @marianazangrossi 
  - [x] UserService.ts @marianazangrossi 
  - [x] ValidatorsService.ts @marianazangrossi 
  - [x] WindowDimensionsService.ts @marianazangrossi
  - [x] WindowRefService.ts @marianazangrossi 
- components/ratings
  - [x] **E - Y** rating-computation.service.ts @laujamie
- domain/editor
  - [x] **M - N** base-undo-redo.service.ts
  - [x] **E - N** question-undo-redo.service.ts @safwan20 
- domain/exploration
  - [x] **M - N** AnswerGroupObjectFactory.ts @safwan20 
  - [x] **M - Y** editable-exploration-backend-api.service.ts @shavavo
  - [x] **M - Y** RecordedVoiceoversObjectFactory.ts @shavavo
  - [x] **M - Y** StatesObjectFactory.ts @kevjumba 
- domain/feedback_thread
  - [x] **M - Y** FeedbackThreadSummaryObjectFactory.ts
- domain/objects
  - [x] **H - Y** NumberWithUnitsObjectFactory.ts
Other services:    
- [x] **E - N** collection-creation.service.ts @Hadyn 
- [x] **E - N** exploration-embed-button.service.ts
- [x] **E - N** question-creation.service.ts @mhotiger 
- [x] **E - N** state-content.service.ts @safwan20 
- [x] **E - N** state-customization-args.service.ts @safwan20 
- [x] **E - N** state-interaction-id.service.ts @safwan20 
- [x] **E - N** state-recorded-voiceovers.service.ts @safwan20 
- [x] **E - N** state-solicit-answer-details.service.ts @safwan20 
- [x] **E - N** state-solution.service.ts @safwan20 
- [x] **E - N** state-written-translations.service.ts @safwan20 
- [x] **M - Y** ConceptCardObjectFactory.ts
- [x] **E - Y** SkillDifficultyObjectFactory.ts @tianqi-wu
- domain/statistics
  - [x] **E - Y** learner-answer-details-backend-api.service.ts @arpit1912
- domain/story_viewer
  - [x] **E - Y** story-viewer-backend-api.service.ts @EricZLou 
  - [x] **H - Y** topic-update.service.ts @shavavo
  - [x] **E - N** AudioFileObjectFactory.ts @safwan20 
  - [x] **E - N** FileDownloadRequestObjectFactory.ts @safwan20 
  - [x] **E - N** ImageFileObjectFactory.ts @safwan20 
  - [x] **H - Y** expression-syntax-tree.service.ts @mertdeg2
  - [x] **E - Y** expression-type-parser.service.ts
  - [x] **M - Y** collection-editor-state.service.ts
  - [x] **E - N** question-suggestion.service.ts
  - [x] **E - N** exploration-automatic-text-to-speech.service.ts @safwan20 
  - [x] **E - N** exploration-init-state-name.service.ts
  - [x] **E - N** exploration-language-code.service.ts
  - [x] **E - N** exploration-objective.service.ts
  - [x] **E - N** exploration-param-changes.service.ts @safwan20 
  - [x] **E - N** exploration-param-specs.service.ts @safwan20 
  - [x] **E - N** exploration-title.service.ts
  - [x] **E - Y** state-improvement-suggestion.service.ts 
  - [x] **E - Y** player-position.service.ts @tianqi-wu 
  - [x] **E - Y** prediction-algorithm-registry.service.ts @rriyaldhi
  - [x] **E - N** suggestion-modal-for-learner-dashboard.service.ts @hulyak
  - [x] TopicEditorRoutingService.ts @amanbora
  - [x] **E - N** compute-graph.service.ts
  - [x] **E - Y** improvement-task.service.ts
  - [x] **H - Y** playthrough.service.ts
  - [x] **E - N** pencil-code-editor-validation.service.ts @safwan20 
</details>

Note: For a guide on how to access Oppia's webpages, see [this](https://github.com/oppia/oppia/wiki/How-to-access-Oppia-webpages).


Discussion:
Would it be better to split this into multiple issues (say one per directory)? That way multiple people could work on it simultaneously.
I think one issue should be fine -- we already follow this pattern for our other [starter projects](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#-as-a-new-contributor).
Hey, @shubha1593 Can I take "ExplorationEmbedButtonService.js". Hopefully, it will help me to better my understanding of testing processes and writing specs.  
Hi @Nix07, yup sure! assigned you :)
This is the screenshot of my karma index page at core/templates/dev/head/components/ Why is it not showing any directory inside the components. It's only giving the results for the JS files present in components directory! However, when I bring the "ExplorationEmbedButtonService.js" file in the components directory its result is visible. Please help @shubha1593 
![components](https://user-images.githubusercontent.com/22103406/32457393-00c73d54-c34f-11e7-88ab-21f4e5de09ce.png)

@shubha1593 please assign me editor_tab
Hi @GaganSuneja, assigned you :)
Hey @Nix07, in your URL for that it would be like `...karma_coverage_reports/core/templates/dev/head/components/index.html`, 
make it  `...karma_coverage_reports/index.html`. Let me know if this works!
Hey, @shubha1593 It didn't help. karma_coverage_reports/index.html just contains all the directory (see the screenshot). To get the result of a specific file, I have to go to that directory. 
![karma](https://user-images.githubusercontent.com/22103406/32528440-11573b00-c459-11e7-8a10-03f9871b3157.png)
 
I just tried this, and I run into the same issue as @Nix07.

So I investigated the script at scripts/run_frontend_tests.sh, and, from there, the karma config at core/tests/karma.conf.js. The config actually looks a little off to me, so I simplified it, and I think it works now -- see #4066
Also, @Nix07, thanks for bringing it up! This is a great bug to catch and I'm happy we're fixing it. 
Hi can I write tests for domain/learner_dashboard?
@nithusha21, Sure! I've assigned you. 
Hi @shubha1593 , can I take services/stateful?
Hi @aks681, Sure! assigend you. :)
HI @shubha1593 ,can i take domain/classifier?

Hi @jervis446, sure, assigned you.
Hi i am intreseted in taking and working on this issue. Assign me this
Hi @yashLadha, welcome :) Have you followed these steps given [here](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up) to get started? Also, let me know which part you would love to work?
Yes @DubeySandeep . I am intrested in python based web frameworks and also done a certification course in Angular. So would be comfortable with Angular as well. But i am not limiting myself to this only and i am open for learning. :smile: 
@yashLadha, That's great! Can you just let me know in which part of this issue you would love to work? 
@yashLadha, I've assigned you to domain/utilities.
Sure @DubeySandeep 
Hi @WickedBrat, You can start working on ' domain/collection' part. I've assigned you.
Hi @yashLadha, how is it going (the work on domain/utilities)? :)
Working on it. Fixed another issue. Can I send pr for that.

On Dec 30, 2017 1:54 PM, "Sandeep Dubey" <notifications@github.com> wrote:

> Hi @yashladh, how is it going (the work on domain/utilities)? :)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/4057#issuecomment-354534090>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/ARMqT4uBhyUThBmG-R3Ki_ELKRDuLjUiks5tFfMugaJpZM4QSdB1>
> .
>

Hi @shubha1593 Can I take `app.js`?
HI @shreyateeza, I've assigned you to `app.js`.
(_Current coverage for app.js: 41.04%_)
Thanks! :)
Hi @GaganSuneja, are you still working on editor_tab?
domain/summary

- 1.     ExplorationSummaryBackendApiService.js
@shubha1593 can I be assigned this?
Hi @anookeen, I've assigned you to `ExplorationSummaryBackendApiService.js` part of this issue. :)
Thanks @DubeySandeep  :)
@shreyateeza, any update on `app.js`? how is it going? (friendly ping!)
Hi! Can I take `services/IdGenerationService.js`? Thanks :)
@shubha1593 I couldn't locate ```services/explorationServices.js```. 
@proishan11: I've assigned you.   
@square-1111: I think it should be `services/EditabilityService.js`. Do you want to take it up? (Also, @shubha1593: Can you please confirm this?)  
Thanks!
@apb7 Yes, I want to work on this. Thanks. :smile: 
@apb7 @shubha1593 I cannot figure out what to test. Please guide me through this. Do I need to test the randomness, uniqueness of the ID?
proishan11 (AutoplayedVideosService). Since I need some time to figure out how to test `idGenerationService` I am working on `AutoplayedVideosService`.
@apb7 @square-1111, yup it should be `services/EditabilityService.js`, corrected it and assigned you!
@proishan11, noted, thanks!
Can you assign me to InteractionDetailsCacheService.js? Thanks!
Hi @vinitamurthi, I've assigned you to `InteractionDetailsCacheService.js` part of this issue, you can start working on it. Thanks! :) 
Hi hello, can I be assigned FormBuilder.js? Please and thank you!
Hi @unit-00, done -- march ahead :) 
Assigned @A-Yerkeshev for ResponsesService.js
Hello, can I be assigned ExplorationAdvancedFeaturesService.js . Thank you.
Hi @rajvaibhavdubey, assigned you!
can anyone assignee me ExplorationSaveService.js 
@amitsin6h, I've assigned you to `ExplorationSaveService.js` you can start working on it. Thanks! :)
Hi I would like to work on IdGenerationService.js
Hi @lilithxxx, I've assigned you to  `IdGenerationService.js` you can start working on it. :) 
@DubeySandeep can you please let me know how to do karma test after running the script it opens a browser with karma debug. Can you please help me know how can do the test.
Hi @amitsin6h, you'll have to write the test (*Spec.js) file and run `scripts/run_frontend_tests.sh` and this will open up the browser for (automated) testing, you'll have to check the terminal (From where you have run the script) for report (whether the test passes successfully or not!).  
hii, can i be assingned LearnerViewRatingService.js
Hi @amitsin6h any updates on this issue?
Hi @subhdeep any updates on this issue?
Hi @rajvaibhavdubey any updates on this issue?
Hi @A-Yerkeshev any updates on this issue?
Deassigning @amitsin6h due to lack of response. Please feel free to take it up again if you are interested!
Can any one please assign me TriggerObjectFactory.js
Hi @17bcs029, I've assigned you for  `TriggerObjectFactory.js`. 
Actually -- I want to suggest that we do something different for TriggerObjectFactory.js. Can we delete it and all references to it? It's obsolete and all the code there is dead code.

Thanks!
Hi, can I be assigned  UserEmailPreferencesService.js? Thank You!
@sjkadali, done!
Assigning ExplorationSummaryBackendApiService.js to @aditya81070 
@shubha1593 I am having the issue with karma dashboard. My `ExplorationSummaryBackendApiServiceSpec.js` is not on the dashboard. 
![screenshot from 2018-10-17 12-53-49](https://user-images.githubusercontent.com/30300772/47069128-c8cab080-d20b-11e8-98fe-8daf05e58ebd.png)
 and where I can see the output of tests that I will write?
@aditya81070 , looks for the file `ExplorationSummaryBackendApiService.js`

Follow these steps:
- run `find -name ExplorationSummaryBackendApiService.js`
   -- Expected output: `./core/templates/dev/head/domain/summary/ExplorationSummaryBackendApiService.js` 
- Go to karma-report view and press CTRL+F and type `domain/summary`.
- Click on the preferred dir.
- I hope you'll see that coverage report for your file.
@DubeySandeep Yes, the file is there. But can't I see the coverage report of `ExplorationSummaryBackendApiService.js`? and please also tell me where I can see the output of tests?
Hi @aditya81070 did you manage to get the coverage report? Could you let us know what exactly you tried? Also what output are you referring to? On running the frontend tests scripts, you'll get success/failure prompts. And the failures will show the exceptions. In case you add any console logs for debugging, they will appear when the test is run. 
I am not working on this from last two-three days. I am not well. Can I
continue as soon as I feel good?

On Sat 20 Oct, 2018, 9:50 PM Nithesh N. Hariharan, <notifications@github.com>
wrote:

> Hi @aditya81070 <https://github.com/aditya81070> did you manage to get
> the coverage report? Could you let us know what exactly you tried? Also
> what output are you referring to? On running the frontend tests scripts,
> you'll get success/failure prompts. And the failures will show the
> exceptions. In case you add any console logs for debugging, they will
> appear when the test is run.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/4057#issuecomment-431595812>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/Ac5aZFizOjWFS6ztMIlmlXDelaFsEHlkks5um01RgaJpZM4QSdB1>
> .
>

Can anyone please assign me hintobjectfactory.js
Hi @sjkadali any updates?
Hi @aditya81070, hope you are feeling better now. Let us know if you need more help from us :)
Hi @nithusha21 , I am working on it. Got some errors while running the test
file. So trying to fix it.

On Sun, Nov 4, 2018 at 1:25 AM Nithesh N. Hariharan <
notifications@github.com> wrote:

> Hi @sjkadali <https://github.com/sjkadali> any updates?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/4057#issuecomment-435645621>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AlS1OHCNDLegBYYnMrNuCOE5-r1Daxikks5urohvgaJpZM4QSdB1>
> .
>

Thanks for the status update! Want any help from us @sjkadali?
Hi! Can you assign me to LearnerViewRatingService.js?
Thanks.
@ezl-13, I've assigned you to `LearnerViewRatingService.js`. :)
/cc @1995YogeshSharma 
@aditya81070, @rajvaibhavdubey, @subhdeep, any update on this issue?
Hi @nithusha21,  thanks! Fixed the errors that came up while running the fronted test. But the code coverage is only 77.8%. Can you give some suggestions on how to get it to 100%?


> On Nov 10, 2018, at 3:25 AM, Sandeep Dubey <notifications@github.com> wrote:
> 
> @aditya81070, @rajvaibhavdubey, @subhdeep, any update on this issue?
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.

Hi @sjkadali sorry for the delay! I missed the ping. To get to 100% make sure your tests cover all if-else branches, loops, etc. Basically, identify which lines of codes are not covered, and make test cases that will run those lines of codes. Does this help? 

Sorry again for the delay, looking forward to your PR!
Hi @nithusha21 thanks!  Got the code coverage to 100%. On running the git push command, linter starts.Though no errors are displayed when its done, couldn't see the pushed changes on the remote repository. 
Could you provide a screenshot of the logs? 
Attaching the file with the output of running the command "git push origin
user-email-preferences-service-spec"

On Fri, Nov 30, 2018 at 10:31 AM Nithesh N. Hariharan <
notifications@github.com> wrote:

> Could you provide a screenshot of the logs?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/4057#issuecomment-443238183>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AlS1OI1nzK_vOrpGAX5k5L-nUYdNriDjks5u0U9qgaJpZM4QSdB1>
> .
>

Ummm, I don't see an image.... You can drag and drop it into the github editor where you type the comment. 
[gitlog.txt](https://github.com/oppia/oppia/files/2635999/gitlog.txt)

Hmmm, that's weird... Why is it running lint checks on so many files? /cc @apb7
ping @apb7.. could you help @sjkadali out?
Hi, can I be assigned ParameterMetadataService.js?
Hi @Dharmesh-Poddar, I've assigned you to  `ParameterMetadataService.js` you can start working on it. Thanks! :)

/cc @vibhor98 
De-assigning @aditya81070, @rajvaibhavdubey, @subhdeep from the issue because of lack of response.
Hi @ezl-13, @sjkadali any update on this issue?
Hi! I would like to work on `OutcomeObjectFactory.js`, please assign it to me.
Hi @DubeySandeep . Can you take me off of my frontend test starter project? I'll be working on a backend test starter project instead. Thanks!
Hi @exzl-13, Thanks for the update. :) Done!
Hi @abhaygupta97, I've assigned you to `OutcomeObjectFactory.js`. 
@DubeySandeep Please mark `OutcomeObjectFactory.js` as completed. Relevant PR: https://github.com/oppia/oppia/pull/6098
@abhaygupta97, Done! Thanks for the information.
@DubeySandeep @ankita240796  @vinitamurthi can I work on `PlayerPositionService.js` ? 
Sure @ujjwalgulecha, please go ahead. I have assigned you to `PlayerPositionService.js`!
@ankita240796 @DubeySandeep 
Can I work on CollectionPlaythroughObjectFactory.js?
@siddhantkhandelwal, I've assigned you to `CollectionPlaythroughObjectFactory`, you can start working on it. Thanks! 
Hi @bansalnitish i would love to begin here `AudioPlayerService.js` can it be assigned to me thanks
@muarachmann, I've assigned you to  `AudioPlayerService.js`, you can start working on it! :) 

/cc @bansalnitish 
Unassigned @Dharmesh-Poddar, @sjkadali because of lack of activity.

@siddhantkhandelwal, any update on the assigned issue? 
> @muarachmann, I've assigned you to `AudioPlayerService.js`, you can start working on it! :)
> 
> /cc @bansalnitish

Errrr my handler is muarachmann not @mauriciofauth :) --The assigned file above
@muarachmann, Oops, I've fixed it! 
Assigned @mertdeg2 to ExpressionSyntaxTreeService.ts
@DubeySandeep , @seanlip please can you help me on how to create a mock of the AudioPlayerService api so i can load a sample audio the write the test efficiently.  I am stuck here ever since. Any pointers would be helpful thanks 
Hi @muarachmann, You can look into existing Spec files such as `core/templates/dev/head/pages/collection_editor/CollectionEditorStateServiceSpec.ts`, `core/templates/dev/head/pages/exploration_editor/ExplorationDataServiceSpec.ts`, I hope you'll find these tests helpful. Ping me if it doesn't help you, I'll try a different way to explain this. :) 

Thanks! 
Hi @muarachmann, any update on the assigned issue? Let me know if my last comment wasn't helpful. I can try to explain this in a better way. Thanks! :)  
Oh so so sorry @sandeep was caught up with school work and final year
project also was following an angular course on udemy to better understand
angular. I will update you on my progress. Sorry for the lateness

On Mon, Jun 17, 2019, 20:44 Sandeep Dubey <notifications@github.com> wrote:

> Hi @muarachmann <https://github.com/muarachmann>, any update on the
> assigned issue? Let me know if my last comment wasn't helpful. I can try to
> explain this in a better way. Thanks! :)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/oppia/oppia/issues/4057?email_source=notifications&email_token=AD4X4XRKNKLR2YRAJXH2ZR3P27SQ7A5CNFSM4ECJ2B22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX4HVWA#issuecomment-502823640>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AD4X4XWHJ44RBM5YQC2PKD3P27SQ7ANCNFSM4ECJ2B2Q>
> .
>

Hello, I'd like to take `FatigueDetectionService.ts`. Thanks!
Hi @sagangwee, assigned you! Thanks!
> Hi @muarachmann, You can look into existing Spec files such as `core/templates/dev/head/pages/collection_editor/CollectionEditorStateServiceSpec.ts`, `core/templates/dev/head/pages/exploration_editor/ExplorationDataServiceSpec.ts`, I hope you'll find these tests helpful. Ping me if it doesn't help you, I'll try a different way to explain this. :)
> 
> Thanks!

@DubeySandeep can you please elaborate more on this please
@muarachmann Please explain, in detail, exactly what you're getting stuck with (and what you've figured out so far), so that @DubeySandeep can more effectively help you. Thanks!
@DubeySandeep here is what i am doing to try to inject the `AssetsBackendApiService` to be able to "load an audio"

```
require('domain/utilities/UrlInterpolationService.ts');
require('services/AssetsBackendApiService.ts');
require('services/AudioPlayerService.ts');

....

beforeEach(angular.mock.module('oppia'));
  beforeEach(angular.mock.inject(function($injector) {
    AssetsBackendApiService = $injector.get('AssetsBackendApiService');
    UrlInterpolationService = $injector.get('UrlInterpolationService');
    $httpBackend = $injector.get('$httpBackend');
    AudioPlayerService = $injector.get('AudioPlayerService');
  }));

it('should test if audio track is loaded', function() {
    var requestUrl = UrlInterpolationService.interpolateUrl(
        '/assetsdevhandler/exploration/<exploration_id>/assets/audio/<filename>',
        {
          exploration_id: '0',
          filename: 'myfile.mp3'
        });
    $httpBackend.expect('GET', requestUrl).respond(201, 'audio data');
    expect(AssetsBackendApiService.isCached('myfile.mp3')).toBe(false);
    AssetsBackendApiService.loadAudio('0', 'myfile.mp3');
    expect(this.AudioPlayerService.isTrackLoaded()).toBe(true);
  });
```

I keep getting this error please how can i overcome this  i have been on this for the past 2 days now `Error: Trying to get the Angular injector before bootstrapping the corresponding Angular module.`
Log can be found here https://pastebin.com/T1ymiQXK

@muarachmann Thanks for the explanation. I think this is actually a question for @YashJipkate who is currently doing the Angular upgrade project -- you might want to ask him.
Removing "good first issue" tag because of the Angular upgrade.
This is currently blocked since some of these tests assume that some services are available (when due to the Angular migration, they are not). This is a consequence of an assumed load order in AngularJS/Angular. After the [run block](https://github.com/oppia/oppia/blob/392323400e5a606b810b8e41155c644cd7f862bb/core/templates/dev/head/components/ck-editor-helpers/ck-editor-4-widgets.initializer.ts#L24) is migrated, we should be able to unblock this issue. 
Hello, I'd like to take **AutogeneratedAudioPlayerService.ts**. 
@bansalnitish, have you generated the service dependency yet?
@hungphi98, this isn’t ready for development, can you please look for another issue? thanks!
Sure, @kevinlee12 can I take **LearnerViewRatingService.ts** ? Sorry I am new to the project.
Sorry no services in this ticket are ready for development at all, though feel free to tackle other issues 😀

> On Sep 24, 2019, at 10:39 AM, Phi H Nguyen <notifications@github.com> wrote:
> 
> ﻿
> Sure, @kevinlee12 can I take LearnerViewRatingService.ts ? Sorry I am new to the project.
> 
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub, or mute the thread.

@kevinlee12  haha so I guess **AnswerGroupObjectFactory.ts** is available then?
@hungphi98, **no** services are available, please choose another issue to work on. this is currently blocked by Angular upgrade.
I would like to work on **AnswerGroupObjectFactory.ts**
@ahv15 you got it!
Could I work on **ParamChangesObjectFactory.ts** ?
Hi @lakshay-angrish, I've assigned you. Thanks! 
What is the `CHANGELOG` label, and what should it be for **ParamChangesObjectFactory.ts**?
I've updated the changelog label on your PR. Thanks!
Hey! @seanlip , I would like to write the test for `UserEmailPreferencesService.ts`.
Thanks.
Sounds good, I've assigned you. Thanks!
@seanlip I've updated the service list with some services that doesn't have a test file yet, suggested by @nithusha21. Also, I'm working on some services from it (**PredictionResultObjectFactory.ts**, **AnswerStatsObjectFactory.ts** and **ParamChangeObjectFactory.ts**). Should I assign myself or should I comment in this thread everytime I pick up a new service? Thanks!
Go ahead and assign yourself. Thanks!
> @seanlip I've updated the service list with some services that doesn't have a test file yet, suggested by @nithusha21. Also, I'm working on some services from it (**PredictionResultObjectFactory.ts**, **AnswerStatsObjectFactory.ts** and **ParamChangeObjectFactory.ts**). Should I assign myself or should I comment in this thread everytime I pick up a new service? Thanks!

I actually cover **ParamChangeObjectFactory.ts** in #8394 
@lakshay-angrish don't worry about that. I see that you covered ParamChange**s**ObjectFactory.ts, I'm working on ParamChangeObjectFactory.ts
> @lakshay-angrish don't worry about that. I see that you covered ParamChange**s**ObjectFactory.ts, I'm working on ParamChangeObjectFactory.ts

I have written tests for both **ParamChangeObjectFactory.ts** and **ParamChangesObjectFactory.ts** in #8394 
@lakshay-angrish I get it. However, **ParamChangeObjectFactory.ts** doesn't have it own test file in your PR. I think each service should have their own spec file. We shouldn't test a service based in another service. What do you think? @seanlip @nithusha21
@marianazangrossi The thought crossed my mind. But I thought that the files in question are very much related, due to which I wrote tests for both of them. I don't know if its wrong.
Sorry, I can't look at this for the next few days (travelling). Please
check with Nithesh.

Thanks!

@marianazangrossi I think you're right. I will push a commit that will remove the tests involving `ParamChangeObjectFactory.ts` from my PR.
Hey! I have been working on writing a test for the UserEmailPreferenceService.ts. 
Here's the link of what I have done so far:
https://gist.github.com/Arnesh07/04bc6e6264152167cb1e612d66c8da06
I have found out that the expectPUT function is not working (Probably the PUT request isn't matching in the test)
What I have done to debug it so far:
I changed the put request in both the service and the test to **not** send any request parameters, and the test started working fine.
I have also verified that the request parameters are always same.
@seanlip 
Hi @Arnesh07, I'm going to redirect your question to @marianazangrossi, since she has much more up-to-date knowledge on the frontend tests at this point than I do.
(Assigning @marianazangrossi to flag the previous comment. @marianazangrossi please remove your assignment once done, so that other contributors know that this issue is still up for grabs. Thanks!)
Hey @Arnesh07 sorry for the delay! I've tested your code and here's some comments about it:

1. We don't supposed to send the request params in the expect functions from `$httpBackend`. We're only mocking the API call and the response. We don't mock params. So change this:
```
$httpBackend.expectPUT('/createhandler/notificationpreferences/' + expId, requestParamsFeedback)
        .respond(200, sampleResponse);
```
to this:
```
$httpBackend.expectPUT('/createhandler/notificationpreferences/' + expId)
        .respond(200, sampleResponse);
```

2. The spy for `CsrfService` is missing. You can take a look on an example [here](https://github.com/oppia/oppia/blob/0ca2649a9acd31e71e46a7f9f2d3e05ae80ce72a/core/templates/dev/head/domain/statistics/learner-answer-details-backend-api.service.spec.ts#L49) how to put it in your test.

3. Then, you should mock `ExplorationDataService` to return `explorationId` as `'12345'`, like this:
```
beforeEach(angular.mock.module('oppia', function($provide) {
    $provide.value(
      'ExplorationDataService', {
        explorationId: expId
      }
    );
  }));
```

WIthout this mock, `explorationId` will return `undefined` and it will fail the test.

Hope that works. If you're facing any problems with it, please let me know!
Hey @marianazangrossi Thanks for the comment!
I made the required changes and here are a few things:
1. I implemented your point 1 and the error still stays. I guess the PUT requests aren't matching( in the service and the test). 
2. Also, can you please enlighten me with what does the spy on csrf service does here? And why is it necessary in this test?
3. I had already mocked the exploration ID, I guess you missed it. Or did I do it in the wrong way? I had also logged the value of explorationId at many points, it was correct ('12345'). 

Also, I apologize for the delay.
Thanks!
@Arnesh07 sorry about the `ExplorationDataService` mock, I missed it.

I think your first point is going wrong because you didn't spy on `CsrfService`. Spy on it and try the first point again, it should work.

And about `CsrfService`, I don't know the details why we need to spy on it. Can you give me a hand here? @seanlip @nithusha21 
@Arnesh07 @marianazangrossi I don't know offhand. What research have you done so far to try and answer this question?
@seanlip I've faced a similar problem before and I found out about `CsrfService` when I was checking other test files and it was missing from the test. I know it's essential in some cases but I don't know why exactly. I've tested @Arnesh07 code in my machine and `CsrfService` fixed the problem.
Ah, I see.

Here's some background that might be useful: csrf stands for "cross-site request forgery", and you can read more about it [here](https://owasp.org/www-community/attacks/csrf). When a page is loaded on Oppia, a token is sent to the frontend and that token is needed to authenticate subsequent AJAX requests. You can see how that token is used in these AJAX requests by looking into App.ts (see the code related to $httpProvider.interceptors). Does that context help?
@marianazangrossi Thanks for the fix. It works! Although I am still not able to understand why.
@seanlip thanks for the insight, the link you mentioned has a really interesting example to understand CSRF. Although what I understand is we need to spy the CSRF service for all the HTTP requests that go through the interceptor (in App.ts). The last [test](https://github.com/oppia/oppia/blob/develop/core/templates/dev/head/components/entity-creation-services/collection-creation-backend-api.service.spec.ts) I wrote didn't require a spy on the CSRF service (Also why?). And don't we have a check for the CSRF token on the server as well (just curious)?
Thanks! 
@Arnesh07 I suggest that you try and work through the code in order to investigate these questions. Reading code to understand how it works is an important part of solving issues.
@seanlip sure! Thanks for the suggestion.
can I work on  RuleObjectFactory.ts @shubha1593 
can I work on ExplorationFeaturesService.ts service too
Hi @abhayraghuwanshi, I've assigned you to `RuleObjectFactory.ts`.

Also, once you submit a PR for the `RuleObjectFactory.ts`, you can ping me and I'll go ahead and assign you to  `ExplorationFeaturesService.ts`. Thanks! :)
@DubeySandeep  I made 2 other functions in the rule factory to get input and type in case we want to return type or notes. Is it okay?
@DubeySandeep  can you assign the changelog

@DubeySandeep  can you assign the  ExplorationFeaturesService.ts
Could someone please review and merge #8495 ? It has been marked stale
 @nishantwrp  can you assign the the issue exploration feature and the change log to ruleobjectfactory i raised a pr regarding that
@abhayraghuwanshi Done!
> @DubeySandeep I made 2 other functions in the rule factory to get input and type in case we want to return type or notes. Is it okay?

@abhayraghuwanshi, I'm not sure what that new function does. I would suggest you to create a PR and let's discuss this in the PR. Thanks! :) 
@DubeySandeep  I've raised a PR regarding that. can you assign the change log
@abhayraghuwanshi, I've added a changelog label and assigned reviewer for your PR.  
@shubha1593 can you assign the changelog to exploration feature service
Hi @abhayraghuwanshi -- @nithusha21 or @marianazangrossi can help you with your query, but I think it's unclear what exactly you mean by "assign the changelog". Could you please clarify your request?
@seanlip  I'm sorry i should have written it clearer.
I raised the PR for the exploration feature it is missing the changelog
Thanks
@abhayraghuwanshi It would help if you provided the number of the PR.
 #8588
Can anyone please help me how to set break points in code, It helps me in understanding code base quickly
I have used debug command in console
And had set break points in vs code
Both are not pretty much runing
Hy!! @nithusha21  i know how to write tests in jasmine. Now all i need is lil help over how to use breakpoints. It would be great, so that i can start to resolve things quickly.

@seanlip can I take history-tab directives.ts for testing
I don't see it in the list. So probably not yet?

You could ask @marianazangrossi, she is coordinating this issue. 
@nithusha21 can I take history-tab directives.ts for testing.
Hey, @safwan20 this issue includes only testing for services. We still don't have any official issue for testing directives so I think it's fine your work on it! But just make sure that anyone is not working on it already.
@seanlip I have started working on the spec file for ContributionOpportunitiesBackendApiService.ts in the pr (https://github.com/oppia/oppia/pull/8763). I just realized it was listed here. Could you assign it to me?
@srijanreddy98 Sure, done. Thanks!
I am working on StateNameService.ts file

working on  StateHintService.ts
Hi @safwan20, please go ahead and update the checklist in the first comment accordingly with the file(s) you're working on. Thanks! 

Resolving patch:
diff --git a/scripts/check_frontend_coverage.py b/scripts/check_frontend_coverage.py
--- a/scripts/check_frontend_coverage.py
+++ b/scripts/check_frontend_coverage.py
@@ -325,6 +325,7 @@
     'state-customization-args.service.ts',
     'state-editor.constants.ajs.ts',
     'state-editor.constants.ts',
+    'state-hints.service.ts',
     'state-interaction-id.service.ts',
     'state-param-changes.service.ts',
     'state-recorded-voiceovers.service.ts',


Test patch: