debian-mirror-gitlab/spec/frontend/environments/environment_monitoring_spec.js
2021-11-18 22:05:49 +05:30

26 lines
699 B
JavaScript

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);
});
});