Use anchor instead of form for reset caches button

This commit is contained in:
Matija Čupić 2018-01-06 04:11:41 +01:00
parent 21a713f9c4
commit ff5124ed6e
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
2 changed files with 8 additions and 4 deletions

View File

@ -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"

View File

@ -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', () => {