DAST on-demand scans site-profile edit - apply correct UI state based on validation status
requested to merge 247452-dast-site-validation-set-correct-validation-toggle-state-when-editing-a-profile into master
What does this MR do?
It adds logic to the DAST on-demand scans site-profiles form to render the UI based on the current target-site validation status.
How to test this?
- Enable the feature flag.
echo "Feature.enable(:security_on_demand_scans_site_validation)" | rails c
-
Install and setup
graphql-vue-apollo-playground
locally. Checkout themock-dast-site-profiles
branch and run the mock server. -
Use the local mock server in the Apollo provider.
diff --git a/ee/app/assets/javascripts/dast_site_profiles_form/graphql/provider.js b/ee/app/assets/javascripts/dast_site_profiles_form/graphql/provider.js
index ef96b443da8..993a7cefb5c 100644
--- a/ee/app/assets/javascripts/dast_site_profiles_form/graphql/provider.js
+++ b/ee/app/assets/javascripts/dast_site_profiles_form/graphql/provider.js
@@ -5,5 +5,10 @@ import createDefaultClient from '~/lib/graphql';
Vue.use(VueApollo);
export default new VueApollo({
- defaultClient: createDefaultClient(),
+ defaultClient: createDefaultClient(
+ {},
+ {
+ baseUrl: 'http://localhost:4000',
+ },
+ ),
});
- Navigate to the DAST Site profile form in your GDK:
/:namespace/:project/-/on_demand_scans/profiles/dast_site_profiles/new
Screenshots
validation status | Screenshot | Recording |
---|---|---|
Pending | pending_success | |
In Progress | inprogress_success | |
Passed | passed | |
Failed | failure_success |
It also handles the case of a failing validation when in polling-mode:
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] 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
Related to #247452 (closed)
Edited by David Pisek