-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add start form for new registrations #695
Conversation
From: https://eaflood.atlassian.net/browse/RUBY-840 This adds a new page to the services which allow a user to start a new registration journey. The page is part of the new registration workflow.
…ansient registration is of type new registration. In WEX, we do not check for the presence and format of a reference so we might later decide to remove this check entirely and move it to relevant start forms only.
…start form. We will need to do further refactoring on the way we authenticate users on each separate journey.
@cintamani I've removed myself and @irisfaraway as reviewers as I know we suggested the tweak about prefixing the start option with So figured it makes our TODO list a little clearer if we remove ourselves for now and then you add us again when the changes have been made. |
Yes definitely! Thanks guys :) will ping you when it is ready again |
app/controllers/waste_carriers_engine/renew_registration_forms_controller.rb
Outdated
Show resolved
Hide resolved
The missing test coverage is for the temporary renewing registration forms and controller which will be implemented and properly tested as per RUBY-841 Hence I am going to ignore codeclimate's complain in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good :) Just a few small questions and tweaks! I am not fussed about CodeClimate though as we know it'll be fixed when we actually make those pages.
@@ -46,6 +46,7 @@ module WasteCarriersEngine | |||
context "when the resource is not a transient_registration" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this accurate? A NewRegistration is still a type of TransientRegistration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is not testing the validity of a new_regisration
object in the base_form, but the validity of a registration
object passed as a transient registration, so is still correct. You could argue that there is no test coverage for when we have a transient registration that is of type new registration, but as we discussed during the dev meeting we aren't sure about keeping this validation at all, and I will have to sort it out for validating the correct CBDU/CBDL numbers are generated later on so I just added that is_a?
as a placeholder and make things pass now. We will need to go in more details about that in some other PR/meeting :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the first allow
is making sure that is_a?(TransientRegistration)
always returns false, but the second allow
makes sure we still actually call is_a?(NewRegistration)
and use the real response – am I understanding this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the second call is stubbing is_a?(NewRegistration)
and making it return nil
spec/models/waste_carriers_engine/new_registration_workflow/start_form_spec.rb
Show resolved
Hide resolved
Co-Authored-By: Iris Faraway <iris.faraway@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thing about the naming of the start option attribute. Appreciate I've only highlighted it in one place but I know it's going to need to be updated in a few others.
From: https://eaflood.atlassian.net/browse/RUBY-840
This adds a new page to the services which allow a user to start a new registration journey.
The page is part of the new registration workflow.
I suggest reviewing by separate commits