diff --git a/automation/pages/TransactionPage.js b/automation/pages/TransactionPage.js index 7ba8b92e4..479ab9cfe 100644 --- a/automation/pages/TransactionPage.js +++ b/automation/pages/TransactionPage.js @@ -104,6 +104,7 @@ class TransactionPage extends BasePage { draftsTabSelector = 'tab-0'; draftDeleteButtonIndexSelector = 'button-draft-delete-'; draftContinueButtonIndexSelector = 'button-draft-continue-'; + confirmDeleteAccountButtonSelector = 'button-confirm-delete-account'; //Other modalTransactionSuccessSelector = 'modal-transaction-success'; @@ -562,6 +563,7 @@ class TransactionPage extends BasePage { await this.fillInTransferAccountId(); await this.fillInDeletedAccountId(accountId); await this.clickOnSignAndSubmitDeleteButton(); + await this.clickOnConfirmDeleteAccountButton(); await this.clickSignTransactionButton(); await this.fillInPassword(password); await this.clickOnPasswordContinue(); @@ -1381,5 +1383,9 @@ class TransactionPage extends BasePage { throw new Error('Failed to turn the receiver signature switch on after multiple attempts'); } + + async clickOnConfirmDeleteAccountButton() { + await this.clickByTestId(this.confirmDeleteAccountButtonSelector); + } } module.exports = TransactionPage; diff --git a/automation/tests/transactionTests.test.js b/automation/tests/transactionTests.test.js index 28925931d..848fa0d47 100644 --- a/automation/tests/transactionTests.test.js +++ b/automation/tests/transactionTests.test.js @@ -54,7 +54,7 @@ test.describe('Transaction tests', () => { }); test.beforeEach(async () => { - await transactionPage.closeCompletedTransaction(); + // await transactionPage.closeCompletedTransaction(); await transactionPage.clickOnTransactionsMenuButton(); await transactionPage.closeDraftModal(); }); diff --git a/automation/tests/workflowTests.test.js b/automation/tests/workflowTests.test.js index 73b581b8a..c8835a523 100644 --- a/automation/tests/workflowTests.test.js +++ b/automation/tests/workflowTests.test.js @@ -60,7 +60,7 @@ test.describe('Workflow tests', () => { }); test.beforeEach(async () => { - await transactionPage.closeCompletedTransaction(); + // await transactionPage.closeCompletedTransaction(); await transactionPage.clickOnTransactionsMenuButton(); await transactionPage.closeDraftModal(); }); @@ -497,9 +497,6 @@ test.describe('Workflow tests', () => { const getTransferAccountId = await detailsPage.getAccountDeleteDetailsTransferId(); expect(getTransferAccountId).toBeTruthy(); - - const getTransferAmount = await detailsPage.getAccountDeleteDetailsTransferAmount(); - expect(getTransferAmount).toBeTruthy(); }, ); }); diff --git a/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue b/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue index 2ea49259f..9cc0d732d 100644 --- a/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue +++ b/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue @@ -25,6 +25,8 @@ import { isUserLoggedIn, isLoggedInOrganization } from '@renderer/utils/userStor import AppButton from '@renderer/components/ui/AppButton.vue'; import AppInput from '@renderer/components/ui/AppInput.vue'; +import AppModal from '@renderer/components/ui/AppModal.vue'; +import AppCustomIcon from '@renderer/components/ui/AppCustomIcon.vue'; import KeyStructureModal from '@renderer/components/KeyStructureModal.vue'; import TransactionProcessor from '@renderer/components/Transaction/TransactionProcessor.vue'; import TransactionHeaderControls from '@renderer/components/Transaction/TransactionHeaderControls.vue'; @@ -57,6 +59,7 @@ const approvers = ref([]); const selectedKey = ref(); const isKeyStructureModalShown = ref(false); +const isConfirmModalShown = ref(false); const isExecuted = ref(false); const isSubmitted = ref(false); @@ -79,9 +82,17 @@ const transactionKey = computed(() => { }); /* Handlers */ +const handleFormSubmit = e => { + e.preventDefault(); + + isConfirmModalShown.value = true; +}; + const handleCreate = async e => { e.preventDefault(); + isConfirmModalShown.value = false; + try { if (!isAccountId(payerData.accountId.value) || !payerData.key.value) { throw Error('Invalid Payer ID'); @@ -197,7 +208,7 @@ const columnClass = 'col-4 col-xxxl-3';