fix: console-lite e2e tests (#1576)

This commit is contained in:
Radosław Szpiech 2022-09-30 16:51:41 +02:00 committed by GitHub
parent 9a88c33458
commit efcd128240
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 6 deletions

View File

@ -299,7 +299,7 @@ describe('Market trade', { tags: '@smoke' }, () => {
cy.getByTestId('place-order').click();
cy.getByTestId('dialog-title').should(
'have.text',
'Confirm transaction in wallet'
'Awaiting network confirmation'
);
}
});

View File

@ -41,8 +41,12 @@ const useAccountColumnDefinitions = () => {
valueFormatter: ({
value,
data,
}: VegaValueFormatterParams<AccountFields, 'deposited'>) =>
addDecimalsFormatNumber(value, data.asset.decimals),
}: VegaValueFormatterParams<AccountFields, 'deposited'>) => {
if (value && data) {
return addDecimalsFormatNumber(value, data.asset.decimals);
}
return '-';
},
},
{
colId: 'used',
@ -52,8 +56,12 @@ const useAccountColumnDefinitions = () => {
valueFormatter: ({
value,
data,
}: VegaValueFormatterParams<AccountFields, 'used'>) =>
addDecimalsFormatNumber(value, data.asset.decimals),
}: VegaValueFormatterParams<AccountFields, 'used'>) => {
if (value && data) {
return addDecimalsFormatNumber(value, data.asset.decimals);
}
return '-';
},
},
];
}, [open]);

View File

@ -20,7 +20,10 @@ function isAccount(
| AccountFieldsFragment
| IterableElement<AccountEventsSubscription['accounts']>
): account is AccountFieldsFragment {
return (account as AccountFieldsFragment).__typename === 'Account';
return (
(account as AccountFieldsFragment).__typename === 'Account' ||
Boolean((account as AccountFieldsFragment).asset?.id)
);
}
export const getId = (