diff --git a/apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts b/apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts index 8df05cba92..470e79bf39 100644 --- a/apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts +++ b/apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts @@ -19,7 +19,7 @@ function addInstance (browser: NightwatchBrowser, address: string, isValidFormat else { browser.click('button[id^="runAndDeployAtAdressButton"]') .execute(function () { - const modal = document.querySelector('#modal-footer-ok') as HTMLElement + const modal = document.querySelector('[data-id="fileSystem-modal-footer-ok-react"]') as HTMLElement modal.click() }) } diff --git a/apps/remix-ide-e2e/src/commands/clickInstance.ts b/apps/remix-ide-e2e/src/commands/clickInstance.ts index f9d5ee8e6f..4da4b51b05 100644 --- a/apps/remix-ide-e2e/src/commands/clickInstance.ts +++ b/apps/remix-ide-e2e/src/commands/clickInstance.ts @@ -3,8 +3,7 @@ import EventEmitter from 'events' class ClickInstance extends EventEmitter { command (this: NightwatchBrowser, index: number): NightwatchBrowser { - index = index + 2 - const selector = '.instance:nth-of-type(' + index + ') > div > button' + const selector = `[data-id="universalDappUiTitleExpander${index}"]` this.api.waitForElementPresent(selector).waitForElementContainsText(selector, '', 60000).scrollAndClick(selector).perform(() => { this.emit('complete') }) return this diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index c563bd459e..a544e39878 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -25,7 +25,7 @@ module.exports = { .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') .click('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) - .click('*[data-id="universalDappUiTitleExpander"]') + .clickInstance(0) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .testFunction('last', { @@ -70,7 +70,7 @@ module.exports = { .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .pause(500) .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) - .click('*[data-id="universalDappUiTitleExpander"]') + .clickInstance(0) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .testFunction('last', { @@ -95,6 +95,7 @@ module.exports = { .clickLaunchIcon('solidity') .clickLaunchIcon('udapp') .pause(2000) + .clearValue('input[placeholder="bytes32[] proposalNames"]') .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') .click('*[data-id="Deploy - transact (not payable)"]') .clickInstance(0) diff --git a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts index b48a0df1c8..108bf7c2c5 100644 --- a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts @@ -33,7 +33,7 @@ module.exports = { .setValue('input[placeholder="uint8 _numProposals"]', '2') .click('*[data-id="Deploy - transact (not payable)"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) - .click('*[data-id="universalDappUiTitleExpander"]') + .clickInstance(0) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .testFunction('last', { @@ -65,7 +65,7 @@ module.exports = { .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .pause(500) .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) - .click('*[data-id="universalDappUiTitleExpander"]') + .clickInstance(0) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .testFunction('last', { diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 8759cd2448..0fd6efa234 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -135,9 +135,9 @@ module.exports = { .clickLaunchIcon('filePanel') .scrollAndClick('*[data-id="landingPageImportFromGistButton"]') .waitForElementVisible('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]') - .execute(() => { + .execute(function () { (document.querySelector('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]') as any).focus() - }, [], () => {}) + }) .setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', testData.validGistId) .modalFooterOKClick('gisthandler') .openFile(`gist-${testData.validGistId}/README.txt`) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 7693b0ad21..9b41fe9e5f 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -16,7 +16,6 @@ export class TxRunnerWeb3 { } _executeTx (tx, network, txFee, api, promptCb, callback) { - console.log('tx: ', tx) if (network && network.lastBlock && network.lastBlock.baseFeePerGas) { // the sending stack (web3.js / metamask need to have the type defined) // this is to avoid the following issue: https://github.com/MetaMask/metamask-extension/issues/11824 @@ -58,7 +57,6 @@ export class TxRunnerWeb3 { return new Promise(async (resolve, reject) => { const receipt = await tryTillReceiptAvailable(resp, this.getWeb3()) tx = await tryTillTxAvailable(resp, this.getWeb3()) - console.log(receipt, tx, receipt['transactionHash']) resolve({ receipt, tx, @@ -82,9 +80,6 @@ export class TxRunnerWeb3 { data = '0x' + data } - console.log('data: ', data) - console.log('args: ', args) - return this.runInNode(args.from, args.to, data, args.value, args.gasLimit, args.useCall, args.timestamp, confirmationCb, gasEstimationForceSend, promptCb, callback) } @@ -117,17 +112,10 @@ export class TxRunnerWeb3 { } if (this._api.config.getUnpersistedProperty('doNotShowTransactionConfirmationAgain')) { - console.log('tx: ', tx) - console.log('network: ', network) - console.log('this._api: ', this._api) return this._executeTx(tx, network, null, this._api, promptCb, callback) } confirmCb(network, tx, tx['gas'], (txFee) => { - console.log('tx: ', tx) - console.log('network: ', network) - console.log('txFee: ', txFee) - console.log('this._api: ', this._api) return this._executeTx(tx, network, txFee, this._api, promptCb, callback) }, (error) => { callback(error) diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index aa5b90b771..fc5460b611 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -204,7 +204,7 @@ export function UniversalDappUI (props: UdappProps) { return (
-