summaryrefslogtreecommitdiff
path: root/spec/javascripts/environments/environment_monitoring_spec.js
blob: 0f3dba662303a8b2cc801e8a0fe972fd24f6b455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Vue from 'vue';
import monitoringComp from '~/environments/components/environment_monitoring.vue';

describe('Monitoring Component', () => {
  let MonitoringComponent;

  beforeEach(() => {
    MonitoringComponent = Vue.extend(monitoringComp);
  });

  it('should render a link to environment monitoring page', () => {
    const monitoringUrl = 'https://gitlab.com';
    const component = new MonitoringComponent({
      propsData: {
        monitoringUrl,
      },
    }).$mount();

    expect(component.$el.getAttribute('href')).toEqual(monitoringUrl);
    expect(component.$el.querySelector('.fa-area-chart')).toBeDefined();
    expect(component.$el.getAttribute('title')).toEqual('Monitoring');
  });
});