-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B2CQA-2136 : Switching From and To currencies and perform a swap test #8715
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 4 Skipped Deployments
|
There as been no activity on this PR for the last 14 days. Please consider closing this PR. |
@@ -436,6 +501,28 @@ async function performSwapUntilQuoteSelectionStep( | |||
await app.swap.fillInOriginCurrencyAmount(electronApp, swap.amount); | |||
} | |||
|
|||
async function switchFromToCurrencySwap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function should be about switching currencies in a swap but it does ton of other stuff (looks like a duplicate of performSwapUntilQuoteSelectionStep
but with reverseSwapPair()
as additional step)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, this method is used only once, so I don't see a utility of having separate method for this code
await app.swapDrawer.selectAccountByName(swap.accountToDebit); | ||
await app.swap.selectAssetTo(electronApp, swap.accountToCredit.currency.name); | ||
await app.swapDrawer.selectAccountByName(swap.accountToCredit); | ||
await app.swap.reverseSwapPair(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function doesn't seem to verify that currencies have been inverted
}, | ||
]; | ||
|
||
for (const { swap, xrayTicket } of switchFromToSwaps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need "for" loop here since you have only one element in switchFromToSwaps
@@ -436,6 +501,28 @@ async function performSwapUntilQuoteSelectionStep( | |||
await app.swap.fillInOriginCurrencyAmount(electronApp, swap.amount); | |||
} | |||
|
|||
async function switchFromToCurrencySwap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, this method is used only once, so I don't see a utility of having separate method for this code
await addTmsLink(getDescription(test.info().annotations, "TMS").split(", ")); | ||
await switchFromToCurrencySwap(app, electronApp, swap); | ||
await app.swap.selectQuote(electronApp, swap.provider.name, swap.rate); | ||
await performSwapUntilDeviceVerificationStep(app, electronApp, swap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand this test suppose to check that user is able to inverse "from" and "to" therefore I don't see the reason of doing full e2e swap scenario here
β Checklist
npx changeset
was attached.π Description
Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing.
For libraries, you can add a code sample of how to use it.
For bug fixes, you can explain the previous behaviour and how it was fixed.
In case of visual features, please attach screenshots or video recordings to demonstrate the changes.
β Context
π§ Checklist for the PR Reviewers