-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First trading sell test for BTC (#16889)
* feat(e2e): Introduce a draft of trading sell test + rafactoring refactors shared methods between sell and buy adds more verifications of request payloads simplifies the creation of Trade response * feat(e2e): Extends sell flow till the send new passphrase wallet for trading tests few new locators new .env file for tests removes traces from CI * fix(e2e): PR improvements and fixes * fix(e2e): Minor fixes and improvements on PR
- Loading branch information
Showing
31 changed files
with
520 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# Secret wallet passphrase dedicated for automated Trading tests | ||
PASSPHRASE= |
File renamed without changes.
26 changes: 26 additions & 0 deletions
26
packages/suite-desktop-core/e2e/fixtures/invity/buy/requests/trade-request-solana.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"trade": { | ||
"exchange": "banxa", | ||
"fiatCurrency": "CZK", | ||
"receiveCurrency": "solana", | ||
"rate": 6106.42, | ||
"wantCrypto": true, | ||
"exp": "cRPhcsJWUUq9brG+zMXmog==", | ||
"country": "CZ", | ||
"paymentMethodName": "Credit Card", | ||
"tags": ["wantCrypto"], | ||
"fiatStringAmount": "3053.21", | ||
"receiveStringAmount": "0.5", | ||
"minFiat": 600, | ||
"maxFiat": 50000, | ||
"minCrypto": 0.10408553, | ||
"maxCrypto": 8.67379421, | ||
"paymentMethod": "creditCard", | ||
"quoteId": "f9e89339-a0bb-4960-ae8e-cc543d651de3", | ||
"partnerData2": "6098", | ||
"paymentId": "8abad787-6328-46bf-9c65-4d9797008f93", | ||
"orderId": "3e44be68-6827-4fa0-962b-85e1cbcbca2f", | ||
"receiveAddress": "o6AySDQRrUa5Sp6XM9gqLogoibdufvxVyviFvR1PfaP" | ||
}, | ||
"returnUrl": "http://localhost:8000/coinmarket-redirect#detail/sol/normal/0/8abad787-6328-46bf-9c65-4d9797008f93" | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
packages/suite-desktop-core/e2e/fixtures/invity/sell/quotes-bitcoin.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
[ | ||
{ | ||
"exchange": "moonpay-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 85907.69230769231, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "Credit Card", | ||
"fiatStringAmount": "55.84", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 20, | ||
"maxFiat": 30000, | ||
"minCrypto": 0.00006, | ||
"maxCrypto": 30000, | ||
"paymentMethod": "creditCard" | ||
}, | ||
{ | ||
"exchange": "btcdirect-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 92153.84615384616, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "Bank Transfer", | ||
"fiatStringAmount": "59.90", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 31.04, | ||
"maxFiat": 51736.36, | ||
"minCrypto": 0.00032244, | ||
"maxCrypto": 0.53742565, | ||
"paymentMethod": "bankTransfer", | ||
"validUntil": "2025-02-07T12:43:29Z" | ||
}, | ||
{ | ||
"exchange": "btcdirect-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 92153.84615384616, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "SEPA", | ||
"fiatStringAmount": "59.90", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 31.04, | ||
"maxFiat": 51736.36, | ||
"minCrypto": 0.00032244, | ||
"maxCrypto": 0.53742565, | ||
"paymentMethod": "sepa", | ||
"validUntil": "2025-02-07T12:43:29Z" | ||
}, | ||
{ | ||
"exchange": "moonpay-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 85907.69230769231, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "SEPA", | ||
"fiatStringAmount": "55.84", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 20, | ||
"maxFiat": 30000, | ||
"minCrypto": 0.00006, | ||
"maxCrypto": 30000, | ||
"paymentMethod": "sepa" | ||
}, | ||
{ | ||
"error": "Amount too low, minimum is 0.00065 0.00083102.", | ||
"exchange": "banxa-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 90969.23076923077, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "Bank Transfer", | ||
"fiatStringAmount": "59.13", | ||
"cryptoStringAmount": "0.00065000", | ||
"minFiat": 80, | ||
"maxFiat": 50000, | ||
"minCrypto": 0.00083102, | ||
"maxCrypto": 0.51938878, | ||
"paymentMethod": "bankTransfer", | ||
"partnerData2": "6057" | ||
} | ||
] |
9 changes: 9 additions & 0 deletions
9
packages/suite-desktop-core/e2e/fixtures/invity/sell/requests/quotes-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"amountInCrypto": true, | ||
"cryptoCurrency": "bitcoin", | ||
"fiatCurrency": "EUR", | ||
"country": "CZ", | ||
"cryptoStringAmount": "0.00065", | ||
"fiatStringAmount": "", | ||
"flows": ["BANK_ACCOUNT", "PAYMENT_GATE"] | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/suite-desktop-core/e2e/fixtures/invity/sell/requests/trade-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"trade": { | ||
"exchange": "moonpay-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 85907.69230769231, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "Credit Card", | ||
"fiatStringAmount": "55.84", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 20, | ||
"maxFiat": 30000, | ||
"minCrypto": 0.00006, | ||
"maxCrypto": 30000, | ||
"paymentMethod": "creditCard", | ||
"paymentId": "227c5679-53df-45a6-ae83-9f4ebf9ecce7", | ||
"orderId": "4839ba2d-dd85-49b3-ae73-5ab1b526e66f", | ||
"refundAddress": "bc1qw0r95wvsqxumq3km0q8kqyjdard2u8ahaw4y2n" | ||
}, | ||
"returnUrl": "http://localhost:8000/coinmarket-redirect#sell-offers/btc/normal/0/p-qc/CZ/EUR/0.00065/bitcoin/4839ba2d-dd85-49b3-ae73-5ab1b526e66f" | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/suite-desktop-core/e2e/fixtures/invity/sell/requests/watch-request.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"refundAddress": "bc1qw0r95wvsqxumq3km0q8kqyjdard2u8ahaw4y2n", | ||
"paymentId": "227c5679-53df-45a6-ae83-9f4ebf9ecce7", | ||
"status": "SUBMITTED", | ||
"partnerData": "https://sell.moonpay.com/?apiKey=pk_live_1wuWa2Z1O2qG8izvpLkMOvBFbAPgWpfn&baseCurrencyCode=btc"eCurrencyCode=eur&baseCurrencyAmount=0.00065&lockAmount=true&externalTransactionId=227c5679-53df-45a6-ae83-9f4ebf9ecce7&redirectURL=http%3A%2F%2Flocalhost%3A8000%2Fcoinmarket-redirect%23sell-offers%2Fbtc%2Fnormal%2F0%2Fp-qc%2FCZ%2FEUR%2F0.00065%2Fbitcoin%2F4839ba2d-dd85-49b3-ae73-5ab1b526e66f&showWalletAddressForm=true&colorCode=%2300bfd9&language=CZ&signature=Nduwv4haCHiSgzeb1%2FaBUu8lN1r8aKg%2FN%2F2Io9JDYY0%3D", | ||
"exchange": "moonpay-sell", | ||
"fiatCurrency": "EUR", | ||
"cryptoCurrency": "bitcoin", | ||
"rate": 85907.69230769231, | ||
"amountInCrypto": true, | ||
"exp": "qtn7k13GIY/wauu7BvapWA==", | ||
"country": "CZ", | ||
"paymentMethodName": "Credit Card", | ||
"fiatStringAmount": "55.84", | ||
"cryptoStringAmount": "0.00065", | ||
"minFiat": 20, | ||
"maxFiat": 30000, | ||
"minCrypto": 0.00006, | ||
"maxCrypto": 30000, | ||
"paymentMethod": "creditCard", | ||
"orderId": "4839ba2d-dd85-49b3-ae73-5ab1b526e66f" | ||
} |
Oops, something went wrong.