Skip to content
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

Fix part of #20001: Make pre-push hook more efficient. #20905

Merged
merged 18 commits into from
Sep 17, 2024

Conversation

jnvtnguyen
Copy link
Contributor

@jnvtnguyen jnvtnguyen commented Aug 28, 2024

Overview

  1. This PR fixes or fixes part of [Feature Request]: Make CI and pre-push hooks more efficient #20001.
  2. This PR does the following:
  • Changes the pre-push hook to only run on the changed files that are being pushed (instead of comparing with the upstream develop).

Essential Checklist

Please follow the instructions for making a code change.

  • I have linked the issue that this PR fixes in the "Development" section of the sidebar.
  • I have checked the "Files Changed" tab and confirmed that the changes are what I want to make.
  • I have written tests for my code.
  • The PR title starts with "Fix #bugnum: " or "Fix part of #bugnum: ...", followed by a short, clear summary of the changes.
  • I have assigned the correct reviewers to this PR (or will leave a comment with the phrase "@{{reviewer_username}} PTAL" if I can't assign them directly).

Proof that changes are correct

Made Changes in this PR's branch (Observe that only the corresponding change was tested, run_acceptance_tests.py)
https://github.com/user-attachments/assets/fbb77310-3dc5-4028-9387-6551731b445e

PR Pointers

Copy link

oppiabot bot commented Aug 28, 2024

Hi @jnvtnguyen, can you complete the following:

  1. The body of this PR is missing the required description, please update the body with a description of what this PR does.
    Thanks!

Copy link

oppiabot bot commented Aug 28, 2024

Hi @jnvtnguyen please assign the required reviewer(s) for this PR. Thanks!

@jnvtnguyen jnvtnguyen marked this pull request as ready for review August 28, 2024 18:28
@jnvtnguyen jnvtnguyen requested a review from a team as a code owner August 28, 2024 18:28
@jnvtnguyen
Copy link
Contributor Author

jnvtnguyen commented Aug 28, 2024

@seanlip PTAL at the first fix for the pre push to run only on the commits being pushed (Simply changed it to compare between the local branch and origin/local branch), instead of upstream develop; kept the --run_on_changed_files_in_branch to use the upstream since it i supposed to compare the whole branch.

@jnvtnguyen jnvtnguyen requested a review from a team as a code owner August 28, 2024 18:56
@jnvtnguyen jnvtnguyen removed request for a team and Akhilesh-max August 28, 2024 18:57
Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jnvtnguyen, thanks -- took a look and I have some questions about impl.

@@ -93,6 +93,45 @@ def get_local_git_repository_remote_name() -> Optional[bytes]:
return remote_name


def get_local_git_repository_remote_name() -> Optional[bytes]:
Copy link
Member

@seanlip seanlip Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized I don't actually understand what this means, especially when contrasted with the function above. What is the "remote name of the local repository"?

Also, please don't copy-paste large chunks of code between functions. Extract the common bits if possible or pass in an argument if it makes sense. Otherwise it makes maintenance harder.

EDIT: Also, just to check, does it make sense to update other references in the codebase to use the new function too, or should those continue referring to upstream?

Copy link
Contributor Author

@jnvtnguyen jnvtnguyen Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I kept the upstream one since the --run_on_changed_files_in_branch runs on all files in the current branch (don't know if this is useful or not) and I could just change it to only files that are being pushed. In the latter case I can just remove the upstream function and keep the local repository one for all cases.

Remote name of the local repository is the remote name for your fork of Oppia like jnvtnguyen/oppia.git instead of the "upstream", oppia/oppia.git (in most cases the remote name is just origin). In the case that we only compare the files being pushed, we don't need the upstream one at all since we don't need to compare against develop anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I see. The only case I can think of when running on all files in the current branch would be useful is when a developer skipped the pre-push check in an earlier commit. But I don't really see them taking the trouble to manually add a flag for commits after that TBH. So I'm OK with dropping the upstream function and the extra flag, and removing all references to the flag, if you agree with that.

Ack on the remote name of the local repo, thanks.

Also did you see the first paragraph of my comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, ack on the copy and paste; will keep it mind next time.
Removed the upstream function, but changed the run_on_changed_files_in_branch flags to use the local git repository; still think its useful if you want to test multiple times before pushing (instead of using git reset).

Copy link
Member

@seanlip seanlip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Seems fine to me, just one comment.

)

if remote_num > 1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still have an error if > 1, to avoid ambiguity?

Copy link
Contributor Author

@jnvtnguyen jnvtnguyen Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in some cases people have multiple forks of an Oppia repository like if they want to push to another person's repository, in that case it will just return the last one it finds. I suppose we can print that it found more than one remote and just return the last one? In the case of upstream I don't think someone would have more than one upstream for the Oppia repository, so that was why it returned none.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hm, I'm not sure I've ever seen that case come up. I feel a bit like we should be restrictive here for now, and then if issues arise let's figure out what the use case is and modify accordingly, since the alternative might end up just doing the wrong thing here silently (right?) -- since devs might not read stuff that's printed in the middle of the log.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, so should we change it to raise an Exception if the remote num is over 1 then?

@seanlip seanlip removed their assignment Aug 29, 2024
@jnvtnguyen
Copy link
Contributor Author

@seanlip Just noticed that this won't really work for maintainers that push directly to the Oppia repository since the implementation designates the oppia/oppia.git as the upstream and any other remote with oppia.git as the origin.

Though do note that it will work on the pre-push hook since I changed the impl to first use the passed in arg instead of the other one, but for other cases like the --run_on_changed_files_in_branch it won't work if you are on the Oppia repository instead of a fork. Do you see anyway around this (I suppose we can just hardcode "origin", and raise error if that remote name is not present; since otherwise the pre push hook will use whatever remote you pass in).

@seanlip
Copy link
Member

seanlip commented Aug 29, 2024

@jnvtnguyen I think your suggestion is OK, but a perfectly fine alternative is to just error out on the --run_on_changed_files_in_branch case (assuming that's a truly optional workflow) if someone is pushing directly to the Oppia repository.

@jnvtnguyen
Copy link
Contributor Author

Ok will just keep the same; I think will merge this first and look to do the other fix in another PR.

@jnvtnguyen
Copy link
Contributor Author

Updated @seanlip, PTAL. Thanks.

@jnvtnguyen
Copy link
Contributor Author

@DubeySandeep PTAL, Thanks.

Copy link

oppiabot bot commented Sep 4, 2024

Unassigning @DubeySandeep since they have already approved the PR.

@oppiabot oppiabot bot added the PR: LGTM label Sep 4, 2024
Copy link

oppiabot bot commented Sep 4, 2024

Hi @jnvtnguyen, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@Akhilesh-max Akhilesh-max added this pull request to the merge queue Sep 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 17, 2024
@Akhilesh-max Akhilesh-max added this pull request to the merge queue Sep 17, 2024
Merged via the queue into oppia:develop with commit 0268dbb Sep 17, 2024
130 checks passed
imchristie pushed a commit to imchristie/oppia that referenced this pull request Sep 18, 2024
)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
imchristie pushed a commit to imchristie/oppia that referenced this pull request Sep 18, 2024
)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
seanlip added a commit that referenced this pull request Sep 30, 2024
…tests (#20931)

* Added test for i18n format

* Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Update develop

* [GSoC'24] M1.11, Fix a part of #20374: Acceptance test coverage for a topic manger's CUJs (#20580)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* [GSoC'24] M1.8, Fix a part of #20374: Acceptance test coverage for 2 Topics Manager's CUJs. (#20569)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* Fix #20521: Fixed issues with AuthGuard for SubtopicViewerPage (#20579)

* fixed issues with auth guard

* fixed issues with tests

* fixed issues with frontend tests

* fixed linting issues

* Fix issue #20617: 'Blog Post Title' is now visible in the Blog Post Editor (#20634)

* Added necessary CSS properties to fix position of blog-post-title

* Changed position of blog-post-title on mobile viewport

* Removed bottom property to center the blog-post-title

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Moves AUTO_UPDATE_EXP_VOICE_ARTIST_LINK feature flag to prod (#20658)

Moves feature flag to prod

* Fix part of #18384: Base of new progress tab for learner dashboard redesign (#20522)

* Added feature flags

* refactored and replaced with new components community lessons (new progress tab)

* Replaced innerHtml

* Updated translation keys

* Updated variable names to match #20306

* Added notes, renamed card-display, updated temp progress value for explorations/collections

* Fixed lint issues

* Removed unused tag

* Adjusted spacing

* Last adjustment

* Fixed content sizing for screens > 1512 (prevent shrink if not enough obj)

* Fixed e2e error

* Renamed communityComplete variable

* Renamed feature flag for community lessons

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Fixing: #20641, The Signature is not visible clearly in mobile devices when the word count is too large (#20646)

increasing height in mobile device

* Fix part of #18921: Replace user-referenced TODO comments with issue-referenced TODO comments (#20464)

Part fix of #18921

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC' 24] Fixes #20671 and general M1 fixes. (#20657)

* Updates

* Updates

* Updates

* Debugging

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Fix #20304: updated Makefile to start dsadmin (#20425)

* updated Makefile to start dsadmin

* added required changes

* restored index.yaml with develop

* removed xdg-open from dsadmin

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC'24] Modify translations bug fixes (#20666)

* Improve modal CSS

* Tick checkbox on saving a translation

* Update button text for clarity

* Show subsidiary modal only when editable translations exist

* Verify if RTE components of modified translation match when updating translation

* Add missing languages to supported content language list

* Fix frontend tests

* Fix acceptance test

* Fix bugs pertaining to stale and empty translations

* Fix linter issues

* Gate translation changes button behind feature flag

* Fix frontend test

* Fix rules display bug

* Implement part of #17712 : Acceptance tests for Exploration editor Section(CUJ 12). (#20669)

* Exploration-editor-CUJ-12

* Add proper specs

* Add proper specs

* changes

* [GSoC'24]M2.1 Redesign volunteer page (#20667)

* Redesign volunteer page

* fix tests

* fix the tests

* Fix rtl issues

* fix lighthouse tests

* Address review comments 1

* change lexico order

* [GSoC'24] Fix #20652, and #20649: Fixes the respective two flakes.  (#20672)

* updates

* updates

* updates

* fix typescript strict check errors

* fixed lint error

* Fix #20787 and #20788: Allow naming of merge from develop steps in GitHub Workflows (#20907)

* Allow naming of merge from develop steps in GitHub Workflows

* Modify existing test for merge step

* Add a linter to require that all GitHub workflow steps be named

* Add tests for requiring steps to be named and fix minor details in merge step test

* Add names for workflow steps

* Fix grammar mistakes in comments

---------

Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #20001: Make pre-push hook more efficient. (#20905)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20779: Makefile env PATH fix on WSL (#20780)

* makefile fixed

* Explaining comments

* Explaining FIXED_PATH with comments

* removed extra comment

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20399: Added tests for POST, PUT and DELETE and error handling for invalid method using 405 status code. (#20544)

* Added no 500 error tests for post put and delete. Also added 405 status code handling for invalid requests.

* Fixed linting issues

* Fixed more linting issues

* Fixed even more linting issues

* Fixed MyPy issues

* Fixed linting issues

* Fixed backend test error and updated 405 error message.

* Fixed linting errors

* Fixed linting errors

* Added requested formatting change

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Added requested formatting changes

* Made changes so that load_templates is only used for GET

* Made the requested changes

* Fixed linting issue

* Fixed failing backend test, made assertion for http_method neater

* Fixed backend test and made requested changes

* Fixed Mypy check error

* Fixed Mypy error by importing Any from typing

* Fixed linting errors

* Added comment to address why type Any is used

* Made requested changes in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Made requested changes

* Fixed failing backend, linter and MyPy tests

* Fixed failing linter tests

* Fixed failing linter tests

* Fixed failing MyPy tests

* Added comment

* Fixed linting issues

* Added correct types in profile_test

* Corrected if block and typo

* Added test to fix failing backend coverage

* Fixed linting issues

* Fixed Mypy issues

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of#19849: Multiple classrooms bug fixes (#20904)

* Fix part of#19849: Multiple classrooms bug fixes

* fix classrooms page alignment

* nit

* add classroom name and url fragment

* fix type

* add classroom name

* show classroom name

* fix test

* fix overflow

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #19435: Review test page migration (#20790)

* review tests page migration

* *lint fix

* lint fix

* Reverting import changes

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

---------

Co-authored-by: Akhilesh Kr <2827daya@gmail.com>
Co-authored-by: Harshvardhan Singh <73544247+Lawful2002@users.noreply.github.com>
Co-authored-by: Bryan Khor <67664138+bryankhor07@users.noreply.github.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Nikhil <nikhil.agarwal.2019@gmail.com>
Co-authored-by: amyyeung17 <amyyeung17@gmail.com>
Co-authored-by: Mannika <84311047+mannika763@users.noreply.github.com>
Co-authored-by: Oluwapolore Oyeniji <90858072+poloreoyeniji@users.noreply.github.com>
Co-authored-by: Justin Nguyen <70992422+jnvtnguyen@users.noreply.github.com>
Co-authored-by: Jayam Patel <jayampatel04@gmail.com>
Co-authored-by: Vir Kothari <73329256+Vir-8@users.noreply.github.com>
Co-authored-by: Rahat <136263179+rahat2134@users.noreply.github.com>
Co-authored-by: Akash Paloju <119884665+AkashPaloju@users.noreply.github.com>
Co-authored-by: Ali Orozgani <40970649+YaySushi@users.noreply.github.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Priyanshu Verma <priyanshuverma@outlook.in>
Co-authored-by: Mohit Ruwatia <120438312+mon4our@users.noreply.github.com>
Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Afzal Khan <tricktomade@gmail.com>
Hampuztt pushed a commit to Hampuztt/oppia that referenced this pull request Oct 3, 2024
…ance tests (oppia#20931)

* Added test for i18n format

* Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Update develop

* [GSoC'24] M1.11, Fix a part of oppia#20374: Acceptance test coverage for a topic manger's CUJs (oppia#20580)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* [GSoC'24] M1.8, Fix a part of oppia#20374: Acceptance test coverage for 2 Topics Manager's CUJs. (oppia#20569)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* Fix oppia#20521: Fixed issues with AuthGuard for SubtopicViewerPage (oppia#20579)

* fixed issues with auth guard

* fixed issues with tests

* fixed issues with frontend tests

* fixed linting issues

* Fix issue oppia#20617: 'Blog Post Title' is now visible in the Blog Post Editor (oppia#20634)

* Added necessary CSS properties to fix position of blog-post-title

* Changed position of blog-post-title on mobile viewport

* Removed bottom property to center the blog-post-title

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Moves AUTO_UPDATE_EXP_VOICE_ARTIST_LINK feature flag to prod (oppia#20658)

Moves feature flag to prod

* Fix part of oppia#18384: Base of new progress tab for learner dashboard redesign (oppia#20522)

* Added feature flags

* refactored and replaced with new components community lessons (new progress tab)

* Replaced innerHtml

* Updated translation keys

* Updated variable names to match oppia#20306

* Added notes, renamed card-display, updated temp progress value for explorations/collections

* Fixed lint issues

* Removed unused tag

* Adjusted spacing

* Last adjustment

* Fixed content sizing for screens > 1512 (prevent shrink if not enough obj)

* Fixed e2e error

* Renamed communityComplete variable

* Renamed feature flag for community lessons

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Fixing: oppia#20641, The Signature is not visible clearly in mobile devices when the word count is too large (oppia#20646)

increasing height in mobile device

* Fix part of oppia#18921: Replace user-referenced TODO comments with issue-referenced TODO comments (oppia#20464)

Part fix of oppia#18921

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC' 24] Fixes oppia#20671 and general M1 fixes. (oppia#20657)

* Updates

* Updates

* Updates

* Debugging

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Fix oppia#20304: updated Makefile to start dsadmin (oppia#20425)

* updated Makefile to start dsadmin

* added required changes

* restored index.yaml with develop

* removed xdg-open from dsadmin

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC'24] Modify translations bug fixes (oppia#20666)

* Improve modal CSS

* Tick checkbox on saving a translation

* Update button text for clarity

* Show subsidiary modal only when editable translations exist

* Verify if RTE components of modified translation match when updating translation

* Add missing languages to supported content language list

* Fix frontend tests

* Fix acceptance test

* Fix bugs pertaining to stale and empty translations

* Fix linter issues

* Gate translation changes button behind feature flag

* Fix frontend test

* Fix rules display bug

* Implement part of oppia#17712 : Acceptance tests for Exploration editor Section(CUJ 12). (oppia#20669)

* Exploration-editor-CUJ-12

* Add proper specs

* Add proper specs

* changes

* [GSoC'24]M2.1 Redesign volunteer page (oppia#20667)

* Redesign volunteer page

* fix tests

* fix the tests

* Fix rtl issues

* fix lighthouse tests

* Address review comments 1

* change lexico order

* [GSoC'24] Fix oppia#20652, and oppia#20649: Fixes the respective two flakes.  (oppia#20672)

* updates

* updates

* updates

* fix typescript strict check errors

* fixed lint error

* Fix oppia#20787 and oppia#20788: Allow naming of merge from develop steps in GitHub Workflows (oppia#20907)

* Allow naming of merge from develop steps in GitHub Workflows

* Modify existing test for merge step

* Add a linter to require that all GitHub workflow steps be named

* Add tests for requiring steps to be named and fix minor details in merge step test

* Add names for workflow steps

* Fix grammar mistakes in comments

---------

Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of oppia#20001: Make pre-push hook more efficient. (oppia#20905)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix oppia#20779: Makefile env PATH fix on WSL (oppia#20780)

* makefile fixed

* Explaining comments

* Explaining FIXED_PATH with comments

* removed extra comment

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix oppia#20399: Added tests for POST, PUT and DELETE and error handling for invalid method using 405 status code. (oppia#20544)

* Added no 500 error tests for post put and delete. Also added 405 status code handling for invalid requests.

* Fixed linting issues

* Fixed more linting issues

* Fixed even more linting issues

* Fixed MyPy issues

* Fixed linting issues

* Fixed backend test error and updated 405 error message.

* Fixed linting errors

* Fixed linting errors

* Added requested formatting change

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Added requested formatting changes

* Made changes so that load_templates is only used for GET

* Made the requested changes

* Fixed linting issue

* Fixed failing backend test, made assertion for http_method neater

* Fixed backend test and made requested changes

* Fixed Mypy check error

* Fixed Mypy error by importing Any from typing

* Fixed linting errors

* Added comment to address why type Any is used

* Made requested changes in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Made requested changes

* Fixed failing backend, linter and MyPy tests

* Fixed failing linter tests

* Fixed failing linter tests

* Fixed failing MyPy tests

* Added comment

* Fixed linting issues

* Added correct types in profile_test

* Corrected if block and typo

* Added test to fix failing backend coverage

* Fixed linting issues

* Fixed Mypy issues

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of#19849: Multiple classrooms bug fixes (oppia#20904)

* Fix part of#19849: Multiple classrooms bug fixes

* fix classrooms page alignment

* nit

* add classroom name and url fragment

* fix type

* add classroom name

* show classroom name

* fix test

* fix overflow

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of oppia#19435: Review test page migration (oppia#20790)

* review tests page migration

* *lint fix

* lint fix

* Reverting import changes

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

---------

Co-authored-by: Akhilesh Kr <2827daya@gmail.com>
Co-authored-by: Harshvardhan Singh <73544247+Lawful2002@users.noreply.github.com>
Co-authored-by: Bryan Khor <67664138+bryankhor07@users.noreply.github.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Nikhil <nikhil.agarwal.2019@gmail.com>
Co-authored-by: amyyeung17 <amyyeung17@gmail.com>
Co-authored-by: Mannika <84311047+mannika763@users.noreply.github.com>
Co-authored-by: Oluwapolore Oyeniji <90858072+poloreoyeniji@users.noreply.github.com>
Co-authored-by: Justin Nguyen <70992422+jnvtnguyen@users.noreply.github.com>
Co-authored-by: Jayam Patel <jayampatel04@gmail.com>
Co-authored-by: Vir Kothari <73329256+Vir-8@users.noreply.github.com>
Co-authored-by: Rahat <136263179+rahat2134@users.noreply.github.com>
Co-authored-by: Akash Paloju <119884665+AkashPaloju@users.noreply.github.com>
Co-authored-by: Ali Orozgani <40970649+YaySushi@users.noreply.github.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Priyanshu Verma <priyanshuverma@outlook.in>
Co-authored-by: Mohit Ruwatia <120438312+mon4our@users.noreply.github.com>
Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Afzal Khan <tricktomade@gmail.com>
imchristie pushed a commit to imchristie/oppia that referenced this pull request Oct 16, 2024
)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 11, 2024
#20945)

* Added test for i18n format

* Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Update develop

* manual copy from christie_snapshot without png files and calling the function

* fix linter

* add mobile_golden_screenshots

* add jest.config.js to RUN_NO_TESTS_ROOT_FILES

* [GSoC'24] M1.11, Fix a part of #20374: Acceptance test coverage for a topic manger's CUJs (#20580)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* [GSoC'24] M1.8, Fix a part of #20374: Acceptance test coverage for 2 Topics Manager's CUJs. (#20569)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* Fix #20521: Fixed issues with AuthGuard for SubtopicViewerPage (#20579)

* fixed issues with auth guard

* fixed issues with tests

* fixed issues with frontend tests

* fixed linting issues

* Fix issue #20617: 'Blog Post Title' is now visible in the Blog Post Editor (#20634)

* Added necessary CSS properties to fix position of blog-post-title

* Changed position of blog-post-title on mobile viewport

* Removed bottom property to center the blog-post-title

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Moves AUTO_UPDATE_EXP_VOICE_ARTIST_LINK feature flag to prod (#20658)

Moves feature flag to prod

* Fix part of #18384: Base of new progress tab for learner dashboard redesign (#20522)

* Added feature flags

* refactored and replaced with new components community lessons (new progress tab)

* Replaced innerHtml

* Updated translation keys

* Updated variable names to match #20306

* Added notes, renamed card-display, updated temp progress value for explorations/collections

* Fixed lint issues

* Removed unused tag

* Adjusted spacing

* Last adjustment

* Fixed content sizing for screens > 1512 (prevent shrink if not enough obj)

* Fixed e2e error

* Renamed communityComplete variable

* Renamed feature flag for community lessons

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Fixing: #20641, The Signature is not visible clearly in mobile devices when the word count is too large (#20646)

increasing height in mobile device

* Fix part of #18921: Replace user-referenced TODO comments with issue-referenced TODO comments (#20464)

Part fix of #18921

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC' 24] Fixes #20671 and general M1 fixes. (#20657)

* Updates

* Updates

* Updates

* Debugging

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Fix #20304: updated Makefile to start dsadmin (#20425)

* updated Makefile to start dsadmin

* added required changes

* restored index.yaml with develop

* removed xdg-open from dsadmin

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC'24] Modify translations bug fixes (#20666)

* Improve modal CSS

* Tick checkbox on saving a translation

* Update button text for clarity

* Show subsidiary modal only when editable translations exist

* Verify if RTE components of modified translation match when updating translation

* Add missing languages to supported content language list

* Fix frontend tests

* Fix acceptance test

* Fix bugs pertaining to stale and empty translations

* Fix linter issues

* Gate translation changes button behind feature flag

* Fix frontend test

* Fix rules display bug

* Implement part of #17712 : Acceptance tests for Exploration editor Section(CUJ 12). (#20669)

* Exploration-editor-CUJ-12

* Add proper specs

* Add proper specs

* changes

* [GSoC'24]M2.1 Redesign volunteer page (#20667)

* Redesign volunteer page

* fix tests

* fix the tests

* Fix rtl issues

* fix lighthouse tests

* Address review comments 1

* change lexico order

* [GSoC'24] Fix #20652, and #20649: Fixes the respective two flakes.  (#20672)

* updates

* updates

* updates

* restore

* added a few screenshots

* fix comments lint

* deleted all screenshots in logged-out-users

* add some screenshots

* updated failureTrigger when backgroundBanner in mobile mode

* set dumpInLineDiffToConsole as true

* updated trigger

* assertCountEqual

* removed screenshots for exploration

* removed Zone.Identifier

* updates

* edited karma.conf.ts

* took out the node_modules in combined.spec.ts

* updated blog-editor screenshots

* deleted unnecessary files

* added screenshots for blog-editor/create-and-publish-a-blog-post-with-required-details

* update failureTrigger for desktop to 0.27%

* Fix #20787 and #20788: Allow naming of merge from develop steps in GitHub Workflows (#20907)

* Allow naming of merge from develop steps in GitHub Workflows

* Modify existing test for merge step

* Add a linter to require that all GitHub workflow steps be named

* Add tests for requiring steps to be named and fix minor details in merge step test

* Add names for workflow steps

* Fix grammar mistakes in comments

---------

Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #20001: Make pre-push hook more efficient. (#20905)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20779: Makefile env PATH fix on WSL (#20780)

* makefile fixed

* Explaining comments

* Explaining FIXED_PATH with comments

* removed extra comment

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20399: Added tests for POST, PUT and DELETE and error handling for invalid method using 405 status code. (#20544)

* Added no 500 error tests for post put and delete. Also added 405 status code handling for invalid requests.

* Fixed linting issues

* Fixed more linting issues

* Fixed even more linting issues

* Fixed MyPy issues

* Fixed linting issues

* Fixed backend test error and updated 405 error message.

* Fixed linting errors

* Fixed linting errors

* Added requested formatting change

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Added requested formatting changes

* Made changes so that load_templates is only used for GET

* Made the requested changes

* Fixed linting issue

* Fixed failing backend test, made assertion for http_method neater

* Fixed backend test and made requested changes

* Fixed Mypy check error

* Fixed Mypy error by importing Any from typing

* Fixed linting errors

* Added comment to address why type Any is used

* Made requested changes in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Made requested changes

* Fixed failing backend, linter and MyPy tests

* Fixed failing linter tests

* Fixed failing linter tests

* Fixed failing MyPy tests

* Added comment

* Fixed linting issues

* Added correct types in profile_test

* Corrected if block and typo

* Added test to fix failing backend coverage

* Fixed linting issues

* Fixed Mypy issues

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of#19849: Multiple classrooms bug fixes (#20904)

* Fix part of#19849: Multiple classrooms bug fixes

* fix classrooms page alignment

* nit

* add classroom name and url fragment

* fix type

* add classroom name

* show classroom name

* fix test

* fix overflow

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #19435: Review test page migration (#20790)

* review tests page migration

* *lint fix

* lint fix

* Reverting import changes

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* updated failureTrigger for desktop to 0.28%

* fixed topic-manager/edit-and-preview-a-topic

* added screenshots for logged-out-users/play-through-lesson

* Fix part of #20001: Make pre-push hook more efficient. (#20905)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20399: Added tests for POST, PUT and DELETE and error handling for invalid method using 405 status code. (#20544)

* Added no 500 error tests for post put and delete. Also added 405 status code handling for invalid requests.

* Fixed linting issues

* Fixed more linting issues

* Fixed even more linting issues

* Fixed MyPy issues

* Fixed linting issues

* Fixed backend test error and updated 405 error message.

* Fixed linting errors

* Fixed linting errors

* Added requested formatting change

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Added requested formatting changes

* Made changes so that load_templates is only used for GET

* Made the requested changes

* Fixed linting issue

* Fixed failing backend test, made assertion for http_method neater

* Fixed backend test and made requested changes

* Fixed Mypy check error

* Fixed Mypy error by importing Any from typing

* Fixed linting errors

* Added comment to address why type Any is used

* Made requested changes in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Made requested changes

* Fixed failing backend, linter and MyPy tests

* Fixed failing linter tests

* Fixed failing linter tests

* Fixed failing MyPy tests

* Added comment

* Fixed linting issues

* Added correct types in profile_test

* Corrected if block and typo

* Added test to fix failing backend coverage

* Fixed linting issues

* Fixed Mypy issues

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20901: Image Uploader Modal croppable image flake (#21050)

* Fix acceptance test

* Revert accidental commit

* Fix croppable image flake

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Hardcoded math classroom for diagnostic test. (#21092)

* Hardcoded math classroom for diagnostic test.

* Fixes frontend test

* Update authors until 80bfd71 (#21076)

* Update core/templates/pages/about-page/about-page.constants.ts

* Update AUTHORS

* Update CONTRIBUTORS

* Fix AUTHORS file

* [GSoC'24] Run exploration misconception support acceptance test in CI (#20889)

* Fix acceptance test

* Revert accidental commit

* Fix

* Run test in CI

* Fix lint issue

* Fix type

* Test

* Fix setup

* Update

* Update

* Fix flaky behaviour

* Fix flakiness

* Add missing await

* Add missing awaits

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #21116: Watch A Video acceptance test Facebook URL mismatch (#21132)

Make facebook URL check less strict to avoid flakes

* Revert "Fix #20443: Added validation check for the range in the HasLengthInclusivelyBetween method" (#21131)

Revert "Fix #20443: Added validation check for the range in the HasLengthIncl…"

This reverts commit d221cfc.

* Adding user groups via release coordinator page (#20429)

* Changes to add user groups via admin page

* Fixed the failing tests

* Updates to fix the tests

* Fixed multiple tests

* Frontend test fixed

* Addressed the comments

* Updates to the UI

* some updates to the warnings

* Revamped the UI | Added frontend domain model | Updated backend functions accordingly

* Updates to resolve the errors

* Migrated to release-coordinator page

* fixed tests

* Fixed the build error by removing the reference for the scss file from component

* Added the domain layer changes

* Fixed backend test and updated the UI

* fixed tests

* Done suggested changes: Removed the fetching of all users

* small nit

* backend coverage

* fixed tests

* Done suggested changes

* user also gets deleted from UserGroupModel when it is deleted

* Fixed coverage

* Some trivial changes

* add one more blank line in git_changes_utils.py

* fix base_test.py

* fix .gitignore with diff-snapshots

* add dev screenshots for blog-editor

* moved artifacts workflow order

* moved diff workflow to after running tests

* remove some screenshots from blog editor

* un edit combined-tests.spec.ts

* un un edited combined-tests.spec.ts

* un edited combined-tests.spec.ts

* change all _ to -

* addressed most of the comments and customized diff-snapshots in CI

* renamed all screenshots in logged-out-users

* regenerate all screenshots with new names

* un edit blog-admin/assign-roles-to-users-and-change-tag-properties

* edit servers_test.py

* mention @bcoe in combined-tests.spec.ts

* fixed servers_test.py and comma after from in puppeteer-utils.ts

* Fixed all comments

* deleted one empty line

* updated donatePage screenshots

* deleted helpers/reporter.ts

* edited to run on docker

* fixed lint

* Edited clickCreateOneHereLinkOnGetStartedPage in logged-out-user.ts

* Update logged-out-user.ts with toContain

* Update servers.py by adding --detectOpenHandles --forceExit

* Update Makefile by adding --detectOpenHandles --forceExit

---------

Co-authored-by: Akhilesh Kr <2827daya@gmail.com>
Co-authored-by: Harshvardhan Singh <73544247+Lawful2002@users.noreply.github.com>
Co-authored-by: Bryan Khor <67664138+bryankhor07@users.noreply.github.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Nikhil <nikhil.agarwal.2019@gmail.com>
Co-authored-by: amyyeung17 <amyyeung17@gmail.com>
Co-authored-by: Mannika <84311047+mannika763@users.noreply.github.com>
Co-authored-by: Oluwapolore Oyeniji <90858072+poloreoyeniji@users.noreply.github.com>
Co-authored-by: Justin Nguyen <70992422+jnvtnguyen@users.noreply.github.com>
Co-authored-by: Jayam Patel <jayampatel04@gmail.com>
Co-authored-by: Vir Kothari <73329256+Vir-8@users.noreply.github.com>
Co-authored-by: Rahat <136263179+rahat2134@users.noreply.github.com>
Co-authored-by: Akash Paloju <119884665+AkashPaloju@users.noreply.github.com>
Co-authored-by: Ali Orozgani <40970649+YaySushi@users.noreply.github.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Priyanshu Verma <priyanshuverma@outlook.in>
Co-authored-by: Mohit Ruwatia <120438312+mon4our@users.noreply.github.com>
Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Afzal Khan <tricktomade@gmail.com>
Co-authored-by: Hitesh Tomar <44300735+lkbhitesh07@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 24, 2024
…21493)

* Added test for i18n format

* Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Added Functions for Question Admin

* Update develop

* [GSoC'24] M1.11, Fix a part of #20374: Acceptance test coverage for a topic manger's CUJs (#20580)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* [GSoC'24] M1.8, Fix a part of #20374: Acceptance test coverage for 2 Topics Manager's CUJs. (#20569)

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* updates

* Fix #20521: Fixed issues with AuthGuard for SubtopicViewerPage (#20579)

* fixed issues with auth guard

* fixed issues with tests

* fixed issues with frontend tests

* fixed linting issues

* Fix issue #20617: 'Blog Post Title' is now visible in the Blog Post Editor (#20634)

* Added necessary CSS properties to fix position of blog-post-title

* Changed position of blog-post-title on mobile viewport

* Removed bottom property to center the blog-post-title

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Moves AUTO_UPDATE_EXP_VOICE_ARTIST_LINK feature flag to prod (#20658)

Moves feature flag to prod

* Fix part of #18384: Base of new progress tab for learner dashboard redesign (#20522)

* Added feature flags

* refactored and replaced with new components community lessons (new progress tab)

* Replaced innerHtml

* Updated translation keys

* Updated variable names to match #20306

* Added notes, renamed card-display, updated temp progress value for explorations/collections

* Fixed lint issues

* Removed unused tag

* Adjusted spacing

* Last adjustment

* Fixed content sizing for screens > 1512 (prevent shrink if not enough obj)

* Fixed e2e error

* Renamed communityComplete variable

* Renamed feature flag for community lessons

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* Fixing: #20641, The Signature is not visible clearly in mobile devices when the word count is too large (#20646)

increasing height in mobile device

* Fix part of #18921: Replace user-referenced TODO comments with issue-referenced TODO comments (#20464)

Part fix of #18921

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC' 24] Fixes #20671 and general M1 fixes. (#20657)

* Updates

* Updates

* Updates

* Debugging

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Fix #20304: updated Makefile to start dsadmin (#20425)

* updated Makefile to start dsadmin

* added required changes

* restored index.yaml with develop

* removed xdg-open from dsadmin

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* [GSoC'24] Modify translations bug fixes (#20666)

* Improve modal CSS

* Tick checkbox on saving a translation

* Update button text for clarity

* Show subsidiary modal only when editable translations exist

* Verify if RTE components of modified translation match when updating translation

* Add missing languages to supported content language list

* Fix frontend tests

* Fix acceptance test

* Fix bugs pertaining to stale and empty translations

* Fix linter issues

* Gate translation changes button behind feature flag

* Fix frontend test

* Fix rules display bug

* Implement part of #17712 : Acceptance tests for Exploration editor Section(CUJ 12). (#20669)

* Exploration-editor-CUJ-12

* Add proper specs

* Add proper specs

* changes

* [GSoC'24]M2.1 Redesign volunteer page (#20667)

* Redesign volunteer page

* fix tests

* fix the tests

* Fix rtl issues

* fix lighthouse tests

* Address review comments 1

* change lexico order

* [GSoC'24] Fix #20652, and #20649: Fixes the respective two flakes.  (#20672)

* updates

* updates

* updates

* Fix #20787 and #20788: Allow naming of merge from develop steps in GitHub Workflows (#20907)

* Allow naming of merge from develop steps in GitHub Workflows

* Modify existing test for merge step

* Add a linter to require that all GitHub workflow steps be named

* Add tests for requiring steps to be named and fix minor details in merge step test

* Add names for workflow steps

* Fix grammar mistakes in comments

---------

Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #20001: Make pre-push hook more efficient. (#20905)

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20779: Makefile env PATH fix on WSL (#20780)

* makefile fixed

* Explaining comments

* Explaining FIXED_PATH with comments

* removed extra comment

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix #20399: Added tests for POST, PUT and DELETE and error handling for invalid method using 405 status code. (#20544)

* Added no 500 error tests for post put and delete. Also added 405 status code handling for invalid requests.

* Fixed linting issues

* Fixed more linting issues

* Fixed even more linting issues

* Fixed MyPy issues

* Fixed linting issues

* Fixed backend test error and updated 405 error message.

* Fixed linting errors

* Fixed linting errors

* Added requested formatting change

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>

* Added requested formatting changes

* Made changes so that load_templates is only used for GET

* Made the requested changes

* Fixed linting issue

* Fixed failing backend test, made assertion for http_method neater

* Fixed backend test and made requested changes

* Fixed Mypy check error

* Fixed Mypy error by importing Any from typing

* Fixed linting errors

* Added comment to address why type Any is used

* Made requested changes in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Updated comment about mock_add_user_to_raise_exception in profile_test

* Made requested changes

* Fixed failing backend, linter and MyPy tests

* Fixed failing linter tests

* Fixed failing linter tests

* Fixed failing MyPy tests

* Added comment

* Fixed linting issues

* Added correct types in profile_test

* Corrected if block and typo

* Added test to fix failing backend coverage

* Fixed linting issues

* Fixed Mypy issues

---------

Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of#19849: Multiple classrooms bug fixes (#20904)

* Fix part of#19849: Multiple classrooms bug fixes

* fix classrooms page alignment

* nit

* add classroom name and url fragment

* fix type

* add classroom name

* show classroom name

* fix test

* fix overflow

---------

Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>

* Fix part of #19435: Review test page migration (#20790)

* review tests page migration

* *lint fix

* lint fix

* Reverting import changes

---------

Co-authored-by: Akhilesh Kr. <2827daya@gmail.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>

* fix lint

* added new line

* added new line

* same as upstream

* deleted zone.identifier

* deleted detechOpenHandles and forceExit

* added closeBrowser

* added comments in create-delete-account

---------

Co-authored-by: Akhilesh Kr <2827daya@gmail.com>
Co-authored-by: Harshvardhan Singh <73544247+Lawful2002@users.noreply.github.com>
Co-authored-by: Bryan Khor <67664138+bryankhor07@users.noreply.github.com>
Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
Co-authored-by: Nikhil <nikhil.agarwal.2019@gmail.com>
Co-authored-by: amyyeung17 <amyyeung17@gmail.com>
Co-authored-by: Mannika <84311047+mannika763@users.noreply.github.com>
Co-authored-by: Oluwapolore Oyeniji <90858072+poloreoyeniji@users.noreply.github.com>
Co-authored-by: Justin Nguyen <70992422+jnvtnguyen@users.noreply.github.com>
Co-authored-by: Jayam Patel <jayampatel04@gmail.com>
Co-authored-by: Vir Kothari <73329256+Vir-8@users.noreply.github.com>
Co-authored-by: Rahat <136263179+rahat2134@users.noreply.github.com>
Co-authored-by: Akash Paloju <119884665+AkashPaloju@users.noreply.github.com>
Co-authored-by: Ali Orozgani <40970649+YaySushi@users.noreply.github.com>
Co-authored-by: Sean Lip <sean@seanlip.org>
Co-authored-by: Priyanshu Verma <priyanshuverma@outlook.in>
Co-authored-by: Mohit Ruwatia <120438312+mon4our@users.noreply.github.com>
Co-authored-by: Vojtěch Jelínek <vojtech.jelinek@hey.com>
Co-authored-by: Afzal Khan <tricktomade@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants