diff --git a/@kiva/kv-components/tests/unit/specs/components/KvCommentsContainer.spec.js b/@kiva/kv-components/tests/unit/specs/components/KvCommentsContainer.spec.js new file mode 100644 index 00000000..07aa4617 --- /dev/null +++ b/@kiva/kv-components/tests/unit/specs/components/KvCommentsContainer.spec.js @@ -0,0 +1,18 @@ +import { render } from '@testing-library/vue'; +import Container from '../../../../vue/KvCommentsContainer.vue'; + +const renderContainer = (props = {}) => { + return render(Container, { props }); +}; + +describe('KvCommentsContainer', () => { + it('should render without activity ID', async () => { + const component = renderContainer(); + component.getByText('Activity ID missing'); + }); + + it('should render with activity ID', async () => { + const component = renderContainer({ activityId: 'asd' }); + component.getByText('Comment functionality coming soon!'); + }); +}); diff --git a/@kiva/kv-components/vue/KvCommentsContainer.vue b/@kiva/kv-components/vue/KvCommentsContainer.vue new file mode 100644 index 00000000..0749f510 --- /dev/null +++ b/@kiva/kv-components/vue/KvCommentsContainer.vue @@ -0,0 +1,28 @@ + + + diff --git a/@kiva/kv-components/vue/stories/KvCommentsContainer.stories.js b/@kiva/kv-components/vue/stories/KvCommentsContainer.stories.js new file mode 100644 index 00000000..9616969d --- /dev/null +++ b/@kiva/kv-components/vue/stories/KvCommentsContainer.stories.js @@ -0,0 +1,23 @@ +import KvCommentsContainer from '../KvCommentsContainer.vue'; + +export default { + title: 'KvCommentsContainer', + component: KvCommentsContainer, +}; + +const story = (args) => { + const template = (templateArgs, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { KvCommentsContainer }, + setup() { return { args: templateArgs }; }, + template: ` + + `, + }); + template.args = args; + return template; +}; + +export const Default = story({}); + +export const Activity = story({ activityId: 'asd' });