fix e2e chrome

pull/2904/head
Joseph Izang 2 years ago
parent 4b1576fcd1
commit c4a31d2ff4
  1. 32
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  2. 2
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  3. 4
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx

@ -266,7 +266,7 @@ const sources = [
'blah.sol': { 'blah.sol': {
content: ` content: `
pragma solidity >=0.7.0 <0.9.0; pragma solidity >=0.7.0 <0.9.0;
contract Kickstarter { contract Kickstarter {
enum State { Started, Completed } enum State { Started, Completed }
@ -276,9 +276,9 @@ const sources = [
string name; string name;
uint goal; uint goal;
State state; State state;
} }
Project[] public projects; Project[] public projects;
constructor() { constructor() {
@ -291,7 +291,7 @@ const sources = [
project.state = State.Started; project.state = State.Started;
project.goal = goal; project.goal = goal;
} }
} }
` `
} }
}, },
@ -309,12 +309,12 @@ const sources = [
function test1 (bytes calldata userData) external returns (bytes memory, bytes32, bytes32, uint) { function test1 (bytes calldata userData) external returns (bytes memory, bytes32, bytes32, uint) {
bytes32 idAsk = abi.decode(userData[:33], (bytes32)); bytes32 idAsk = abi.decode(userData[:33], (bytes32));
bytes32 idOffer = abi.decode(userData[32:64], (bytes32)); bytes32 idOffer = abi.decode(userData[32:64], (bytes32));
bytes memory ro = abi.encodePacked(msg.sender, msg.sender, idAsk, idOffer); bytes memory ro = abi.encodePacked(msg.sender, msg.sender, idAsk, idOffer);
return (ro, idAsk, idOffer, userData.length); return (ro, idAsk, idOffer, userData.length);
} }
function testgp (bytes calldata userData) external returns (bytes4) { function testgp (bytes calldata userData) external returns (bytes4) {
return abi.decode(userData[:4], (bytes4)); return abi.decode(userData[:4], (bytes4));
} }
@ -341,9 +341,9 @@ const sources = [
'withGeneratedSources.sol': { 'withGeneratedSources.sol': {
content: ` content: `
// SPDX-License-Identifier: GPL-3.0 // SPDX-License-Identifier: GPL-3.0
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
contract A { contract A {
function f(uint[] memory) public returns (uint256) { } function f(uint[] memory) public returns (uint256) { }
} }
` `
} }
@ -372,7 +372,7 @@ const sources = [
} }
/** /**
* @dev Return value * @dev Return value
* @return value of 'number' * @return value of 'number'
*/ */
function retrieve() public view returns (uint256){ function retrieve() public view returns (uint256){
@ -393,14 +393,14 @@ const sources = [
function callA() public { function callA() public {
p = 123; p = 123;
try b.callB() { try b.callB() {
} }
catch (bytes memory reason) { catch (bytes memory reason) {
} }
} }
} }
contract B { contract B {
C c; C c;
uint p; uint p;
@ -413,7 +413,7 @@ const sources = [
c.callC(); c.callC();
} }
} }
contract C { contract C {
uint p; uint p;
function callC() public { function callC() public {
@ -498,7 +498,7 @@ const jsGetTrace = `(async () => {
} }
})()` })()`
const jsDebug = `(async () => { const jsDebug = `(async () => {
try { try {
const result = await remix.call('debugger', 'debug', '0x65f0813753462414f9a91f0aabea946188327995f54b893b63a8d7ff186cfca3') const result = await remix.call('debugger', 'debug', '0x65f0813753462414f9a91f0aabea946188327995f54b893b63a8d7ff186cfca3')
console.log('result ', result) console.log('result ', result)

@ -334,7 +334,7 @@ export function ContractDropdownUI(props: ContractDropdownProps) {
<span>{atAddressOptions.title}</span> <span>{atAddressOptions.title}</span>
</Tooltip> </Tooltip>
}> }>
<button className="udapp_atAddress btn btn-sm btn-info" id="runAndDeployAtAdressButton" disabled={atAddressOptions. disabled} onClick={loadFromAddress}>At Address</button> <button className="udapp_atAddress btn btn-sm btn-info" id="runAndDeployAtAdressButton" disabled={atAddressOptions. disabled} onClick={loadFromAddress} data-title={atAddressOptions.title}>At Address</button>
</OverlayTrigger> </OverlayTrigger>
<input <input
ref={atAddressValue} ref={atAddressValue}

@ -241,7 +241,7 @@ export function ContractGUI (props: ContractGUIProps) {
<span>{buttonOptions.title}</span> <span>{buttonOptions.title}</span>
</Tooltip> </Tooltip>
}> }>
<button onClick={handleActionClick} className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} data-id={buttonOptions.dataId} data-title={buttonOptions.title}>{title}</button> <button onClick={handleActionClick} className={`udapp_instanceButton ${props.widthClass} btn btn-sm ${buttonOptions.classList}`} data-id={buttonOptions.dataId} data-title={buttonOptions.title} id={'targetButtonId'}>{title}</button>
</OverlayTrigger> </OverlayTrigger>
<OverlayTrigger placement={'right'} overlay={ <OverlayTrigger placement={'right'} overlay={
<Tooltip className="text-nowrap" id="remixContractGuiTooltip"> <Tooltip className="text-nowrap" id="remixContractGuiTooltip">
@ -252,8 +252,8 @@ export function ContractGUI (props: ContractGUIProps) {
className="form-control" className="form-control"
data-id={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : 'multiParamManagerBasicInputField'} data-id={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : 'multiParamManagerBasicInputField'}
placeholder={props.inputs} placeholder={props.inputs}
data-title={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : props.inputs}
onChange={handleBasicInput} onChange={handleBasicInput}
data-title={props.funcABI.type === 'fallback' || props.funcABI.type === 'receive' ? `'(${props.funcABI.type}')` : props.inputs}
ref={basicInputRef} ref={basicInputRef}
style={{ visibility: !((props.funcABI.inputs && props.funcABI.inputs.length > 0) || (props.funcABI.type === 'fallback') || (props.funcABI.type === 'receive')) ? 'hidden' : 'visible' }} /> style={{ visibility: !((props.funcABI.inputs && props.funcABI.inputs.length > 0) || (props.funcABI.type === 'fallback') || (props.funcABI.type === 'receive')) ? 'hidden' : 'visible' }} />
</OverlayTrigger> </OverlayTrigger>

Loading…
Cancel
Save