BigW Consortium Gitlab

Use anchor instead of form for reset caches button

parent 21a713f9
......@@ -50,9 +50,13 @@ export default {
Get started with Pipelines
</a>
<form :action="resetCachePath" method="post">
<input type="submit" class="btn btn-default" value="Clear runner caches" />
</form>
<a
data-method="post"
rel="nofollow"
:href="resetCachePath"
class="btn btn-default">
Clear runner caches
</a>
<a
:href="ciLintPath"
......
......@@ -58,7 +58,7 @@ describe('Pipelines Nav Controls', () => {
}).$mount();
expect(component.$el.querySelectorAll('.btn-default')[0].textContent).toContain('Clear runner caches');
expect(component.$el.querySelector('form').getAttribute('action')).toEqual(mockData.resetCachePath);
expect(component.$el.querySelectorAll('.btn-default')[0].getAttribute('href')).toEqual(mockData.resetCachePath);
});
it('should render link for CI lint', () => {
......
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