Add onboarding_status to user_details and implement use
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
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.
- Setup to simulate SaaS and restart GDK
- Register as a new user.
- 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)
- Visit the path from the previous step.
- You should be on the sign in page, log back in.
- Select any 'role' and 'Just me' in the welcome form after sign up step.
- Notice the email checkbox will show or hide based on 'Just me' toggling.
- 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.
- Choose 'Create a new project'
- Click 'Continue'
- Fill out fields to create a group and project on the next page.
- Click 'Create project'
- Verify you get to the onboarding and page refreshes to provide a "Ok, let's go" button.
Related to #435741
Edited by Doug Stull