feat: refs #8638 add data attributes for transfer buys functionality in EntryBuys.vue and corresponding tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Pablo Natek 2025-03-24 08:22:13 +01:00
parent c5e1ebec82
commit bfa375bacd
2 changed files with 8 additions and 1 deletions

View File

@ -596,6 +596,7 @@ onMounted(() => {
icon="move_group"
color="primary"
:title="t('Transfer buys')"
data-cy="transferBuys"
flat
@click="dialogRef = true"
:disable="!selectedRows.length"
@ -610,7 +611,7 @@ onMounted(() => {
v-model="newEntryRef"
:label="t('Entry')"
type="number"
data-cy="transfer-buy-entry"
data-cy="entryDestinyInput"
/>
</QCardSection>
<QCardSection>
@ -623,6 +624,7 @@ onMounted(() => {
/>
<QBtn
label="Transfer"
data-cy="transferBuysBtn"
flat
color="primary"
@click="transferBuys(selectedRows, newEntryRef)"

View File

@ -80,6 +80,11 @@ describe('EntryBuys', () => {
checkColor('amount', COLORS.positive);
cy.saveCard();
cy.get('tbody > tr [tabindex="0"][role="checkbox"]').click();
cy.dataCy('transferBuys').should('be.enabled').click();
cy.dataCy('entryDestinyInput').should('be.visible').type('100');
cy.dataCy('transferBuysBtn').click();
cy.deleteEntry();
});