Commit 52d6f7d0 authored by Jeremy Jackson's avatar Jeremy Jackson Committed by Igor Drozdov

Adds the security_reports_mr_widget_prompt experiment for a front end feature

parent 0c561756
# frozen_string_literal: true
class SecurityReportsMrWidgetPromptExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass
def publish(_result = nil)
super
publish_to_database
end
# This is a purely client side experiment, and since we don't have a nicer
# way to define variants yet, we define them here.
def candidate_behavior
end
end
---
name: security_reports_mr_widget_prompt
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70086
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/340436
milestone: '14.3'
type: experiment
group: group::adoption
default_enabled: false
......@@ -9,6 +9,7 @@ module EE
include DescriptionDiffActions
before_action only: [:show] do
experiment(:security_reports_mr_widget_prompt, namespace: @project.namespace).publish
push_frontend_feature_flag(:anonymous_visual_review_feedback)
push_frontend_feature_flag(:missing_mr_security_scan_types, @project)
end
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe SecurityReportsMrWidgetPromptExperiment do
it "defines a control and candidate" do
expect(subject.behaviors.keys).to match_array(%w[control candidate])
end
it "publishes to the database" do
expect(subject).to receive(:publish_to_database)
subject.publish
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment