Skip to content

Add security training promo to MR widget

Samantha Ming requested to merge 346064-security-training-promo into master

What does this MR do and why?

In this MR, the security training promo is added to the MR widget.

Screenshots or screen recordings

2022-10-05_at_8.25_PM

How to set up and validate locally

This feature is behind a feature flag. Enable :refactor_security_extension to turn this feature on.

echo "Feature.enable(:refactor_security_extension)" | rails c
  1. Create a new MR and run a pipeline
  2. Expand security widget
  3. You will see the security training banner
  4. The "Enable security training" button will go to help page
  5. The "Do no show again" will dismiss the promo. Refresh the page, the banner will still be gone.

To reset the dismissal state and try closing it again do (just replace "root" with your gdk's username):

echo 'User.find_by(username: "root").callouts.find_by(feature_name: "security_training_feature_promotion").destroy' | rails c

Alternatively, you can following these steps to mock the API (copied from !84896 (merged))

  1. Go to any MR
  2. (Optional but handy) Download Mokku for mocking the API: https://chrome.google.com/webstore/detail/mokku-mock-api-calls-seam/llflfcikklhgamfmnjkgpdadpmdplmji?hl=en
  3. (Optional but handy) Import the following mocks to Mokku mr-security-widget.json

Note

This MR is missing the x button on the corner, I'll add that in a follow up MR

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346064 (closed)

Edited by Samantha Ming

Merge request reports

Loading