From 2368012c8f4de32cfd9efaff341fe1d1a45e4606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 10 Mar 2022 13:08:39 +0300 Subject: [PATCH] Card test added --- src/components/card/Card.spec.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/components/card/Card.spec.js diff --git a/src/components/card/Card.spec.js b/src/components/card/Card.spec.js new file mode 100644 index 000000000..65870dace --- /dev/null +++ b/src/components/card/Card.spec.js @@ -0,0 +1,23 @@ +import { mount } from '@vue/test-utils'; +import Card from './Card.vue'; + +describe('Card.vue', () => { + it('should exist', () => { + const wrapper = mount(Card, { + slots: { + header: 'Advanced Card Header', + title: 'Advanced Card', + subtitle: 'Advanced subtitle', + content: '

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

', + footer: 'Advanced Card Footer' + } + }); + + expect(wrapper.find('.p-card.p-component').exists()).toBe(true); + expect(wrapper.find('.p-card-header').text()).toBe('Advanced Card Header'); + expect(wrapper.find('.p-card-title').text()).toBe('Advanced Card'); + expect(wrapper.find('.p-card-subtitle').text()).toBe('Advanced subtitle'); + expect(wrapper.find('.p-card-content').text()).toBe('Lorem ipsum dolor sit amet, consectetur adipisicing elit.'); + expect(wrapper.find('.p-card-footer').text()).toBe('Advanced Card Footer'); + }); +}); \ No newline at end of file