Commit e20c2574 authored by Phil Hughes's avatar Phil Hughes

Merge branch '207223-fix-self-monitoring-project' into 'master'

Fix self monitoring project link

See merge request gitlab-org/gitlab!25516
parents a86d5c5c e28f1dda
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
</div> </div>
<div class="settings-content"> <div class="settings-content">
<form name="self-monitoring-form"> <form name="self-monitoring-form">
<p v-html="selfMonitoringFormText"></p> <p ref="selfMonitoringFormText" v-html="selfMonitoringFormText"></p>
<gl-form-group :label="$options.formLabels.createProject" label-for="self-monitor-toggle"> <gl-form-group :label="$options.formLabels.createProject" label-for="self-monitor-toggle">
<gl-toggle <gl-toggle
v-model="selfMonitorEnabled" v-model="selfMonitorEnabled"
......
...@@ -9,7 +9,7 @@ export default (initialState = {}) => ({ ...@@ -9,7 +9,7 @@ export default (initialState = {}) => ({
deleteProjectStatusEndpoint: initialState.statusDeleteSelfMonitoringProjectPath || '', deleteProjectStatusEndpoint: initialState.statusDeleteSelfMonitoringProjectPath || '',
selfMonitorProjectPath: initialState.selfMonitoringProjectFullPath || '', selfMonitorProjectPath: initialState.selfMonitoringProjectFullPath || '',
showAlert: false, showAlert: false,
projectPath: '', projectPath: initialState.selfMonitoringProjectFullPath || '',
loading: false, loading: false,
alertContent: {}, alertContent: {},
}); });
---
title: Fix self monitoring project link
merge_request: 25516
author:
type: fixed
...@@ -72,11 +72,17 @@ describe('self monitor component', () => { ...@@ -72,11 +72,17 @@ describe('self monitor component', () => {
selfMonitoringProjectExists: true, selfMonitoringProjectExists: true,
createSelfMonitoringProjectPath: '/create', createSelfMonitoringProjectPath: '/create',
deleteSelfMonitoringProjectPath: '/delete', deleteSelfMonitoringProjectPath: '/delete',
selfMonitoringProjectFullPath: 'instance-administrators-random/gitlab-self-monitoring',
}); });
wrapper = shallowMount(SelfMonitor, { store }); wrapper = shallowMount(SelfMonitor, { store });
expect(wrapper.vm.selfMonitoringFormText).toContain('<a href="http://localhost/">'); expect(
wrapper
.find({ ref: 'selfMonitoringFormText' })
.find('a')
.attributes('href'),
).toEqual('http://localhost/instance-administrators-random/gitlab-self-monitoring');
}); });
}); });
}); });
......
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