Add id to release block
This commit adds an id attribute to release blocks to allow them to be targeted as anchor links.
This commit is contained in:
parent
148c5ccbb4
commit
ade2a5a644
2 changed files with 5 additions and 1 deletions
|
@ -53,7 +53,7 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="card">
|
||||
<div :id="release.tag_name" class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title mt-0">
|
||||
{{ release.name }}
|
||||
|
|
|
@ -88,6 +88,10 @@ describe('Release block', () => {
|
|||
vm.$destroy();
|
||||
});
|
||||
|
||||
it("renders the block with an id equal to the release's tag name", () => {
|
||||
expect(vm.$el.id).toBe('18.04');
|
||||
});
|
||||
|
||||
it('renders release name', () => {
|
||||
expect(vm.$el.textContent).toContain(release.name);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue