DAST Site profiles - Form MVC - Create the basic form - Frontend
- Related issue: #225370 (closed)
What does this MR do?
This MR implements a basic form for creating DAST site profiles. In this iteration, the form only accepts a profile name and a target URL. The code here is heavily based on prior work for the On-demand Scans MVC: on_demand_scans_form.vue
, which will eventually be cleaned up to use the DAST site profiles created with this new form instead of letting the user input the target URL there.
The user flow is pretty basic for now:
- Cancelling with the form empty brings back to the DAST profiles library page (which is still under construction).
- Cancelling with some fields filled in asks the user to confirm their action before bringing back to the DAST profiles library.
- Successfully submitting the form brings back to the DAST profiles library page.
- Failure upon submission shows a flash error and lets the user try again.
How to test this?
- Enable the feature flag:
echo "Feature.enable(:security_on_demand_scans_feature_flag)" | spring rails c
- Sign-in as the
root
user. - Navigate to a project's New site profile page by manually typing the URL in the address bar:
/:group/:project/-/on_demand_scans/profiles/dast_site_profiles/new
Screenshots
Form's state | Preview |
---|---|
Default | |
Cancelled with some fields filled-in |
Situation | Recording |
---|---|
User cancels while the form is still empty | Screen_Recording_2020-07-10_at_5.29.36_PM |
User cancels after filling-in some fields | cancel_w_fields_filled |
User successfully submits the form | Screen_Recording_2020-07-10_at_5.28.50_PM |
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry (no changelog required as this is behind a feature flag)
- [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per [definition of done](https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done
Edited by Paul Gascou-Vaillancourt