fix: transfer tests

This commit is contained in:
Matthew Russell
2023-07-14 16:50:46 +01:00
parent cd6a51b571
commit f43995fbef
2 changed files with 7 additions and 8 deletions
@@ -6,7 +6,6 @@ const assetSelection = 'select-asset';
const assetBalance = 'asset-balance';
const assetOption = 'rich-select-option';
const transferText = 'transfer-intro-text';
const dropdownMenu = 'dropdown-menu';
const errorText = 'input-error-text';
const formFieldError = 'input-error-text';
const includeTransferFeeRadioBtn = 'include-transfer-fee';
@@ -16,7 +15,6 @@ const openTransferButton = 'open-transfer';
const submitTransferBtn = '[type="submit"]';
const toAddressField = '[name="toAddress"]';
const totalTransferfee = 'total-transfer-fee';
const transfer = 'transfer';
const transferAmount = 'transfer-amount';
const transferForm = 'transfer-form';
const transferFee = 'transfer-fee';
@@ -38,12 +36,13 @@ describe('transfer fees', { tags: '@regression', testIsolation: true }, () => {
cy.setVegaWallet();
cy.visit('/');
// eslint-disable-next-line
cy.wait(500);
cy.getByTestId(collateralTab).click();
cy.getByTestId(dropdownMenu).first().click();
cy.getByTestId(transfer).click();
// Only click if not already active otherwise sidebar will close
cy.get('[data-testid="sidebar-content"]').then(($sidebarContent) => {
if ($sidebarContent.find('h2').text() !== 'Transfer') {
cy.get('[data-testid="sidebar"] [data-testid="Transfer"]').click();
}
});
cy.wait('@Assets');
cy.wait('@Accounts');
+1 -1
View File
@@ -49,7 +49,7 @@ type SidebarView =
export const Sidebar = () => {
return (
<div className="flex flex-col gap-2 h-full">
<div className="flex flex-col gap-2 h-full" data-testid="sidebar">
<div className="h-12 flex justify-center items-center border-b border-default">
<SidebarButton
view={ViewType.Settings}