2021-10-04 18:12:46 +00:00
|
|
|
import { mountExtended } from 'helpers/vue_test_utils_helper';
|
2019-11-26 18:06:33 +00:00
|
|
|
import MonitoringComponent from '~/environments/components/environment_monitoring.vue';
|
2021-10-04 18:12:46 +00:00
|
|
|
import { __ } from '~/locale';
|
2019-11-26 18:06:33 +00:00
|
|
|
|
|
|
|
describe('Monitoring Component', () => {
|
|
|
|
let wrapper;
|
|
|
|
|
|
|
|
const monitoringUrl = 'https://gitlab.com';
|
|
|
|
|
|
|
|
const createWrapper = () => {
|
2021-10-04 18:12:46 +00:00
|
|
|
wrapper = mountExtended(MonitoringComponent, {
|
2019-11-26 18:06:33 +00:00
|
|
|
propsData: {
|
|
|
|
monitoringUrl,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
createWrapper();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render a link to environment monitoring page', () => {
|
2021-10-04 18:12:46 +00:00
|
|
|
const link = wrapper.findByRole('menuitem', { name: __('Monitoring') });
|
|
|
|
expect(link.attributes('href')).toEqual(monitoringUrl);
|
2019-11-26 18:06:33 +00:00
|
|
|
});
|
|
|
|
});
|