test: #8282 itemFixedPrice
This commit is contained in:
parent
1e88f83f7d
commit
7f4c807fcf
|
@ -429,6 +429,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
<QTable
|
<QTable
|
||||||
|
data-cy="vnTable"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
v-bind="table"
|
v-bind="table"
|
||||||
class="vnTable"
|
class="vnTable"
|
||||||
|
|
|
@ -48,7 +48,15 @@ describe('Handle Items FixedPrice', () => {
|
||||||
cy.get('#subToolbar > .q-btn--standard').click();
|
cy.get('#subToolbar > .q-btn--standard').click();
|
||||||
cy.selectOption("[data-cy='field-to-edit']", 'Min price');
|
cy.selectOption("[data-cy='field-to-edit']", 'Min price');
|
||||||
cy.dataCy('value-to-edit').find('input').type('1');
|
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-mt-lg > .q-btn--standard').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue