feat: refs #8638 add data attributes for transfer buys functionality in EntryBuys.vue and corresponding tests
This commit is contained in:
parent
c5e1ebec82
commit
bfa375bacd
|
@ -596,6 +596,7 @@ onMounted(() => {
|
||||||
icon="move_group"
|
icon="move_group"
|
||||||
color="primary"
|
color="primary"
|
||||||
:title="t('Transfer buys')"
|
:title="t('Transfer buys')"
|
||||||
|
data-cy="transferBuys"
|
||||||
flat
|
flat
|
||||||
@click="dialogRef = true"
|
@click="dialogRef = true"
|
||||||
:disable="!selectedRows.length"
|
:disable="!selectedRows.length"
|
||||||
|
@ -610,7 +611,7 @@ onMounted(() => {
|
||||||
v-model="newEntryRef"
|
v-model="newEntryRef"
|
||||||
:label="t('Entry')"
|
:label="t('Entry')"
|
||||||
type="number"
|
type="number"
|
||||||
data-cy="transfer-buy-entry"
|
data-cy="entryDestinyInput"
|
||||||
/>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
|
@ -623,6 +624,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
label="Transfer"
|
label="Transfer"
|
||||||
|
data-cy="transferBuysBtn"
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="transferBuys(selectedRows, newEntryRef)"
|
@click="transferBuys(selectedRows, newEntryRef)"
|
||||||
|
|
|
@ -80,6 +80,11 @@ describe('EntryBuys', () => {
|
||||||
checkColor('amount', COLORS.positive);
|
checkColor('amount', COLORS.positive);
|
||||||
cy.saveCard();
|
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();
|
cy.deleteEntry();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue