feat(global): initialize project and framework structure, dockerize

This commit is contained in:
h
2025-09-02 00:03:50 +03:00
parent 3194237f5f
commit 2e9bfc888f
26 changed files with 422 additions and 113 deletions

View File

@@ -0,0 +1,22 @@
import { mount } from '@vue/test-utils';
import { nextTick } from 'vue';
import PrimeVue from 'primevue/config';
import Button from 'primevue/button';
import Dialog from 'primevue/dialog';
import PrimeButtonDemo from './PrimeButtonDemo.vue';
import { it, expect } from 'vitest';
it('opens dialog on click', async () => {
const wrapper = mount(PrimeButtonDemo, {
attachTo: document.body,
global: {
plugins: [PrimeVue],
components: { Button, Dialog },
},
});
await wrapper.find('button').trigger('click');
await nextTick();
expect(document.body.innerHTML).toContain('PrimeVue is working');
});

View File

@@ -0,0 +1,15 @@
<script setup lang="ts">
import { ref } from 'vue';
const _open = ref(false);
</script>
<template>
<div class="space-y-2">
<Button type="button" label="Open Dialog" @click="_open = true" @keyup.enter="_open = true" />
<Dialog v-model:visible="_open" modal header="Hello" :draggable="false">
<p>PrimeVue is working.</p>
</Dialog>
</div>
</template>