mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Add @metamask/test-dapp (#8464)
* add @metamask/test-dapp; delete contract-test files * dedupe @metamask/onboarding, remove from direct deps
This commit is contained in:
parent
85453a2588
commit
748d5e680c
@ -11,8 +11,8 @@
|
|||||||
"benchmark:firefox": "SELENIUM_BROWSER=firefox node test/e2e/benchmark.js",
|
"benchmark:firefox": "SELENIUM_BROWSER=firefox node test/e2e/benchmark.js",
|
||||||
"build:test": "yarn build test",
|
"build:test": "yarn build test",
|
||||||
"test": "yarn test:unit && yarn lint",
|
"test": "yarn test:unit && yarn lint",
|
||||||
"dapp": "node development/static-server.js test/e2e/contract-test --port 8080",
|
"dapp": "node development/static-server.js node_modules/@metamask/test-dapp/website --port 8080",
|
||||||
"dapp-chain": "GANACHE_ARGS='-b 2' concurrently -k -n ganache,dapp -p '[{time}][{name}]' 'yarn ganache:start' 'sleep 5 && node development/static-server.js test/e2e/contract-test --port 8080'",
|
"dapp-chain": "GANACHE_ARGS='-b 2' concurrently -k -n ganache,dapp -p '[{time}][{name}]' 'yarn ganache:start' 'sleep 5 && yarn dapp'",
|
||||||
"forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010",
|
"forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010",
|
||||||
"dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'",
|
"dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'",
|
||||||
"watch:test:unit": "nodemon --exec \"yarn test:unit\" ./test ./app ./ui",
|
"watch:test:unit": "nodemon --exec \"yarn test:unit\" ./test ./app ./ui",
|
||||||
@ -188,7 +188,7 @@
|
|||||||
"@babel/register": "^7.5.5",
|
"@babel/register": "^7.5.5",
|
||||||
"@metamask/eslint-config": "^1.1.0",
|
"@metamask/eslint-config": "^1.1.0",
|
||||||
"@metamask/forwarder": "^1.1.0",
|
"@metamask/forwarder": "^1.1.0",
|
||||||
"@metamask/onboarding": "^0.2.0",
|
"@metamask/test-dapp": "^1.0.1",
|
||||||
"@sentry/cli": "^1.49.0",
|
"@sentry/cli": "^1.49.0",
|
||||||
"@storybook/addon-actions": "^5.3.14",
|
"@storybook/addon-actions": "^5.3.14",
|
||||||
"@storybook/addon-backgrounds": "^5.3.14",
|
"@storybook/addon-backgrounds": "^5.3.14",
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,69 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>E2E Test Dapp</title>
|
|
||||||
<script src="node_modules/@metamask/onboarding/dist/metamask-onboarding.bundle.js" defer></script>
|
|
||||||
<script src="contract.js" defer></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<h1>E2E Test Dapp</h1>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<section>
|
|
||||||
<h2>Connect</h2>
|
|
||||||
<button id="connectButton" disabled></button>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Contract</h2>
|
|
||||||
<div>
|
|
||||||
<button id="deployButton" disabled>Deploy Contract</button>
|
|
||||||
<button id="depositButton" disabled>Deposit</button>
|
|
||||||
<button id="withdrawButton" disabled>Withdraw</button>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Contract Status: <span id="contractStatus">Not clicked</span>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Send Eth</h2>
|
|
||||||
<button id="sendButton" disabled>Send</button>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Send Tokens</h2>
|
|
||||||
<div>
|
|
||||||
Token: <span id="tokenAddress"></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button id="createToken" disabled>Create Token</button>
|
|
||||||
<button id="transferTokens" disabled>Transfer Tokens</button>
|
|
||||||
<button id="approveTokens" disabled>Approve Tokens</button>
|
|
||||||
<button id="transferTokensWithoutGas" disabled>Transfer Tokens Without Gas</button>
|
|
||||||
<button id="approveTokensWithoutGas" disabled>Approve Tokens Without Gas</button>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Get Accounts</h2>
|
|
||||||
<button id="getAccounts">eth_accounts</button>
|
|
||||||
<div id="getAccountsResult"></div>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Status</h2>
|
|
||||||
<div>
|
|
||||||
Network: <span id="network"></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
ChainId: <span id="chainId"></span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Accounts: <span id="accounts"></span>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Sign Typed Data</h2>
|
|
||||||
<button id="signTypedData" disabled>Sign</button>
|
|
||||||
<div>Sign Typed Data Result: <span id="signTypedDataResult"></span></div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
15
yarn.lock
15
yarn.lock
@ -1903,13 +1903,20 @@
|
|||||||
pump "^3.0.0"
|
pump "^3.0.0"
|
||||||
safe-event-emitter "^1.0.1"
|
safe-event-emitter "^1.0.1"
|
||||||
|
|
||||||
"@metamask/onboarding@^0.2.0":
|
"@metamask/onboarding@^0.2.1":
|
||||||
version "0.2.0"
|
version "0.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-0.2.0.tgz#9594f6a9a1c779083d71434b9f5e6a973af941f7"
|
resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-0.2.1.tgz#76e864634d6436a486fcfa743f09a25b1934a11e"
|
||||||
integrity sha512-QoMV1Gf1j3LxFhSb5gxudHOIywQQ/su8vPQ1ByC7ocQCVlZb1JqZ/+TYyoIzR2OTi1NPelhYHT3UMdhPozIAhA==
|
integrity sha512-wSwgkIfVHM6IWja0xfNbK+wMFweOazNe1Z1RVqS0ZKG5v8vCPT93N5IQF2mKCDD+RnBpremE1VYslPPQxQz25g==
|
||||||
dependencies:
|
dependencies:
|
||||||
bowser "^2.5.4"
|
bowser "^2.5.4"
|
||||||
|
|
||||||
|
"@metamask/test-dapp@^1.0.1":
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@metamask/test-dapp/-/test-dapp-1.0.1.tgz#67961a53640faca827422fd7bc467d5b2ceb0292"
|
||||||
|
integrity sha512-RANP75a5UpCXYydaxZQ6p+4A9UjEg6YC5XS6dGatohtIKbGvN3TAU0wPot3GKcxfn9BbnGKMzQ8DIxmkrEaqSg==
|
||||||
|
dependencies:
|
||||||
|
"@metamask/onboarding" "^0.2.1"
|
||||||
|
|
||||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
||||||
|
Loading…
Reference in New Issue
Block a user