mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-20 22:28:30 +01:00
fix(e2e): Fixed race condition when changing units to satoshis
This commit is contained in:
committed by
Ondřej Hájek
parent
9454a1018d
commit
b8a64003ad
@@ -36,6 +36,7 @@ export class WalletPage {
|
||||
readonly copyPublicKeyButton: Locator;
|
||||
readonly openSendFormButton: Locator;
|
||||
readonly sendForm: Locator;
|
||||
readonly sendFormHeader: Locator;
|
||||
readonly totalSent: Locator;
|
||||
readonly receiveButton: Locator;
|
||||
readonly revealAddressButton: Locator;
|
||||
@@ -86,6 +87,7 @@ export class WalletPage {
|
||||
this.copyPublicKeyButton = this.page.getByTestId('@metadata/copy-xpub-button');
|
||||
this.openSendFormButton = this.page.getByTestId('@wallet/menu/wallet-send');
|
||||
this.sendForm = this.page.getByTestId('@wallet/send/outputs-and-options');
|
||||
this.sendFormHeader = this.page.getByTestId('@wallet/send-header');
|
||||
this.totalSent = this.page.getByTestId('@wallet/send/total-sent');
|
||||
this.receiveButton = this.page.getByTestId('@wallet/menu/wallet-receive');
|
||||
this.revealAddressButton = this.page.getByTestId('@wallet/receive/reveal-address-button');
|
||||
|
||||
@@ -52,7 +52,7 @@ test.describe('Global receive and send', { tag: ['@T3T1', '@T3W1'] }, () => {
|
||||
});
|
||||
});
|
||||
|
||||
test(`Global send`, async ({ page, devicePrompt, tradingPage }) => {
|
||||
test(`Global send`, async ({ page, devicePrompt, walletPage, tradingPage }) => {
|
||||
await test.step('Open send form', async () => {
|
||||
await page.getByTestId('@wallet/menu/wallet-global-send').click();
|
||||
await expect(devicePrompt.header).toHaveTranslation('TR_NAV_SEND');
|
||||
@@ -71,7 +71,7 @@ test.describe('Global receive and send', { tag: ['@T3T1', '@T3W1'] }, () => {
|
||||
});
|
||||
|
||||
await test.step('Send form validation', async () => {
|
||||
await expect(page.getByTestId('@wallet/send-header')).toHaveTranslation('TR_NAV_SEND');
|
||||
await expect(walletPage.sendFormHeader).toHaveTranslation('TR_NAV_SEND');
|
||||
await expect(
|
||||
page.getByTestId("@metadata/accountLabel/m/84'/0'/2'/hover-container"),
|
||||
).toHaveTranslation('LABELING_ACCOUNT', {
|
||||
|
||||
@@ -5,7 +5,6 @@ test.describe('Send form for bitcoin', { tag: ['@T3W1', '@T3T1'] }, () => {
|
||||
|
||||
test.use({
|
||||
deviceSetup: {
|
||||
needs_backup: true,
|
||||
mnemonic: 'mnemonic_all',
|
||||
},
|
||||
});
|
||||
@@ -61,8 +60,10 @@ test.describe('Send form for bitcoin', { tag: ['@T3W1', '@T3T1'] }, () => {
|
||||
|
||||
test('switch display units to satoshis, fill a form in satoshis and send', async ({
|
||||
page,
|
||||
walletPage,
|
||||
tradingPage,
|
||||
}) => {
|
||||
await expect(walletPage.sendFormHeader).toBeVisible();
|
||||
await page.getByTestId('amount-unit-switch/regtest').click();
|
||||
|
||||
await tradingPage.sendAmountInput.fill('300');
|
||||
|
||||
Reference in New Issue
Block a user