Commit f34f7c48 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Enrique Alcántara

Add MR Analytics skeleton code

Introduce the base / bootstrapping code needed for the
Merge Request Analytics page.

This is an MVC MR.
parent 63c99d35
<script>
export default {
name: 'MergeRequestAnalyticsApp',
};
</script>
<template>
<div>
<h3 data-testid="pageTitle">{{ __('Merge Request Analytics') }}</h3>
</div>
</template>
import Vue from 'vue';
import MergeRequestAnalyticsApp from './components/app.vue';
export default () => {
const el = document.querySelector('#js-merge-request-analytics-app');
if (!el) return false;
return new Vue({
el,
name: 'MergeRequestAnalyticsApp',
render: createElement => createElement(MergeRequestAnalyticsApp),
});
};
import initMergeRequestAnalyticsApp from 'ee/analytics/merge_request_analytics';
document.addEventListener('DOMContentLoaded', initMergeRequestAnalyticsApp);
- page_title _('Merge Request Analytics')
#js-merge-request-analytics-app
import { shallowMount } from '@vue/test-utils';
import MergeRequestAnalyticsApp from 'ee/analytics/merge_request_analytics/components/app.vue';
describe('MergeRequestAnalyticsApp', () => {
let wrapper;
const createComponent = () => {
wrapper = shallowMount(MergeRequestAnalyticsApp);
};
beforeEach(() => {
createComponent();
});
afterEach(() => {
wrapper.destroy();
wrapper = null;
});
it('displays the page title', () => {
const pageTitle = wrapper.find('[data-testid="pageTitle"').text();
expect(pageTitle).toEqual('Merge Request Analytics');
});
});
...@@ -14672,6 +14672,9 @@ msgstr "" ...@@ -14672,6 +14672,9 @@ msgstr ""
msgid "Merge Request" msgid "Merge Request"
msgstr "" msgstr ""
msgid "Merge Request Analytics"
msgstr ""
msgid "Merge Request Approvals" msgid "Merge Request Approvals"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment