Skip to content

Add onboarding_status to user_details and implement use

Doug Stull requested to merge 435741-add-initial-onboarding_status into master

What does this MR do and why?

Add onboarding_status to user_details and implement use

  • add store for onboarding concerns that we want to record in order to either analyze on the data side or for future triggering of user experiences outside of onboarding in the app.
  • eventual replacement of onboarding_step_url column.
  • resolve a few spec rubocop issues while in that area.
  • see &11768

Changelog: other

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

no change

Screenshot_2024-01-18_at_12.43.53_PM

How to set up and validate locally

note basically trying to emulate feature spec steps in ee/spec/features/registrations/saas/standard_flow_just_me_creating_project_spec.rb and the rest of the specs in that directory cover other permutations.

  1. Setup to simulate SaaS and restart GDK
    • Make sure Admin > Settings > General > Sign Up Restrictions match the below (no admin approval, but hard email confirmation) image
  2. Register as a new user.
  3. Confirm email by finding the confirmation path from last User created in rails console
    • Rails.application.routes.url_helpers.user_confirmation_path(confirmation_token: User.last.confirmation_token)
  4. Visit the path from the previous step.
  5. You should be on the sign in page, log back in.
  6. Select any 'role' and 'Just me' in the welcome form after sign up step.
  7. Notice the email checkbox will show or hide based on 'Just me' toggling.
  8. Go to rails console and notice the value of onboarding status with User.last.onboarding_status as below:
    [3] pry(main)> User.last.onboarding_status
    => {"step_url"=>"/users/sign_up/groups/new", "email_opt_in"=>true}
    • this completes verification, the rest is merely to finish onboarding if desired.
  9. Choose 'Create a new project'
  10. Click 'Continue'
  11. Fill out fields to create a group and project on the next page.
  12. Click 'Create project'
  13. Verify you get to the onboarding and page refreshes to provide a "Ok, let's go" button.

Related to #435741

Edited by Doug Stull

Merge request reports