diff --git a/webapp/components/Category/Readme.md b/webapp/components/Category/Readme.md new file mode 100644 index 000000000..50e07f966 --- /dev/null +++ b/webapp/components/Category/Readme.md @@ -0,0 +1,7 @@ +### Example + +Category "IT, Internet & Data Privacy" with icon "mouse-cursor" + +``` + +``` \ No newline at end of file diff --git a/webapp/components/Category/index.spec.js b/webapp/components/Category/index.spec.js new file mode 100644 index 000000000..149f96189 --- /dev/null +++ b/webapp/components/Category/index.spec.js @@ -0,0 +1,35 @@ +import { shallowMount, createLocalVue } from '@vue/test-utils' +import Styleguide from '@human-connection/styleguide' +import Category from './index' + +const localVue = createLocalVue() +localVue.use(Styleguide) + +describe('Category', () => { + let icon + let name + + let Wrapper = () => { + return shallowMount(Category, { + localVue, + propsData: { + icon, + name + } + }) + } + + describe('given Strings for Icon and Name', () => { + beforeEach(() => { + icon = 'mouse-cursor' + name = 'Peter' + }) + + it('shows Name', () => { + expect(Wrapper().text()).toContain('Peter') + }) + it('shows Icon Svg', () => { + expect(Wrapper().contains('svg')) + }) + }) +}) diff --git a/webapp/components/Category.vue b/webapp/components/Category/index.vue similarity index 100% rename from webapp/components/Category.vue rename to webapp/components/Category/index.vue diff --git a/webapp/components/Comment.vue b/webapp/components/Comment.vue index 71043e90d..13edc9c0d 100644 --- a/webapp/components/Comment.vue +++ b/webapp/components/Comment.vue @@ -4,16 +4,15 @@ style="padding-left: 40px; font-weight: bold;" color="soft" > - {{ this.$t('comment.content.unavailable-placeholder') }} + + {{ this.$t('comment.content.unavailable-placeholder') }}
- + @@ -32,13 +31,13 @@ style="padding-left: 40px;" v-html="comment.contentExcerpt" /> - +