Use anchor instead of form for reset caches button
This commit is contained in:
parent
21a713f9c4
commit
ff5124ed6e
|
@ -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', () => {
|
||||
|
|
Loading…
Reference in New Issue