blob: 98dd9edd81222883b926e6ce230181ab3ad877e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import { mountExtended } from 'helpers/vue_test_utils_helper';
import MonitoringComponent from '~/environments/components/environment_monitoring.vue';
import { __ } from '~/locale';
describe('Monitoring Component', () => {
let wrapper;
const monitoringUrl = 'https://gitlab.com';
const createWrapper = () => {
wrapper = mountExtended(MonitoringComponent, {
propsData: {
monitoringUrl,
},
});
};
beforeEach(() => {
createWrapper();
});
it('should render a link to environment monitoring page', () => {
const link = wrapper.findByRole('menuitem', { name: __('Monitoring') });
expect(link.attributes('href')).toEqual(monitoringUrl);
});
});
|