debian-mirror-gitlab/spec/frontend/environments/environment_monitoring_spec.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
699 B
JavaScript
Raw Normal View History

2021-11-18 22:05:49 +05:30
import { mountExtended } from 'helpers/vue_test_utils_helper';
2020-01-01 13:55:28 +05:30
import MonitoringComponent from '~/environments/components/environment_monitoring.vue';
2021-11-18 22:05:49 +05:30
import { __ } from '~/locale';
2020-01-01 13:55:28 +05:30
describe('Monitoring Component', () => {
let wrapper;
const monitoringUrl = 'https://gitlab.com';
const createWrapper = () => {
2021-11-18 22:05:49 +05:30
wrapper = mountExtended(MonitoringComponent, {
2020-01-01 13:55:28 +05:30
propsData: {
monitoringUrl,
},
});
};
beforeEach(() => {
createWrapper();
});
it('should render a link to environment monitoring page', () => {
2021-11-18 22:05:49 +05:30
const link = wrapper.findByRole('menuitem', { name: __('Monitoring') });
expect(link.attributes('href')).toEqual(monitoringUrl);
2020-01-01 13:55:28 +05:30
});
});