Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ml/experiment_tracking/components/incubation_alert_spec.js')
-rw-r--r--spec/frontend/ml/experiment_tracking/components/incubation_alert_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/ml/experiment_tracking/components/incubation_alert_spec.js b/spec/frontend/ml/experiment_tracking/components/incubation_alert_spec.js
new file mode 100644
index 00000000000..e07a4ed816b
--- /dev/null
+++ b/spec/frontend/ml/experiment_tracking/components/incubation_alert_spec.js
@@ -0,0 +1,27 @@
+import { mount } from '@vue/test-utils';
+import { GlAlert, GlButton } from '@gitlab/ui';
+import IncubationAlert from '~/ml/experiment_tracking/components/incubation_alert.vue';
+
+describe('IncubationAlert', () => {
+ let wrapper;
+
+ const findAlert = () => wrapper.findComponent(GlAlert);
+
+ const findButton = () => wrapper.findComponent(GlButton);
+
+ beforeEach(() => {
+ wrapper = mount(IncubationAlert);
+ });
+
+ it('displays link to issue', () => {
+ expect(findButton().attributes().href).toBe(
+ 'https://gitlab.com/groups/gitlab-org/-/epics/8560',
+ );
+ });
+
+ it('is removed if dismissed', async () => {
+ await wrapper.find('[aria-label="Dismiss"]').trigger('click');
+
+ expect(findAlert().exists()).toBe(false);
+ });
+});