fix test for aqua-ipfs-integration web

This commit is contained in:
Pavel Murygin
2022-02-17 22:39:08 +03:00
parent 7bb0900713
commit 793b75745e
19 changed files with 12281 additions and 23776 deletions

View File

@ -11,7 +11,7 @@ export const ConnectionForm = () => {
{relayNodes.map((x) => (
<li key={x.peerId}>
<span className="mono">{x.peerId}</span>
<button className="btn" onClick={() => connect(x.multiaddr)}>
<button className="btn btn-connect" onClick={() => connect(x.multiaddr)}>
Connect
</button>
</li>

View File

@ -31,7 +31,7 @@ export const IpfsForm = () => {
setValue={setWasm}
/>
<div className="row">
<button className="btn btn-right" onClick={deployService}>
<button id="deploy-service" className="btn btn-right" onClick={deployService}>
deploy service
</button>
</div>

View File

@ -28,7 +28,7 @@ export const SizeCalcForm = () => {
<TextInput text={"IPFS CID"} value={fileCID} setValue={setFileCID} />
<div className="row">
<button className="btn btn-right" onClick={getFileSize}>
<button id="get-size" className="btn btn-right" onClick={getFileSize}>
get size
</button>
</div>

View File

@ -16,7 +16,7 @@ export const SizeCalcResult = () => {
CID
</p>
</div>
<TextWithLabel text="File size:" value={fileSize} />
<TextWithLabel id="file-size" text="File size:" value={fileSize} />
<TextWithLabel text="File size IPFS CID:" value={fileSizeCID} />
</>
);

View File

@ -21,12 +21,15 @@ export const TextInput = (props: {
export const TextWithLabel = (props: {
text: string;
id?: string;
value: string | null;
}) => {
const idAttr = props.id ? { id: props.id } : {}
const attrs = { className: "input-readonly", ...idAttr };
return (
<div className="row">
<label className="label bold">{props.text}</label>
<div className="input-ro">{props.value || ""}</div>
<div {...attrs}>{props.value || ""}</div>
</div>
);
};