refactor: refs #8219 modified e2e tests and fixed some translations
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-12-04 08:37:17 +01:00
parent 45d1cc6a5d
commit 670c089125
7 changed files with 23 additions and 21 deletions

View File

@ -83,7 +83,11 @@ const { openConfirmationModal } = useVnConfirm();
</template>
<template #body="{ entity }">
<VnLv :label="t('department.chat')" :value="entity.chatName" />
<VnLv :label="t('department.email')" :value="entity.notificationEmail" copy />
<VnLv
:label="t('globals.params.email')"
:value="entity.notificationEmail"
copy
/>
<VnLv
:label="t('department.selfConsumptionCustomer')"
:value="entity.client?.name"

View File

@ -58,7 +58,7 @@ onMounted(async () => {
dash
/>
<VnLv
:label="t('department.email')"
:label="t('globals.params.email')"
:value="department.notificationEmail"
dash
/>

View File

@ -676,6 +676,7 @@ function setReference(data) {
color="primary"
fab
icon="vn:invoice-in"
data-cy="ticketListMakeInvoiceBtn"
/>
<QTooltip>
{{ t('ticketList.createInvoice') }}

View File

@ -24,21 +24,24 @@ describe('InvoiceOut list', () => {
cy.dataCy('vnSearchBar').find('input').type('{enter}');
cy.dataCy('InvoiceOutFilterAmountBtn').find('input').type('8.88{enter}');
});
it('should download a pdf', () => {
cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
});
it('should give an error when manual invoicing a ticket that is already invoiced', () => {
cy.get('[data-cy="vnTableCreateBtn"]').click();
cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(invoiceError);
cy.get('[data-cy="FormModelPopup_save"]').click();
cy.dataCy('FormModelPopup_save').click();
cy.get(notification).should('contains.text', 'This ticket is already invoiced');
});
it('should create a manual invoice and enter to its summary', () => {
cy.get('[data-cy="vnTableCreateBtn"]').click();
cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(invoice);
cy.get('[data-cy="FormModelPopup_save"]').click();
cy.dataCy('FormModelPopup_save').click();
cy.get(notification).should('contains.text', 'Data created');
});
});

View File

@ -10,15 +10,11 @@ describe('InvoiceOut manual invoice', () => {
});
it('should create an invoice from a ticket and go to that invoice', () => {
cy.get(
'[label="Customer ID"] > .q-field > .q-field__inner > .q-field__control'
).type('1101{enter}');
cy.get('[label="Customer ID"]').type('1101{enter}');
cy.get(
'[data-q-vs-anchor=""] > :nth-child(1) > .q-checkbox > .q-checkbox__inner'
).click();
cy.get(
'[style="transform: translate(-256px, 0px); margin: 80px 20px; z-index: 2;"] > div > .q-btn'
).click();
cy.dataCy('ticketListMakeInvoiceBtn').click();
cy.get(notification).should('contains.text', 'Data saved');
cy.get('.q-virtual-scroll__content > :nth-child(1) > :nth-child(3)').click();
cy.get(':nth-child(8) > .value > .link').click();

View File

@ -17,7 +17,7 @@ describe('InvoiceOut summary', () => {
cy.get('#searchbar input').type('T1111111{enter}');
cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click();
cy.get('.q-menu > .q-list > :nth-child(6)').click();
cy.get('[data-cy="VnConfirm_confirm"]').click();
cy.dartaCy('VnConfirm_confirm').click();
cy.get(notification).should(
'contains.text',
'The invoice PDF document has been regenerated'
@ -39,7 +39,7 @@ describe('InvoiceOut summary', () => {
cy.get('#searchbar input').type('T2222222{enter}');
cy.get('[data-cy="descriptor-more-opts"] > .q-btn__content > .q-icon').click();
cy.get('.q-menu > .q-list > :nth-child(4)').click();
cy.get('[data-cy="VnConfirm_confirm"]').click();
cy.dartaCy('VnConfirm_confirm').click();
cy.get(notification).should('contains.text', 'InvoiceOut deleted');
});

View File

@ -8,13 +8,13 @@ describe('InvoiceOut global invoicing', () => {
it('should invoice the client tickets', () => {
cy.get('.q-mb-sm > .q-radio__inner').click();
cy.get('[data-cy="InvoiceOutGlobalClientSelect"]').type('1101');
cy.dataCy('InvoiceOutGlobalClientSelect').type('1101');
cy.get('.q-menu .q-item').contains('1101').click();
cy.get('[data-cy="InvoiceOutGlobalSerialSelect"]').click();
cy.dataCy('InvoiceOutGlobalSerialSelect').click();
cy.get('.q-menu .q-item').contains('global').click();
cy.get('[data-cy="InvoiceOutGlobalCompanySelect"]').type('VNL');
cy.dataCy('InvoiceOutGlobalCompanySelect').type('VNL');
cy.get('.q-menu .q-item').contains('VNL').click();
cy.get('[data-cy="InvoiceOutGlobalPrinterSelect"]').type('printer1');
cy.dataCy('InvoiceOutGlobalPrinterSelect').type('printer1');
cy.get('.q-menu .q-item').contains('printer1').click();
cy.get(
'[label="Invoice date"] > .q-field > .q-field__inner > .q-field__control'
@ -22,9 +22,7 @@ describe('InvoiceOut global invoicing', () => {
cy.get(':nth-child(5) > div > .q-btn > .q-btn__content > .block').click();
cy.get('.q-date__years-content > :nth-child(2) > .q-btn').click();
cy.get('.q-date__calendar-days > :nth-child(6) > .q-btn').click();
cy.get(
'[label="Max date ticket"] > .q-field > .q-field__inner > .q-field__control'
).type('01-01-2001{enter}');
cy.get('[label="Max date ticket"]').type('01-01-2001{enter}');
cy.get('.q-card').should('be.visible');
});
});