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: remove reason when password change is set to false #31363

Merged
merged 16 commits into from
Jun 10, 2024

Conversation

tapiarafael
Copy link
Member

@tapiarafael tapiarafael commented Jan 3, 2024

Proposed changes (including videos or screenshots)

Remove the requirePasswordChangeReason when the field requirePasswordChange is set to false.

Issue(s)

Steps to test or reproduce

Further comments

SUP-444

Copy link

changeset-bot bot commented Jan 3, 2024

🦋 Changeset detected

Latest commit: 2d1b2bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.91%. Comparing base (1e8d97f) to head (2d1b2bb).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31363      +/-   ##
===========================================
- Coverage    56.39%   55.91%   -0.48%     
===========================================
  Files         2437     2386      -51     
  Lines        53773    52826     -947     
  Branches     11082    10843     -239     
===========================================
- Hits         30325    29539     -786     
+ Misses       20802    20672     -130     
+ Partials      2646     2615      -31     
Flag Coverage Δ
e2e 55.22% <ø> (-0.91%) ⬇️
unit 72.12% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@tapiarafael tapiarafael marked this pull request as ready for review January 3, 2024 18:51
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

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

Can we add a test case to cover this?

apps/meteor/app/lib/server/functions/saveUser.js Outdated Show resolved Hide resolved
@tapiarafael
Copy link
Member Author

Can we add a test case to cover this?

Not for this case, since we cannot simulate the requirePasswordChangeReason being populated to check if it was deleted when the requirePasswordChange is set to false 😞

Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

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

Please add a test that covers this part of the function - even if you can't validate this specific bug in an api test, we would at least have a test running the functionality

Copy link
Contributor

dionisio-bot bot commented Apr 12, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@tapiarafael
Copy link
Member Author

tapiarafael commented May 23, 2024

Please add a test that covers this part of the function - even if you can't validate this specific bug in an api test, we would at least have a test running the functionality

@pierre-lehnen-rc, I didn't find a way to test it.
E2E tests can't cover this scenario, and I couldn't write a unit test since the saveUser.js file has many dependencies.

@pierre-lehnen-rc
Copy link
Contributor

Please add a test that covers this part of the function - even if you can't validate this specific bug in an api test, we would at least have a test running the functionality

@pierre-lehnen-rc, I didn't find a way to test it. E2E tests can't cover this scenario, and I couldn't write a unit test since the saveUser.js file has many dependencies.

E2E can cover this, just create an user with the reason set, then write a test that checks if the reason is removed when the flag is set to false.

@tapiarafael tapiarafael requested a review from a team as a code owner May 27, 2024 20:34
Copy link
Member

@MarcosSpessatto MarcosSpessatto left a comment

Choose a reason for hiding this comment

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

Can we add a changeset?

@scuciatto scuciatto added this to the 6.10 milestone May 29, 2024
@matheusbsilva137 matheusbsilva137 added the stat: QA assured Means it has been tested and approved by a company insider label Jun 7, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 7, 2024
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Jun 7, 2024
@matheusbsilva137 matheusbsilva137 added the stat: ready to merge PR tested and approved waiting for merge label Jun 10, 2024
@kodiakhq kodiakhq bot merged commit c8069f7 into develop Jun 10, 2024
43 of 47 checks passed
@kodiakhq kodiakhq bot deleted the fix/password-change-reason branch June 10, 2024 16:50
This was referenced Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants