New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test frontend services #4057
Comments
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. |
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 |
@shubha1593 please assign me editor_tab |
Hi @GaganSuneja, assigned you :) |
Hey @Nix07, in your URL for that it would be like |
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. |
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. :) |
fix part of #4057 - Test frontend services in services/stateful
HI @shubha1593 ,can i take domain/classifier? |
Hi @jervis446, sure, assigned you. |
* added tests for LearnerDashboardBackendApiService * fixed string quotes, added spec file for learner Dashboard IDs API * incomplete LearnerPlaylistServiceSpec, need help * Fixed Learner Playlist Service spec file * Fixed Linting errors * Fixed Linting errors * Fixed linting errors * made review changes
Hi i am intreseted in taking and working on this issue. Assign me this |
@taiwo2 |
i should write the test in angular? |
You should write them in angular JS. |
thanks |
Would I be able to work on question-player-engine.service.ts? |
Its all yours :) |
Hello, I'm new and I was recommended this issue, I'd like to work on editable-story-backend-api.service.ts. |
@kaushambisharma I've assigned you |
Hi there: could I be assigned with |
Hey @nithusha21 , could please you assign me the python-program.tokenizer.ts file? |
@nithusha21 Hi can you assign me the topic-creation.service.ts file? |
@vojtechjelinek @U8NWXD, I would like to work on player-correctness-feedback-enabled.service.ts. Can I be assigned this? I was recommended this issue. |
@soumyo123-prog done |
@Rijuta-s hey, i received your mail regarding the issue assignment so can you assign me with email-dashboard-data.service.ts |
@nithusha21 can you please assign @siddharthmehta02 to email-dashboard-data.service.ts ? |
done! |
Hi @nithusha21 , I would like to work on this issue. This is my first open-source contribution so please assign me a file accordingly. |
hi @nithusha21 I was thinking to work on |
Hey @Radesh-kumar @nithusha21 I was assigned for email-dashboard-data.service.ts but its already showing a 100% coverage |
please pick from any of these files |
Hi All, I am happy to inform you that all the pages listed above are completed (As part of GSoC projects this year), and the only ones that remain to be tested are slightly complicated. We don't think the remaining ones are good examples of good first issues. The remaining files are being tracked here: https://docs.google.com/spreadsheets/d/1tky4jE7uxLQTp0MWE3L9USnPvy3PbtGYpMgP7b0bicw/edit#gid=1374717983 and we will handle those as per the plan in the sheet. Thanks everyone for helping out with this issue! |
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. 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.
The services are separated by three levels of complexity:
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 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
orSpec.ts
, it depends of the service file name structure:.spec.ts
for services like: service-name.service.tsSpec.ts
for services like: ServiceNameService.tsWhen 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 #8916 #8934
Files to write tests for or increase until 100%:
Angular files
AngularJS files
Click to see the list of completed work.
pages/exploration_player
pages/skill_editor
Other services:
Note: For a guide on how to access Oppia's webpages, see this.
The text was updated successfully, but these errors were encountered: