diff --git a/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js b/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
index a297a60f43..f6dac4c733 100644
--- a/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
@@ -1,8 +1,9 @@
///
describe('InvoiceInIntrastat', () => {
- const inputBtns = 'label button';
+ const firstRow = 'tbody > :nth-child(1)';
const thirdRow = 'tbody > :nth-child(3)';
- const firstLineCode = 'tbody > :nth-child(1) > :nth-child(2)';
+ const firstRowCode = `${firstRow} > :nth-child(2)`;
+ const firstRowAmount = `${firstRow} > :nth-child(3)`;
beforeEach(() => {
cy.login('developer');
@@ -10,10 +11,10 @@ describe('InvoiceInIntrastat', () => {
});
it('should edit the first line', () => {
- cy.selectOption(firstLineCode, 'Plantas vivas: Esqueje/injerto, Vid');
- cy.get(inputBtns).eq(1).click();
+ cy.selectOption(firstRowCode, 'Plantas vivas: Esqueje/injerto, Vid');
+ cy.get(firstRowAmount).clear();
cy.saveCard();
- cy.get(`${firstLineCode} span`).should(
+ cy.get(`${firstRowCode} span`).should(
'have.text',
'6021010:Plantas vivas: Esqueje/injerto, Vid'
);
diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
index b2fa10d52e..fa0d1c5e46 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -1,23 +1,23 @@
///
describe('InvoiceInList', () => {
- const firstCard = '.q-card:nth-child(1)';
- const firstChipId =
- ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
- const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
+ const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
+ const firstId = `${firstRow} > td:nth-child(1) span`;
+ const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
const summaryHeaders = '.summaryBody .header-link';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/invoice-in/list`);
+ cy.get('#searchbar input').type('{enter}');
});
it('should redirect on clicking a invoice', () => {
- cy.get(firstChipId)
+ cy.get(firstId)
.invoke('text')
.then((content) => {
const id = content.replace(/\D/g, '');
- cy.get(firstCard).click();
+ cy.get(firstRow).click();
cy.url().should('include', `/invoice-in/${id}/summary`);
});
});
diff --git a/test/cypress/integration/invoiceIn/invoiceInVat.spec.js b/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
index 932aca96dd..018ae7a531 100644
--- a/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
@@ -4,8 +4,7 @@ describe('InvoiceInVat', () => {
const firstLineVat = 'tbody > :nth-child(1) > :nth-child(4)';
const dialogInputs = '.q-dialog label input';
const dialogBtns = '.q-dialog button';
- const acrossInput =
- ':nth-child(1) > .q-td.q-table--col-auto-width > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .default-icon';
+ const acrossInput = 'tbody tr:nth-child(1) td:nth-child(2) .default-icon';
const randomInt = Math.floor(Math.random() * 100);
beforeEach(() => {