diff --git a/package.json b/package.json index be623e00d0..37734fb3e3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "ipfs-css": "^0.13.1", "react": "^16.8.0", "react-dom": "^16.8.0", - "react-scripts": "3.1.1", + "react-scripts": "^3.2.0", "tachyons": "^4.11.1" }, "scripts": { diff --git a/src/App.js b/src/App.js index 8d8a20d483..f742be5208 100755 --- a/src/App.js +++ b/src/App.js @@ -36,12 +36,12 @@ const IpfsId = (props) => { if (!props) return null return (
-

Connected to IPFS

+

Connected to IPFS

{['id', 'agentVersion'].map((key) => (
{key} -
{props[key]}
+
{props[key]}
))}
diff --git a/src/hooks/use-ipfs-factory.js b/src/hooks/use-ipfs-factory.js index 31c88fe08e..fa0464d484 100644 --- a/src/hooks/use-ipfs-factory.js +++ b/src/hooks/use-ipfs-factory.js @@ -25,7 +25,7 @@ export default function useIpfsFactory ({ commands }) { return function cleanup () { if (ipfs && ipfs.stop) { console.log('Stopping IPFS') - ipfs.stop() + ipfs.stop().catch(err => console.error(err)) setIpfsReady(false) } } diff --git a/test.js b/test.js new file mode 100644 index 0000000000..812769aca0 --- /dev/null +++ b/test.js @@ -0,0 +1,16 @@ +'use strict' + +const pkg = require('./package.json') + +module.exports = { + [pkg.name]: function (browser) { + browser + .url(process.env.IPFS_EXAMPLE_TEST_URL) + .waitForElementVisible('[data-test=title]') + .assert.containsText('[data-test=title]', 'Connected to IPFS') + .assert.elementPresent('[data-test=id') + .assert.elementPresent('[data-test=agentVersion') + .end() + } +} +