Skip to content

Commit

Permalink
chore: Fix interact e2e (#1162)
Browse files Browse the repository at this point in the history
Co-authored-by: saeta-eth <saetaeth@proton.me>
Co-authored-by: Noah Litvin <335975+noahlitvin@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 28, 2024
1 parent 2e48d92 commit e3367e8
Show file tree
Hide file tree
Showing 7 changed files with 3,068 additions and 4,233 deletions.
6 changes: 3 additions & 3 deletions examples/sample-foundry-project/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7,251 changes: 3,041 additions & 4,210 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"jest": "^29.7.0",
"rollup": "^4.17.2",
"ts-jest": "^29.1.2",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
"typedoc-plugin-zod": "^1.1.2"
"typedoc": "^0.26.3",
"typedoc-plugin-markdown": "^4.1.0",
"typedoc-plugin-zod": "^1.2.0"
},
"dependencies": {
"@synthetixio/router": "^3.4.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"tmp-promise": "^3.0.3",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^4.0.1",
"typedoc-plugin-zod": "^1.1.2",
"typedoc": "^0.26.3",
"typedoc-plugin-markdown": "^4.1.0",
"typedoc-plugin-zod": "^1.2.0",
"typescript": "^5.4.5"
},
"bin": {
Expand Down
24 changes: 12 additions & 12 deletions packages/website/cypress/integration/Interact.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,33 @@ Feature: Interact page
Then View renders a "div" displaying the text "0xEb3107117FEAd7de89Cd14D463D340A2E6917769"

# Read function with int output
Given User opens the "packages/multicall/latest/11155111-main/interact" page
Then URL includes "multicall/Multicall/0xcA11bde05977b3631167028862bE2a173976CA11"
Given User opens the "/packages/multicall/latest/11155111-main/interact" page
Then URL includes "/multicall/Multicall/0xcA11bde05977b3631167028862bE2a173976CA11"
* User clicks on the "a" element with text "getChainId()"
* User clicks on the "h2" element with text "getChainId()"
* User clicks on the "button" element with text "Call view function"
Then View renders a "div" displaying the text "11155111"

# Read function with bytes32 output
Given User opens the "packages/multicall/latest/11155111-main/interact" page
Then URL includes "multicall/Multicall/0xcA11bde05977b3631167028862bE2a173976CA11"
* User clicks on the "a" element with text "getBlockHash(uint256 blockNumber)"
* User clicks on the "h2" element with text "getBlockHash(uint256)"
* User types "607818" for "blockNumber" function param
Given User opens the "/packages/registry/2.15.1/1-main/interact" page
Then URL includes "/registry/Proxy/0x8E5C7EFC9636A6A0408A46BB7F617094B81e5dba"
* User clicks on the "a" element with text "getPackageOwner(bytes32 _packageName)"
* User clicks on the "h2" element with text "getPackageOwner(bytes32)"
* User types "registry" for "_packageName" function param
* User clicks on the "button" element with text "Call view function"
Then View renders a "div" displaying the text "0xe20ea4f73d17ff02e633305befcdf70162cc16fad876c6f9fe2d9acfd7f36e78"
Then View renders a "div" displaying the text "0x493E75825b862c355a4263C9C1CB6F650539B328"

# Read function with contract output
Given User opens the "packages/aave-v3-pool/latest/11155111-main/interact" page
Then URL includes "aave-v3-pool/InitializableImmutableAdminUpgradeabilityProxy/0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951"
Given User opens the "/packages/aave-v3-pool/latest/11155111-main/interact" page
Then URL includes "/aave-v3-pool/InitializableImmutableAdminUpgradeabilityProxy/0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951"
* User clicks on the "a" element with text "ADDRESSES_PROVIDER()"
* User clicks on the "h2" element with text "ADDRESSES_PROVIDER()"
* User clicks on the "button" element with text "Call view function"
Then View renders a "div" displaying the text "0x012bAC54348C0E635dCAc9D5FB99f06F24136C9A"

# Read function with struct output
Given User opens the "packages/aave-v3-pool/latest/11155111-main/interact" page
Then URL includes "aave-v3-pool/InitializableImmutableAdminUpgradeabilityProxy/0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951"
Given User opens the "/packages/aave-v3-pool/latest/11155111-main/interact" page
Then URL includes "/aave-v3-pool/InitializableImmutableAdminUpgradeabilityProxy/0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951"
* User clicks on the "a" element with text "getConfiguration(address asset)"
* User clicks on the "h2" element with text "getConfiguration(address)"
* User types "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5" for "asset" function param
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export const DefaultInput: FC<{
useEffect(() => {
const bytes32Regex = /^0x[0-9a-fA-F]{64}$/;
if (inputType == 'bytes32' && !bytes32Regex.test(updateValue)) {
handleUpdate(stringToHex(updateValue, { size: 32 }));
if (updateValue.startsWith('0x')) {
handleUpdate(updateValue);
} else {
handleUpdate(stringToHex(updateValue, { size: 32 }));
}
} else if (inputType == 'tuple') {
try {
handleUpdate(JSON.parse(updateValue));
Expand Down
2 changes: 1 addition & 1 deletion packages/website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2015",
"target": "ES2018",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand Down

0 comments on commit e3367e8

Please sign in to comment.