This commit is contained in:
parent
799c78cdff
commit
43629a3bc3
|
@ -115,6 +115,7 @@ const columns = computed(() => [
|
|||
:option-value="col.optionValue"
|
||||
:option-label="col.optionLabel"
|
||||
:filter-options="['id', 'description']"
|
||||
data-cy="intrastat-code"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
|
|
@ -199,6 +199,7 @@ const formatLabel = (row, prop) => `${row.id}: ${row[prop]}`;
|
|||
:option-value="col.optionValue"
|
||||
:option-label="col.optionLabel"
|
||||
:filter-options="['id', 'vat']"
|
||||
data-cy="vat-sageiva"
|
||||
>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
describe('InvoiceInIntrastat', () => {
|
||||
const firstRow = 'tbody > :nth-child(1)';
|
||||
const thirdRow = 'tbody > :nth-child(3)';
|
||||
const firstRowCode = `${firstRow} > :nth-child(2)`;
|
||||
const codes = `[data-cy="intrastat-code"]`;
|
||||
const firstRowAmount = `${firstRow} > :nth-child(3)`;
|
||||
|
||||
beforeEach(() => {
|
||||
|
@ -11,13 +11,12 @@ describe('InvoiceInIntrastat', () => {
|
|||
});
|
||||
|
||||
it('should edit the first line', () => {
|
||||
cy.selectOption(firstRowCode, 'Plantas vivas: Esqueje/injerto, Vid');
|
||||
cy.selectOption(`${firstRow} ${codes}`, 'Plantas vivas: Esqueje/injerto, Vid');
|
||||
cy.get(firstRowAmount).clear();
|
||||
cy.saveCard();
|
||||
cy.get(`${firstRowCode} span`).should(
|
||||
'have.text',
|
||||
'6021010:Plantas vivas: Esqueje/injerto, Vid'
|
||||
);
|
||||
cy.get(codes)
|
||||
.eq(0)
|
||||
.should('have.value', '6021010: Plantas vivas: Esqueje/injerto, Vid');
|
||||
});
|
||||
|
||||
it('should add a new row', () => {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
describe('InvoiceInVat', () => {
|
||||
const thirdRow = 'tbody > :nth-child(3)';
|
||||
const firstLineVat = 'tbody > :nth-child(1) > :nth-child(4)';
|
||||
const vats = '[data-cy="vat-sageiva"]';
|
||||
const dialogInputs = '.q-dialog label input';
|
||||
const addBtn = 'tbody tr:nth-child(1) td:nth-child(2) .--add-icon';
|
||||
const randomInt = Math.floor(Math.random() * 100);
|
||||
|
@ -14,9 +15,9 @@ describe('InvoiceInVat', () => {
|
|||
});
|
||||
|
||||
it('should edit the sage iva', () => {
|
||||
cy.selectOption(firstLineVat, 'H.P. IVA 21% CEE');
|
||||
cy.selectOption(`${firstLineVat} ${vats}`, 'H.P. IVA 21% CEE');
|
||||
cy.saveCard();
|
||||
cy.get(`${firstLineVat} span`).should('have.text', '8:H.P. IVA 21% CEE');
|
||||
cy.get(vats).eq(0).should('have.value', '8: H.P. IVA 21% CEE');
|
||||
});
|
||||
|
||||
it('should add a new row', () => {
|
||||
|
|
Loading…
Reference in New Issue