mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +00:00
move transaction data from step definition to scenario line
This commit is contained in:
parent
e763ac3d7a
commit
6ec3701cf6
@ -16,7 +16,8 @@ Feature: Send coins
|
||||
And the user submits the send form
|
||||
Then the transaction details are presented for confirmation "<receiverEmail>" "<amount>" "<memoText>" "<senderBalance>" "<newSenderBalance>"
|
||||
When the user submits the transaction by confirming
|
||||
And the user navigates to page "/transactions"
|
||||
Then the "<receiverName>" and "<amount>" are displayed on the "send" page
|
||||
When the user navigates to page "/transactions"
|
||||
Then the "<receiverName>" and "<amount>" are displayed on the "transactions" page
|
||||
|
||||
Examples:
|
||||
|
||||
@ -27,7 +27,7 @@ Then('the transaction details are presented for confirmation {string} {string} {
|
||||
cy.get('.transaction-confirm-send').contains(`+ ${newSenderBalance} GDD`)
|
||||
})
|
||||
|
||||
When('the user submits the transaction by confirming', () => {
|
||||
When('the user submits the transaction by confirming', (receiverName: string, amount) => {
|
||||
cy.intercept({
|
||||
method: 'POST',
|
||||
url: '/graphql',
|
||||
@ -48,9 +48,6 @@ When('the user submits the transaction by confirming', () => {
|
||||
.and('equal', true)
|
||||
})
|
||||
cy.get('[data-test="send-transaction-success-text"]').should('be.visible')
|
||||
cy.get('.rightside-last-transactions').should('be.visible')
|
||||
cy.get('.align-items-center').contains('Räuber Hotzenplotz')
|
||||
cy.get('.align-items-center').contains('− 120.50 GDD')
|
||||
})
|
||||
|
||||
Then('the {string} and {string} are displayed on the {string} page', (name: string, amount: string, page: string) => {
|
||||
@ -59,6 +56,10 @@ Then('the {string} and {string} are displayed on the {string} page', (name: stri
|
||||
cy.get('.align-items-center').contains(`${name}`)
|
||||
cy.get('.align-items-center').contains(`${amount} GDD`)
|
||||
break
|
||||
case 'send':
|
||||
cy.get('.align-items-center').contains(`${name}`)
|
||||
cy.get('.align-items-center').contains(`${amount} GDD`)
|
||||
break
|
||||
case 'transactions':
|
||||
cy.get('div.mt-3 > div > div.test-list-group-item').eq(0).contains('div.gdd-transaction-list-item-name', `${name}`)
|
||||
cy.get('div.mt-3 > div > div.test-list-group-item').eq(0).contains('[data-test="transaction-amount"]', `${amount} GDD`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user