Commit ade2a5a6 authored by Nathan Friend's avatar Nathan Friend

Add id to release block

This commit adds an id attribute to release blocks to allow them to be
targeted as anchor links.
parent 148c5ccb
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="card"> <div :id="release.tag_name" class="card">
<div class="card-body"> <div class="card-body">
<h2 class="card-title mt-0"> <h2 class="card-title mt-0">
{{ release.name }} {{ release.name }}
......
...@@ -88,6 +88,10 @@ describe('Release block', () => { ...@@ -88,6 +88,10 @@ describe('Release block', () => {
vm.$destroy(); 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', () => { it('renders release name', () => {
expect(vm.$el.textContent).toContain(release.name); expect(vm.$el.textContent).toContain(release.name);
}); });
......
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