WIP: #7220 - Component Unit Cypress Test #296
|
@ -22,6 +22,7 @@ module.exports = defineConfig({
|
||||||
},
|
},
|
||||||
|
|
||||||
component: {
|
component: {
|
||||||
|
specPattern: 'test/cypress/components/*.spec.js',
|
||||||
devServer: {
|
devServer: {
|
||||||
framework: 'vue',
|
framework: 'vue',
|
||||||
bundler: 'vite',
|
bundler: 'vite',
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { useI18n } from 'vue-i18n';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'src/components/FetchData.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import FormModelPopup from './FormModelPopup.vue';
|
import FormModelPopup from './FormModelPopup.vue';
|
||||||
|
|
||||||
defineProps({ showEntityField: { type: Boolean, default: true } });
|
defineProps({ showEntityField: { type: Boolean, default: true } });
|
||||||
|
|
|
@ -5,10 +5,10 @@ import { onBeforeRouteLeave } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'src/stores/useStateStore';
|
||||||
import { useValidator } from 'src/composables/useValidator';
|
import { useValidator } from 'src/composables/useValidator';
|
||||||
import useNotify from 'src/composables/useNotify.js';
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
import SkeletonForm from 'components/ui/SkeletonForm.vue';
|
import SkeletonForm from 'src/components/ui/SkeletonForm.vue';
|
||||||
import VnConfirm from './ui/VnConfirm.vue';
|
import VnConfirm from './ui/VnConfirm.vue';
|
||||||
import { tMobile } from 'src/composables/tMobile';
|
import { tMobile } from 'src/composables/tMobile';
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'src/components/FormModel.vue';
|
||||||
|
|
||||||
const emit = defineEmits(['onDataSaved']);
|
const emit = defineEmits(['onDataSaved']);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
||||||
|
|
||||||
|
describe('<CreateBankEntityForm />', () => {
|
||||||
|
it('renders', () => {
|
||||||
|
// see: https://on.cypress.io/mounting-vue
|
||||||
|
cy.mount(CreateBankEntityForm);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,8 @@
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
|
describe('<VnSelect />', () => {
|
||||||
|
it('renders', () => {
|
||||||
|
// see: https://on.cypress.io/mounting-vue
|
||||||
|
cy.mount(VnSelect);
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,14 +1,13 @@
|
||||||
import VnTitle from '@/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
|
|
||||||
describe('<VnTitle />', () => {
|
describe('<VnTitle />', () => {
|
||||||
it('renders', () => {
|
it('renders', () => {
|
||||||
// see: https://on.cypress.io/mounting-vue
|
// see: https://on.cypress.io/mounting-vue
|
||||||
cy.mount(VnTitle,{
|
cy.mount(VnTitle, {
|
||||||
props:{
|
props: {
|
||||||
url:'url',
|
url: 'url',
|
||||||
title: 'title',
|
title: 'title',
|
||||||
|
},
|
||||||
}
|
|
||||||
});
|
});
|
||||||
console.log(VnTitle);
|
console.log(VnTitle);
|
||||||
});
|
});
|
|
@ -8,7 +8,7 @@ export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
src: fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue