crf-devs / resop

ResOp is a management, planning and projection tool for human and operational resources in a crisis context.
https://resop.aws.mroca.fr/
GNU General Public License v3.0
47 stars 20 forks source link

Asset creation from parent organization buggy #360

Open nikophil opened 4 years ago

nikophil commented 4 years ago

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)