crf-devs/resop

Asset creation from parent organization buggy

Opened this issue · 0 comments

When listing assets for a child organization, if we follow link "new asset", after the "preAdd" step we're redirected to the "add" step with url contextualized for parent organization. IMO we should be on the url for the child organization and "structure" should not be a field of the form, but contextualized on the structure we were watching.

step to reproduce

        Given I am authenticated as "DT75"
        When I go to "/organizations/[UL-01-02-ID]/assets"
        And I follow "Ajouter un nouveau véhicule"
        And I should be on "/organizations/[UL-01-02-ID]/assets/preAdd"
        When I select "VL" from "type"
        And I press "Continuer"
        Then I should be on "/organizations/[UL-01-02-ID]/assets/add"

(last step fails because we're on /organizations/[DT75-ID]/assets/add)