forked from verdnatura/salix-front
test: e2e fixed
This commit is contained in:
parent
ebbe6ef3b1
commit
6bba14cac9
|
@ -81,7 +81,7 @@ async function fetchViewConfigData() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.err('Error fetching config view data', err);
|
console.error('Error fetching config view data', err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ const fetchViewConfigData = async () => {
|
||||||
setUserConfigViewData(defaultColumns);
|
setUserConfigViewData(defaultColumns);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.err('Error fetching config view data', err);
|
console.error('Error fetching config view data', err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ const printBuys = (rowId) => {
|
||||||
data-key="myEntriesList"
|
data-key="myEntriesList"
|
||||||
url="Entries/filter"
|
url="Entries/filter"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
default-mode="table"
|
default-mode="card"
|
||||||
order="shipped DESC"
|
order="shipped DESC"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -207,8 +207,14 @@ async function cloneInvoice() {
|
||||||
|
|
||||||
const isAdministrative = () => hasAny(['administrative']);
|
const isAdministrative = () => hasAny(['administrative']);
|
||||||
|
|
||||||
const isAgricultural = () =>
|
const isAgricultural = () => {
|
||||||
invoiceIn.value?.supplier?.sageWithholdingFk === config.value[0]?.sageWithholdingFk;
|
console.error(config);
|
||||||
|
if (!config.value) return false;
|
||||||
|
return (
|
||||||
|
invoiceIn.value?.supplier?.sageFarmerWithholdingFk ===
|
||||||
|
config?.value[0]?.sageWithholdingFk
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
function showPdfInvoice() {
|
function showPdfInvoice() {
|
||||||
if (isAgricultural()) openReport(`InvoiceIns/${entityId.value}/invoice-in-pdf`);
|
if (isAgricultural()) openReport(`InvoiceIns/${entityId.value}/invoice-in-pdf`);
|
||||||
|
|
|
@ -38,7 +38,7 @@ const cloneTravelWithEntries = async () => {
|
||||||
notify('globals.dataSaved', 'positive');
|
notify('globals.dataSaved', 'positive');
|
||||||
router.push({ name: 'TravelBasicData', params: { id: data.id } });
|
router.push({ name: 'TravelBasicData', params: { id: data.id } });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.err('Error cloning travel with entries');
|
console.error('Error cloning travel with entries');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ describe('EntryMy when is supplier', () => {
|
||||||
cy.stub(win, 'open');
|
cy.stub(win, 'open');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
cy.waitForElement('.q-page', 6000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open buyLabel when is supplier', () => {
|
it('should open buyLabel when is supplier', () => {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
describe('InvoiceInCorrective', () => {
|
describe('InvoiceInCorrective', () => {
|
||||||
const createRectificative = '.q-menu > .q-list > :nth-child(4) > .q-item__section';
|
const createRectificative = '.q-menu > .q-list > :nth-child(6) > .q-item__section';
|
||||||
const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)';
|
const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)';
|
||||||
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,6 @@ describe('Route', () => {
|
||||||
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
|
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
|
||||||
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
|
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
|
||||||
cy.get('button[title="Save"]').click();
|
cy.get('button[title="Save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue