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: fix simplify registration experiment bugs #1175

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

syedsajjadkazmii
Copy link
Contributor

Description

Fix experiment initialization bug

@syedsajjadkazmii syedsajjadkazmii requested a review from a team as a code owner February 26, 2024 14:54
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 23.33333% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 84.23%. Comparing base (e0d6055) to head (e3f8043).

Files Patch % Lines
src/register/data/optimizelyExperiment/helper.js 13.04% 14 Missing and 6 partials ⚠️
src/register/RegistrationPage.jsx 66.66% 2 Missing ⚠️
...ent/useSimplifyRegistrationExperimentVariation.jsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1175      +/-   ##
==========================================
- Coverage   84.81%   84.23%   -0.58%     
==========================================
  Files         127      127              
  Lines        2371     2392      +21     
  Branches      671      678       +7     
==========================================
+ Hits         2011     2015       +4     
- Misses        345      357      +12     
- Partials       15       20       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +45 to 47
!expVariation || expVariation === NOT_INITIALIZED || expVariation === DEFAULT_VARIATION
|| (expVariation === SIMPLIFIED_REGISTRATION_VARIATION
&& (
Copy link
Contributor

Choose a reason for hiding this comment

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

For my understanding can you explain this condition? What is this doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have four states of experiment
1- (!expVariation) at start, when experiment is being initialized or not initialized because it was either embedded register page, tpaHint or currentProvider was available -> We want to show spinner when exp is being initialized and we want to show normal register page if its embedded register page, tpaHint or currentProvider is available.

2- (expVariation === NOT_INITIALIZED) experiment could not be initialized due to any unknown reason -> we want to show normal register page

3- (expVariation === DEFAULT_VARIATION) experiment is initialized and user is bucketed into the DEFAULT_VARIATION. -> we want to show normal register page

4- expVariation === SIMPLIFIED_REGISTRATION_VARIATION ) experiment is initialized and user is bucketed into the SIMPLIFIED_REGISTRATION_VARIATION . -> we want to show all fields except username on first step and username + honor_code in second step of simplified register page

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The above condition satisfies the above 4 scenarios

@syedsajjadkazmii syedsajjadkazmii force-pushed the sajjad/VAN-1827-fix-exp-bugs branch from f80c21b to e3f8043 Compare February 27, 2024 05:04
@syedsajjadkazmii syedsajjadkazmii merged commit 9b04614 into master Feb 27, 2024
5 of 7 checks passed
@syedsajjadkazmii syedsajjadkazmii deleted the sajjad/VAN-1827-fix-exp-bugs branch February 27, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants