summaryrefslogtreecommitdiff
path: root/spec/frontend/performance_bar/components/performance_bar_app_spec.js
blob: 67a4259a8e3a6ad595579fbfff5eaab036925506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { shallowMount } from '@vue/test-utils';
import PerformanceBarApp from '~/performance_bar/components/performance_bar_app.vue';
import PerformanceBarStore from '~/performance_bar/stores/performance_bar_store';

describe('performance bar app', () => {
  const store = new PerformanceBarStore();
  const wrapper = shallowMount(PerformanceBarApp, {
    propsData: {
      store,
      env: 'development',
      requestId: '123',
      statsUrl: 'https://log.gprd.gitlab.net/app/dashboards#/view/',
      peekUrl: '/-/peek/results',
      profileUrl: '?lineprofiler=true',
    },
  });

  it('sets the class to match the environment', () => {
    expect(wrapper.element.getAttribute('class')).toContain('development');
  });
});