From bfa375bacd0a8c5efff6831e555d9a58dcfe7270 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 24 Mar 2025 08:22:13 +0100 Subject: [PATCH] feat: refs #8638 add data attributes for transfer buys functionality in EntryBuys.vue and corresponding tests --- src/pages/Entry/Card/EntryBuys.vue | 4 +++- test/cypress/integration/entry/entryCard/entryBuys.spec.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue index 85da5cf1d..67f97e09d 100644 --- a/src/pages/Entry/Card/EntryBuys.vue +++ b/src/pages/Entry/Card/EntryBuys.vue @@ -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" /> @@ -623,6 +624,7 @@ onMounted(() => { /> { 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(); });