test: #8282 itemFixedPrice

This commit is contained in:
Javier Segarra 2024-12-09 23:41:48 +01:00
parent 1e88f83f7d
commit 7f4c807fcf
2 changed files with 10 additions and 1 deletions

View File

@ -429,6 +429,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
</template>
<template #body="{ rows }">
<QTable
data-cy="vnTable"
ref="tableRef"
v-bind="table"
class="vnTable"

View File

@ -48,7 +48,15 @@ describe('Handle Items FixedPrice', () => {
cy.get('#subToolbar > .q-btn--standard').click();
cy.selectOption("[data-cy='field-to-edit']", 'Min price');
cy.dataCy('value-to-edit').find('input').type('1');
cy.get('.countLines').should('have.text', ' 1 ');
cy.get('.q-table__bottom > .q-table__control > div').then((row) => {
// Asegúrate de que rows sea un objeto iterable
const numRows = row.text().match(/(\d+)/);
const numSelectedRows = numRows ? parseInt(numRows[1], 10) : 0;
cy.log(`Número de filas: ${numSelectedRows}`);
// expect(numRows).to.be.greaterThan(0); // Ejemplo de aserción
cy.get('.countLines').should('have.text', ` ${numSelectedRows} `);
});
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get('.q-notification__message').should('have.text', 'Data saved');
});