forked from verdnatura/salix-front
feat: refs #7220 updates
This commit is contained in:
parent
e18ae76820
commit
d00354553d
|
@ -28,7 +28,7 @@ import ${componentName} from 'src/components/${file}';
|
|||
describe.skip('<${componentName} />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(${componentName});
|
||||
cy.createWrapper(${componentName});
|
||||
});
|
||||
});
|
||||
`;
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateBankEntityForm from 'src/components/CreateBankEntityForm.vue';
|
|||
describe('<CreateBankEntityForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateBankEntityForm);
|
||||
cy.createWrapper(CreateBankEntityForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateManualInvoiceForm from 'src/components/CreateManualInvoiceForm.vue'
|
|||
describe.skip('<CreateManualInvoiceForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateManualInvoiceForm);
|
||||
cy.createWrapper(CreateManualInvoiceForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateNewCityForm from 'src/components/CreateNewCityForm.vue';
|
|||
describe.skip('<CreateNewCityForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateNewCityForm);
|
||||
cy.createWrapper(CreateNewCityForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateNewExpenseForm from 'src/components/CreateNewExpenseForm.vue';
|
|||
describe.skip('<CreateNewExpenseForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateNewExpenseForm);
|
||||
cy.createWrapper(CreateNewExpenseForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateNewPostcodeForm from 'src/components/CreateNewPostcodeForm.vue';
|
|||
describe.skip('<CreateNewPostcodeForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateNewPostcodeForm);
|
||||
cy.createWrapper(CreateNewPostcodeForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateNewProvinceForm from 'src/components/CreateNewProvinceForm.vue';
|
|||
describe.skip('<CreateNewProvinceForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateNewProvinceForm);
|
||||
cy.createWrapper(CreateNewProvinceForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CreateThermographForm from 'src/components/CreateThermographForm.vue';
|
|||
describe.skip('<CreateThermographForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CreateThermographForm);
|
||||
cy.createWrapper(CreateThermographForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CrudModel from 'src/components/CrudModel.vue';
|
|||
describe.skip('<CrudModel />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CrudModel);
|
||||
cy.createWrapper(CrudModel);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import EditPictureForm from 'src/components/EditPictureForm.vue';
|
|||
describe.skip('<EditPictureForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(EditPictureForm);
|
||||
cy.createWrapper(EditPictureForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import EditTableCellValueForm from 'src/components/EditTableCellValueForm.vue';
|
|||
describe.skip('<EditTableCellValueForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(EditTableCellValueForm);
|
||||
cy.createWrapper(EditTableCellValueForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
describe.skip('<FetchData />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FetchData);
|
||||
cy.createWrapper(FetchData);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FilterItemForm from 'src/components/FilterItemForm.vue';
|
|||
describe.skip('<FilterItemForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FilterItemForm);
|
||||
cy.createWrapper(FilterItemForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FilterTravelForm from 'src/components/FilterTravelForm.vue';
|
|||
describe.skip('<FilterTravelForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FilterTravelForm);
|
||||
cy.createWrapper(FilterTravelForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FormModel from 'src/components/FormModel.vue';
|
|||
describe.skip('<FormModel />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FormModel, { props: {} });
|
||||
cy.createWrapper(FormModel, { props: {} });
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FormModelPopup from 'src/components/FormModelPopup.vue';
|
|||
describe.skip('<FormModelPopup />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FormModelPopup);
|
||||
cy.createWrapper(FormModelPopup);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FormPopup from 'src/components/FormPopup.vue';
|
|||
describe.skip('<FormPopup />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FormPopup);
|
||||
cy.createWrapper(FormPopup);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
|||
describe.skip('<ItemsFilterPanel />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(ItemsFilterPanel);
|
||||
cy.createWrapper(ItemsFilterPanel);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import LeftMenu from 'src/components/LeftMenu.vue';
|
|||
describe.skip('<LeftMenu />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(LeftMenu);
|
||||
cy.createWrapper(LeftMenu);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import LeftMenuItem from 'src/components/LeftMenuItem.vue';
|
|||
describe.skip('<LeftMenuItem />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(LeftMenuItem);
|
||||
cy.createWrapper(LeftMenuItem);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import LeftMenuItemGroup from 'src/components/LeftMenuItemGroup.vue';
|
|||
describe.skip('<LeftMenuItemGroup />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(LeftMenuItemGroup);
|
||||
cy.createWrapper(LeftMenuItemGroup);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import NavBar from 'src/components/NavBar.vue';
|
|||
describe.skip('<NavBar />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(NavBar);
|
||||
cy.createWrapper(NavBar);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import PinnedModules from 'src/components/PinnedModules.vue';
|
|||
describe.skip('<PinnedModules />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(PinnedModules);
|
||||
cy.createWrapper(PinnedModules);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import RefundInvoiceForm from 'src/components/RefundInvoiceForm.vue';
|
|||
describe.skip('<RefundInvoiceForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(RefundInvoiceForm);
|
||||
cy.createWrapper(RefundInvoiceForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import RegularizeStockForm from 'src/components/RegularizeStockForm.vue';
|
|||
describe.skip('<RegularizeStockForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(RegularizeStockForm);
|
||||
cy.createWrapper(RegularizeStockForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import TransferInvoiceForm from 'src/components/TransferInvoiceForm.vue';
|
|||
describe.skip('<TransferInvoiceForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(TransferInvoiceForm);
|
||||
cy.createWrapper(TransferInvoiceForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import UserPanel from 'src/components/UserPanel.vue';
|
|||
describe.skip('<UserPanel />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(UserPanel);
|
||||
cy.createWrapper(UserPanel);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
|
||||
describe('<VnTitle />', () => {
|
||||
it('renders text with link', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
text: 'Example Link',
|
||||
},
|
||||
});
|
||||
cy.get('a').should('exist');
|
||||
cy.get('a').should('have.attr', 'href', 'https://example.com');
|
||||
cy.get('a').should('contain.text', 'Example Link');
|
||||
});
|
||||
it('renders text without link', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
text: 'No Link',
|
||||
},
|
||||
});
|
||||
cy.get('a').should('exist');
|
||||
cy.get('a').should('not.have.attr', 'href');
|
||||
cy.get('a').should('contain.text', 'No Link');
|
||||
});
|
||||
|
||||
it('applies correct classes based on url prop', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('a').should('have.class', 'link');
|
||||
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('a').should('have.class', 'color-vn-text');
|
||||
});
|
||||
|
||||
it('displays icon when url is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('.q-icon').should('exist');
|
||||
});
|
||||
|
||||
it('does not display icon when url is not provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('.q-icon').should('not.exist');
|
||||
});
|
||||
|
||||
it('applies correct cursor style based on url prop', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('.header-link').should('have.css', 'cursor', 'pointer');
|
||||
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('.header-link').should('have.css', 'cursor', 'default');
|
||||
});
|
||||
it('renders default icon when no icon prop is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('i').should('contain.text', 'open_in_new');
|
||||
});
|
||||
|
||||
it('renders custom icon when icon prop is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
icon: 'custom_icon',
|
||||
},
|
||||
});
|
||||
cy.get('i').should('contain.text', 'custom_icon');
|
||||
});
|
||||
});
|
|
@ -3,6 +3,6 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
|||
describe.skip('<RightMenu />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(RightMenu);
|
||||
cy.createWrapper(RightMenu);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ import SendEmailDialog from 'src/components/common/SendEmailDialog.vue';
|
|||
describe('<SendEmailDialog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SendEmailDialog, { props: { data: { address: '1234' } } });
|
||||
cy.createWrapper(SendEmailDialog, { props: { data: { address: '1234' } } });
|
||||
cy.get('input').type('1234');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import SendSmsDialog from 'src/components/common/SendSmsDialog.vue';
|
|||
describe.skip('<SendSmsDialog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SendSmsDialog);
|
||||
cy.createWrapper(SendSmsDialog);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue';
|
|||
describe.skip('<TableVisibleColumns />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(TableVisibleColumns);
|
||||
cy.createWrapper(TableVisibleColumns);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnAccountNumber from 'src/components/common/VnAccountNumber.vue';
|
|||
describe.skip('<VnAccountNumber />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnAccountNumber);
|
||||
cy.createWrapper(VnAccountNumber);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnBreadcrumbs from 'src/components/common/VnBreadcrumbs.vue';
|
|||
describe.skip('<VnBreadcrumbs />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnBreadcrumbs);
|
||||
cy.createWrapper(VnBreadcrumbs);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnCard from 'src/components/common/VnCard.vue';
|
|||
describe.skip('<VnCard />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnCard);
|
||||
cy.createWrapper(VnCard);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnComponent from 'src/components/common/VnComponent.vue';
|
|||
describe.skip('<VnComponent />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnComponent);
|
||||
cy.createWrapper(VnComponent);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnDms from 'src/components/common/VnDms.vue';
|
|||
describe.skip('<VnDms />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnDms);
|
||||
cy.createWrapper(VnDms);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnDmsList from 'src/components/common/VnDmsList.vue';
|
|||
describe.skip('<VnDmsList />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnDmsList);
|
||||
cy.createWrapper(VnDmsList);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
describe.skip('<VnInput />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnInput);
|
||||
cy.createWrapper(VnInput);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|||
describe.skip('<VnInputDate />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnInputDate);
|
||||
cy.createWrapper(VnInputDate);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
|||
describe.skip('<VnInputNumber />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnInputNumber);
|
||||
cy.createWrapper(VnInputNumber);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnInputTime from 'src/components/common/VnInputTime.vue';
|
|||
describe.skip('<VnInputTime />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnInputTime);
|
||||
cy.createWrapper(VnInputTime);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnJsonValue from 'src/components/common/VnJsonValue.vue';
|
|||
describe.skip('<VnJsonValue />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnJsonValue);
|
||||
cy.createWrapper(VnJsonValue);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import VnLocation from 'src/components/common/VnLocation.vue';
|
|||
describe.skip('<VnLocation />', () => {
|
||||
it('renders', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLocation, {
|
||||
cy.createWrapper(VnLocation, {
|
||||
props: {
|
||||
modelValue: 1234,
|
||||
location: {
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnLog from 'src/components/common/VnLog.vue';
|
|||
describe.skip('<VnLog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLog);
|
||||
cy.createWrapper(VnLog);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnLogFilter from 'src/components/common/VnLogFilter.vue';
|
|||
describe.skip('<VnLogFilter />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLogFilter);
|
||||
cy.createWrapper(VnLogFilter);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnPopup from 'src/components/common/VnPopup.vue';
|
|||
describe.skip('<VnPopup />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnPopup);
|
||||
cy.createWrapper(VnPopup);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnProgressModal from 'src/components/common/VnProgressModal.vue';
|
|||
describe.skip('<VnProgressModal />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnProgressModal);
|
||||
cy.createWrapper(VnProgressModal);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnRadio from 'src/components/common/VnRadio.vue';
|
|||
describe.skip('<VnRadio />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnRadio);
|
||||
cy.createWrapper(VnRadio);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ import VnSectionMain from 'src/components/common/VnSectionMain.vue';
|
|||
describe.skip('<VnSectionMain />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSectionMain, {
|
||||
cy.createWrapper(VnSectionMain, {
|
||||
props: {
|
||||
leftDrawer: true,
|
||||
},
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
|||
describe.skip('<VnSelect />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSelect);
|
||||
cy.createWrapper(VnSelect);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSelectCache from 'src/components/common/VnSelectCache.vue';
|
|||
describe.skip('<VnSelectCache />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSelectCache);
|
||||
cy.createWrapper(VnSelectCache);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSelectDialog from 'src/components/common/VnSelectDialog.vue';
|
|||
describe.skip('<VnSelectDialog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSelectDialog);
|
||||
cy.createWrapper(VnSelectDialog);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
|||
describe.skip('<VnSelectEnum />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSelectEnum);
|
||||
cy.createWrapper(VnSelectEnum);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSmsDialog from 'src/components/common/VnSmsDialog.vue';
|
|||
describe.skip('<VnSmsDialog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSmsDialog);
|
||||
cy.createWrapper(VnSmsDialog);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSummaryDialog from 'src/components/common/VnSummaryDialog.vue';
|
|||
describe.skip('<VnSummaryDialog />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSummaryDialog);
|
||||
cy.createWrapper(VnSummaryDialog);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@ import VnTitle from 'src/components/common/VnTitle.vue';
|
|||
|
||||
describe('<VnTitle />', () => {
|
||||
it('renders text with link', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
text: 'Example Link',
|
||||
|
@ -13,7 +13,7 @@ describe('<VnTitle />', () => {
|
|||
cy.get('a').should('contain.text', 'Example Link');
|
||||
});
|
||||
it('renders text without link', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
text: 'No Link',
|
||||
},
|
||||
|
@ -24,21 +24,21 @@ describe('<VnTitle />', () => {
|
|||
});
|
||||
|
||||
it('applies correct classes based on url prop', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('a').should('have.class', 'link');
|
||||
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('a').should('have.class', 'color-vn-text');
|
||||
});
|
||||
|
||||
it('displays icon when url is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
|
@ -47,27 +47,27 @@ describe('<VnTitle />', () => {
|
|||
});
|
||||
|
||||
it('does not display icon when url is not provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('.q-icon').should('not.exist');
|
||||
});
|
||||
|
||||
it('applies correct cursor style based on url prop', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
cy.get('.header-link').should('have.css', 'cursor', 'pointer');
|
||||
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {},
|
||||
});
|
||||
cy.get('.header-link').should('have.css', 'cursor', 'default');
|
||||
});
|
||||
it('renders default icon when no icon prop is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ describe('<VnTitle />', () => {
|
|||
});
|
||||
|
||||
it('renders custom icon when icon prop is provided', () => {
|
||||
cy.vnMount(VnTitle, {
|
||||
cy.createWrapper(VnTitle, {
|
||||
props: {
|
||||
url: 'https://example.com',
|
||||
icon: 'custom_icon',
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnWeekdayPicker from 'src/components/common/VnWeekdayPicker.vue';
|
|||
describe.skip('<VnWeekdayPicker />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnWeekdayPicker);
|
||||
cy.createWrapper(VnWeekdayPicker);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import vnDiscount from 'src/components/common/vnDiscount.vue';
|
|||
describe.skip('<vnDiscount />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(vnDiscount);
|
||||
cy.createWrapper(vnDiscount);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CardDescriptor from 'src/components/ui/CardDescriptor.vue';
|
|||
describe.skip('<CardDescriptor />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CardDescriptor);
|
||||
cy.createWrapper(CardDescriptor);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CardList from 'src/components/ui/CardList.vue';
|
|||
describe.skip('<CardList />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CardList);
|
||||
cy.createWrapper(CardList);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CardSummary from 'src/components/ui/CardSummary.vue';
|
|||
describe.skip('<CardSummary />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CardSummary);
|
||||
cy.createWrapper(CardSummary);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import CatalogItem from 'src/components/ui/CatalogItem.vue';
|
|||
describe.skip('<CatalogItem />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(CatalogItem);
|
||||
cy.createWrapper(CatalogItem);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import FetchedTags from 'src/components/ui/FetchedTags.vue';
|
|||
describe.skip('<FetchedTags />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(FetchedTags);
|
||||
cy.createWrapper(FetchedTags);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import QCalendarMonthWrapper from 'src/components/ui/QCalendarMonthWrapper.vue';
|
|||
describe.skip('<QCalendarMonthWrapper />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(QCalendarMonthWrapper);
|
||||
cy.createWrapper(QCalendarMonthWrapper);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import SkeletonDescriptor from 'src/components/ui/SkeletonDescriptor.vue';
|
|||
describe.skip('<SkeletonDescriptor />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SkeletonDescriptor);
|
||||
cy.createWrapper(SkeletonDescriptor);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import SkeletonForm from 'src/components/ui/SkeletonForm.vue';
|
|||
describe.skip('<SkeletonForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SkeletonForm);
|
||||
cy.createWrapper(SkeletonForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import SkeletonSummary from 'src/components/ui/SkeletonSummary.vue';
|
|||
describe.skip('<SkeletonSummary />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SkeletonSummary);
|
||||
cy.createWrapper(SkeletonSummary);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import SkeletonTable from 'src/components/ui/SkeletonTable.vue';
|
|||
describe.skip('<SkeletonTable />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(SkeletonTable);
|
||||
cy.createWrapper(SkeletonTable);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
|||
describe.skip('<VnAvatar />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnAvatar);
|
||||
cy.createWrapper(VnAvatar);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
|||
describe.skip('<VnConfirm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnConfirm);
|
||||
cy.createWrapper(VnConfirm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
|||
describe.skip('<VnFilterPanel />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnFilterPanel);
|
||||
cy.createWrapper(VnFilterPanel);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnFilterPanelChip from 'src/components/ui/VnFilterPanelChip.vue';
|
|||
describe.skip('<VnFilterPanelChip />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnFilterPanelChip);
|
||||
cy.createWrapper(VnFilterPanelChip);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnImg from 'src/components/ui/VnImg.vue';
|
|||
describe.skip('<VnImg />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnImg);
|
||||
cy.createWrapper(VnImg);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
|||
describe.skip('<VnLinkPhone />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLinkPhone);
|
||||
cy.createWrapper(VnLinkPhone);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnLogo from 'src/components/ui/VnLogo.vue';
|
|||
describe.skip('<VnLogo />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLogo);
|
||||
cy.createWrapper(VnLogo);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnLv from 'src/components/ui/VnLv.vue';
|
|||
describe.skip('<VnLv />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnLv);
|
||||
cy.createWrapper(VnLv);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnNotes from 'src/components/ui/VnNotes.vue';
|
|||
describe.skip('<VnNotes />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnNotes);
|
||||
cy.createWrapper(VnNotes);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnOutForm from 'src/components/ui/VnOutForm.vue';
|
|||
describe.skip('<VnOutForm />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnOutForm);
|
||||
cy.createWrapper(VnOutForm);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
|||
describe.skip('<VnPaginate />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnPaginate);
|
||||
cy.createWrapper(VnPaginate);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnRow from 'src/components/ui/VnRow.vue';
|
|||
describe.skip('<VnRow />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnRow);
|
||||
cy.createWrapper(VnRow);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
|||
describe.skip('<VnSearchbar />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSearchbar);
|
||||
cy.createWrapper(VnSearchbar);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSms from 'src/components/ui/VnSms.vue';
|
|||
describe.skip('<VnSms />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSms);
|
||||
cy.createWrapper(VnSms);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
|||
describe.skip('<VnSubToolbar />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnSubToolbar);
|
||||
cy.createWrapper(VnSubToolbar);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,6 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
|||
describe.skip('<VnUserLink />', () => {
|
||||
it('TODO: boilerplate', () => {
|
||||
// see: https://on.cypress.io/mounting-vue
|
||||
cy.vnMount(VnUserLink);
|
||||
cy.createWrapper(VnUserLink);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createTestingPinia } from '@pinia/testing';
|
||||
import { mount } from 'cypress/vue';
|
||||
import { i18n } from 'src/boot/i18n';
|
||||
|
||||
import { Quasar } from 'quasar';
|
||||
const pinia = createTestingPinia({ createSpy: () => {}, stubActions: false });
|
||||
|
||||
// // Run this code before each *test*.
|
||||
|
@ -16,7 +16,7 @@ const pinia = createTestingPinia({ createSpy: () => {}, stubActions: false });
|
|||
function createWrapper(component, options) {
|
||||
const defaultOptions = {
|
||||
global: {
|
||||
plugins: [i18n, pinia],
|
||||
plugins: [Quasar, i18n, pinia],
|
||||
},
|
||||
mocks: {
|
||||
t: (tKey) => tKey,
|
||||
|
@ -48,33 +48,3 @@ function createWrapper(component, options) {
|
|||
// }
|
||||
|
||||
Cypress.Commands.add('createWrapper', createWrapper);
|
||||
// Cypress.Commands.add('mount', mount);
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import { Quasar } from 'quasar';
|
||||
|
||||
Cypress.Commands.add('vnMount', (component, options = {}) => {
|
||||
const globalConfig = {
|
||||
global: {
|
||||
stubs: ['router-view', 'vue-i18n'],
|
||||
plugins: [Quasar, i18n, pinia],
|
||||
mocks: { t: (key) => key },
|
||||
},
|
||||
};
|
||||
// options.global = options.global || {};
|
||||
// options.global.stubs = options.global.stubs || {};
|
||||
// options.global.stubs.transition = false;
|
||||
// options.global.components = options.global.components || {};
|
||||
// options.global.plugins = options.global.plugins || [];
|
||||
|
||||
// Use store passed in from options, or initialize a new one
|
||||
// const { /* store = getStore(), */ ...mountOptions } = options;
|
||||
|
||||
// Add plugins here
|
||||
// options.global.plugins.push({
|
||||
// install(app) {
|
||||
// app.use(i18n);
|
||||
// },
|
||||
// });
|
||||
console.log({ ...globalConfig, ...options });
|
||||
return shallowMount(component, { ...globalConfig, ...options });
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue